From 9d76b5b44a8eff29c036e65f4f28a82fe3835ad7 Mon Sep 17 00:00:00 2001 From: zachir Date: Sun, 22 Jan 2023 13:16:21 -0600 Subject: move scripts to /bin/sh (not /sbin/sh) and add some wayland helpers --- gen_waybar_confs.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 gen_waybar_confs.sh (limited to 'gen_waybar_confs.sh') diff --git a/gen_waybar_confs.sh b/gen_waybar_confs.sh new file mode 100755 index 0000000..36befae --- /dev/null +++ b/gen_waybar_confs.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +WCLONG="$(crcparse WC)" +WC="$(basename "$WCLONG")" + +OUTPUTS="$(wlr-randr | grep -B2 'Enabled: yes' | sed '/^\s\s*/d;/^--/d' | cut -d' ' -f1)" + +echo "$OUTPUTS" | while read i; do + sed 's/%%DISPLAY%%/'$i'/' "$XDG_CONFIG_HOME"/waybar/config-$WC > "$XDG_CONFIG_HOME"/waybar/config-$WC-$i +done -- cgit v1.2.3