summaryrefslogtreecommitdiff
path: root/gen_waybar_confs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gen_waybar_confs.sh')
-rwxr-xr-xgen_waybar_confs.sh18
1 files changed, 0 insertions, 18 deletions
diff --git a/gen_waybar_confs.sh b/gen_waybar_confs.sh
deleted file mode 100755
index b13d8d7..0000000
--- a/gen_waybar_confs.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-WCLONG="$(crcparse WC)"
-WC="$(basename "$WCLONG")"
-CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}"
-if [ ! -f "$CONFIG/waybar/config-$WC" ]; then
- printf "$CONFIG/waybar/config-$WC waybar config does not exist!\n"
- exit 1
-fi
-
-OUTPUTS="$(wlr-randr | grep -B5 'Enabled: yes' | sed '/^\s\s*/d;/^--/d' | cut -d' ' -f1)"
-
-[ -n "$OUTPUTS" -a -z "$(find "$CONFIG"/waybar -name "config-$WC-*")" ] && \
- rm -rf "$CONFIG/waybar/config-$WC-*"
-
-echo "$OUTPUTS" | while read i; do
- sed 's/%%DISPLAY%%/'$i'/' "$CONFIG"/waybar/config-$WC > "$CONFIG"/waybar/config-$WC-$i
-done