diff options
author | zachir <zachir@librem.one> | 2023-01-22 13:16:21 -0600 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-01-22 13:16:21 -0600 |
commit | 9d76b5b44a8eff29c036e65f4f28a82fe3835ad7 (patch) | |
tree | 6da4285ea5f4c5f97c97cc30e5c9908a222d56a2 /gen_waybar_confs.sh | |
parent | bf07bae38661f7a1dfb49ca25b2b1227876ed6be (diff) |
move scripts to /bin/sh (not /sbin/sh) and add some wayland helpers
Diffstat (limited to 'gen_waybar_confs.sh')
-rwxr-xr-x | gen_waybar_confs.sh | 10 |
1 files changed, 10 insertions, 0 deletions
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 |