summaryrefslogtreecommitdiff
path: root/launch_waybar.sh
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-03-12 23:46:55 -0500
committerzachir <zachir@librem.one>2023-03-12 23:46:55 -0500
commit357694b904a0a50bd2a067963b7660800933a08e (patch)
tree90cfa3b1a76e193f843258de6fdec8ae134f508d /launch_waybar.sh
parentdf2356a3639c1262e6ea6534e6c69b0325514036 (diff)
have launch_waybar automagically determine WC
Diffstat (limited to 'launch_waybar.sh')
-rwxr-xr-xlaunch_waybar.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/launch_waybar.sh b/launch_waybar.sh
index 9a0e04a..3e1233e 100755
--- a/launch_waybar.sh
+++ b/launch_waybar.sh
@@ -2,9 +2,12 @@
killall waybar
+WC="$(crcparse WC)"
+CALLED="${1:-$WC}"
+
if type "wlr-randr"; then
for m in $(wlr-randr | grep -B5 'Enabled: yes' | sed '/^\s\s*/d;/^--$/d' | cut -d' ' -f1); do
- waybar -c "$XDG_CONFIG_HOME"/waybar/config-$1-$m &
+ waybar -c "$XDG_CONFIG_HOME"/waybar/config-$CALLED-$m &
done
else
waybar