feat(eww): add closer support for qs menu

This commit is contained in:
matt1432 2023-07-27 23:07:22 -04:00
parent 5b3916e712
commit 48e02a4c86
5 changed files with 30 additions and 9 deletions

View file

@ -6,7 +6,7 @@
(label :text "  ")
)
)
(defwindow quick-settings-smol
(defwindow quick-settings-smol-reveal
:monitor 0
:stacking "overlay"
:exclusive "ignore"
@ -26,7 +26,7 @@
(defwidget quick-settings-logo []
(eventbox :class "quick-settings-logo"
:onclick "eww close quick-settings-smol; eww close quick-settings-logo; eww close quick-settings; eww update showqs=false"
:onclick "$EWW_PATH/qs-toggle.sh off"
:cursor "pointer"
(box :class "quick-settings-logo"
@ -35,7 +35,7 @@
)
)
)
(defwindow quick-settings-logo
(defwindow quick-settings-logo-reveal
:monitor 0
:stacking "overlay"
:exclusive "ignore"
@ -59,7 +59,7 @@
:orientation "h"
)
)
(defwindow quick-settings
(defwindow quick-settings-reveal
:monitor 0
:stacking "overlay"
:geometry (geometry :x "5px"

View file

@ -3,6 +3,6 @@
WINDOW="$1"
(
eww update "$WINDOW"-visible=false
sleep .55
#sleep .55
eww close "$WINDOW"-reveal
) &

View file

@ -1,4 +1,5 @@
#!/usr/bin/env bash
eww open closer &&
WINDOW="$1"

23
config/eww/scripts/qs-toggle.sh Executable file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
on () {
eww open closer &&
eww open quick-settings-reveal;
eww open quick-settings-smol-reveal;
eww open quick-settings-logo-reveal;
eww update showqs=true
}
off () {
(
eww update showqs=false
sleep .55
eww close quick-settings-reveal
eww close quick-settings-smol-reveal
eww close quick-settings-logo-reveal
)
}
[[ "$1" == "on" ]] && on
[[ "$1" == "off" ]] && off

View file

@ -161,10 +161,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defwidget quick-settings-toggle []
(eventbox :class "toggle-off"
:onclick "eww open quick-settings;
eww open quick-settings-smol;
eww open quick-settings-logo;
eww update showqs=true"
:onclick "$EWW_PATH/qs-toggle.sh on"
:cursor "pointer"