diff --git a/.settings/eww-monitor.sh b/.settings/eww-monitor.sh new file mode 100755 index 0000000..eea852b --- /dev/null +++ b/.settings/eww-monitor.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# screen=0 +screen=$(hyprctl activewindow -j | jq '.monitor') +echo $screen \ No newline at end of file diff --git a/eww/ml4w-sidebar/eww.yuck b/eww/ml4w-sidebar/eww.yuck index 803926d..34f7254 100644 --- a/eww/ml4w-sidebar/eww.yuck +++ b/eww/ml4w-sidebar/eww.yuck @@ -101,7 +101,6 @@ ;; ** Windows ************************************************************************* (defwindow close - :monitor 0 :geometry (geometry :x "455px" :y "-7px" :width "44px" @@ -112,7 +111,6 @@ (close)) (defwindow ml4wlauncher - :monitor 0 :geometry (geometry :x "5px" :y "5px" :width "480px" @@ -124,7 +122,6 @@ ;; resources (defwindow resources - :monitor 0 :geometry (geometry :x "5px" :y "140px" :width "480px" @@ -136,7 +133,6 @@ ;; powermenu (defwindow logout - :monitor 0 :geometry (geometry :x "5px" :y "318px" :width "80px" @@ -147,7 +143,6 @@ (logout)) (defwindow suspend - :monitor 0 :geometry (geometry :x "102px" :y "318px" :width "80px" @@ -158,7 +153,6 @@ (suspend)) (defwindow lock - :monitor 0 :geometry (geometry :x "204px" :y "318px" :width "80px" @@ -169,7 +163,6 @@ (lock)) (defwindow reboot - :monitor 0 :geometry (geometry :x "305px" :y "318px" :width "80px" @@ -180,7 +173,6 @@ (reboot)) (defwindow shutdown - :monitor 0 :geometry (geometry :x "405px" :y "318px" :width "80px" diff --git a/eww/ml4w-sidebar/launch.sh b/eww/ml4w-sidebar/launch.sh index a3cb277..f7b8ca0 100755 --- a/eww/ml4w-sidebar/launch.sh +++ b/eww/ml4w-sidebar/launch.sh @@ -8,10 +8,20 @@ if [[ ! `pidof eww` ]]; then sleep 0.5 fi +sc=$($HOME/dotfiles/.settings/eww-monitor.sh) if [[ ! -f "$FILE" ]]; then touch "$FILE" - ${EWW} --config "$CFG" open-many ml4wlauncher resources logout suspend lock reboot shutdown close + echo ":: Opening on Monitor $sc" + ${EWW} --config "$CFG" open ml4wlauncher --screen $sc + ${EWW} --config "$CFG" open resources --screen $sc + ${EWW} --config "$CFG" open logout --screen $sc + ${EWW} --config "$CFG" open suspend --screen $sc + ${EWW} --config "$CFG" open lock --screen $sc + ${EWW} --config "$CFG" open reboot --screen $sc + ${EWW} --config "$CFG" open shutdown --screen $sc + ${EWW} --config "$CFG" open close --screen $sc else ${EWW} --config "$CFG" close resources ml4wlauncher logout suspend lock reboot shutdown close + echo ":: Closing widgets" rm "$FILE" fi \ No newline at end of file