aboutsummaryrefslogtreecommitdiff
path: root/.config/eww
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2024-02-10 16:27:48 +0000
committerJustine Smithies <justine@smithies.me.uk>2024-02-10 16:27:48 +0000
commit28f6066a3603f1d9a335bd32afd277b0d25f1534 (patch)
treeecdfd35605e4070e0622b0ee99e98587de8cd90a /.config/eww
parent4e530fb055a14fbea2e0107fcc542dd802a22771 (diff)
Changed bar toggle bind so it only toggles the bar of the active monitor
Diffstat (limited to '.config/eww')
-rwxr-xr-x.config/eww/scripts/bar-toggle.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/eww/scripts/bar-toggle.sh b/.config/eww/scripts/bar-toggle.sh
new file mode 100755
index 0000000..2b55ff0
--- /dev/null
+++ b/.config/eww/scripts/bar-toggle.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+monitors=$(hyprctl monitors -j | jq '.[] | .id')
+for i in ${monitors};
+do
+ active_monitor=$(hyprctl -j activeworkspace | grep 'monitorID' | tr -dc '0-9\n')
+ bar=$(eww windows | grep "*bar$i")
+ if [ "$active_monitor" == "$i" ] && [ "$bar" == "*bar$i" ]; then
+ eww close bar$i
+ elif [ "$active_monitor" == "$i" ]; then
+ eww open bar$i
+ fi
+done
+