feat: make a global eww widget closer
This commit is contained in:
parent
7fbfdb1802
commit
ed88184a04
6 changed files with 14 additions and 23 deletions
|
@ -166,7 +166,7 @@
|
||||||
:space-evenly true
|
:space-evenly true
|
||||||
:spacing 10
|
:spacing 10
|
||||||
(button :class "do-logout"
|
(button :class "do-logout"
|
||||||
:onclick "eww open powermenu && eww open powermenu-closer && eww close actions && eww close actions-closer"
|
:onclick "eww close closer && eww open powermenu && eww open closer"
|
||||||
:tooltip "Logout"
|
:tooltip "Logout"
|
||||||
:halign "end"
|
:halign "end"
|
||||||
""
|
""
|
||||||
|
@ -197,13 +197,3 @@
|
||||||
:anchor "top right")
|
:anchor "top right")
|
||||||
|
|
||||||
(actions))
|
(actions))
|
||||||
|
|
||||||
(defwidget closer [window]
|
|
||||||
(eventbox :onclick "eww close ${window} && eww close ${window}-closer"))
|
|
||||||
|
|
||||||
(defwindow actions-closer
|
|
||||||
:monitor 0
|
|
||||||
:geometry (geometry :width "100%" :height "100%")
|
|
||||||
:stacking "fg"
|
|
||||||
:focusable false
|
|
||||||
(closer :window "actions"))
|
|
||||||
|
|
1
eww/closer/README.md
Normal file
1
eww/closer/README.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
always open this widget last
|
9
eww/closer/closer.yuck
Normal file
9
eww/closer/closer.yuck
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
(defwidget closer []
|
||||||
|
(eventbox :onclick "eww close-all"))
|
||||||
|
|
||||||
|
(defwindow closer
|
||||||
|
:monitor 0
|
||||||
|
:geometry (geometry :width "100%" :height "100%")
|
||||||
|
:stacking "fg"
|
||||||
|
:focusable false
|
||||||
|
(closer :window ""))
|
|
@ -3,3 +3,4 @@
|
||||||
(include "actions/actions.yuck")
|
(include "actions/actions.yuck")
|
||||||
(include "powermenu/powermenu.yuck")
|
(include "powermenu/powermenu.yuck")
|
||||||
(include "dashboard/dashboard.yuck")
|
(include "dashboard/dashboard.yuck")
|
||||||
|
(include "closer/closer.yuck")
|
||||||
|
|
|
@ -44,13 +44,3 @@
|
||||||
:anchor "center")
|
:anchor "center")
|
||||||
:wm-ignore true
|
:wm-ignore true
|
||||||
(powermenu))
|
(powermenu))
|
||||||
|
|
||||||
(defwidget closer [window]
|
|
||||||
(eventbox :onclick "eww close ${window} && eww close ${window}-closer"))
|
|
||||||
|
|
||||||
(defwindow powermenu-closer
|
|
||||||
:monitor 0
|
|
||||||
:geometry (geometry :width "100%" :height "100%")
|
|
||||||
:stacking "fg"
|
|
||||||
:focusable false
|
|
||||||
(closer :window "powermenu"))
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [[ $(eww state | grep br_icon) ]]; then
|
if [[ $(eww state | grep br_icon) ]]; then
|
||||||
eww close actions && eww close actions-closer
|
eww close actions && eww close closer
|
||||||
else
|
else
|
||||||
eww open actions && eww open actions-closer
|
eww open actions && eww open closer
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue