]> Freerunner's - dotfiles.git/commitdiff
local: waybar script - initial support for two displays twodisplays
authorAndre Ramnitz <tux.rising@gmail.com>
Mon, 3 Feb 2025 05:40:32 +0000 (06:40 +0100)
committerAndre Ramnitz <tux.rising@gmail.com>
Mon, 3 Feb 2025 05:46:10 +0000 (06:46 +0100)
dot-local/bin/wb

index ed6ddcb23de075025e7ec35ae8116084754f1bf7..7690f28c66d91cc4a9058526a52bcb8b2bca15d4 100755 (executable)
@@ -1,26 +1,30 @@
 #!/bin/bash
 
 reload() {
-    local CONFIG="$HOME/.config/waybar/config.jsonc"
+    local CONFIGLEFT="$HOME/.config/waybar/config.jsonc"
+    local CONFIGRIGHT="$HOME/.config/waybar/config-dp2.jsonc"
     local STYLE="$HOME/.config//waybar/style.css"
 
     if [ "$(pidof waybar)" ];
         then
             kill -SIGUSR2 "$(pidof waybar)"
         else
-            waybar -c "$CONFIG" -s "$STYLE" > /dev/null 2>&1 &
+            waybar -c "$CONFIGLEFT" -s "$STYLE" > /dev/null 2>&1 &
+            # waybar -c "$CONFIGRIGHT" -s "$STYLE" > /dev/null 2>&1 &
     fi
 }
 
 hide() {
-    local CONFIG="$HOME/.config/waybar/config.jsonc"
+    local CONFIGLEFT="$HOME/.config/waybar/config.jsonc"
+    local CONFIGRIGHT="$HOME/.config/waybar/config-dp2.jsonc"
     local STYLE="$HOME/.config//waybar/style.css"
 
     if [ "$(pidof waybar)" ];
     then
         kill -SIGUSR1 "$(pidof waybar)"
     else
-            waybar -c "$CONFIG" -s "$STYLE" > /dev/null 2>&1 &
+            waybar -c "$CONFIGLEFT" -s "$STYLE" > /dev/null 2>&1 &
+            # waybar -c "$CONFIGRIGHT" -s "$STYLE" > /dev/null 2>&1 &
     fi
 }