add eww config

This commit is contained in:
matt1432 2023-05-28 18:05:51 -04:00
parent fac0e15a9e
commit 85dde2e9aa
34 changed files with 2112 additions and 0 deletions

View file

@ -0,0 +1,27 @@
.powermenu {
background-color: $bg;
color: $fg;
padding: 20px;
font-family: Iosevka Nerd Font;
font-size: 70px;
border-radius: 30px;
border: 5px solid $contrastbg;
button {
border-radius: 12px;
min-width: 80px;
transition: all ease .2s;
&:hover { background-color: $bgSecondary; }
&:active { background-color: $bg; }
.content {
border-radius: 4px;
padding: 0px 15px 0px 15px;
}
}
.shutdown { color: $red; }
.reboot { color: $magenta; }
.logout { color: $yellow; }
}
.powermenu-clickhandler {
background-color: black;
}

View file

@ -0,0 +1,56 @@
(defwidget powermenu []
(box :class "powermenu"
:orientation "h"
:space-evenly true
:spacing 20
(button :class "shutdown"
:onclick "systemctl poweroff"
(label :text "襤" :class "content")
)
(button :class "reboot"
:onclick "systemctl reboot"
(label :text "勒" :class "content")
)
(button :class "logout"
:onclick "swaymsg exit"
(label :text "" :class "content")
)
)
)
(defwidget powermenu-clickhandler []
(button :class "powermenu-clickhandler"
:onclick "eww -c ~/.config/eww close powermenu powermenu-clickhandler"
""
)
)
(defwindow powermenu-clickhandler
:monitor 0
:geometry (geometry :x "0px"
:y "0px"
:width "100%"
:height "100%"
:anchor "center")
:wm-ignore true
(powermenu-clickhandler))
(defwindow powermenu
:monitor 0
:geometry (geometry :x "0px"
:y "0px"
:width "500px"
:height "150px"
:anchor "center")
:wm-ignore true
(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"))