summaryrefslogtreecommitdiff
path: root/gen_waybar_confs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gen_waybar_confs.sh')
-rwxr-xr-xgen_waybar_confs.sh10
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