laptop: bink
This commit is contained in:
parent
07941251b5
commit
f1650b1e85
4 changed files with 66 additions and 188 deletions
|
@ -1,7 +1,6 @@
|
|||
(defwidget bar []
|
||||
(centerbox :orientation "v" :hexpand false
|
||||
(box :valign "start" :hexpand false :vexpand true :orientation "v" :space-evenly false
|
||||
(powerbutton)
|
||||
)
|
||||
|
||||
(workspaces :halign "center" :vexpand true :hexpand false :orientation "v")
|
||||
|
@ -36,22 +35,21 @@
|
|||
;; ━━━ BATTERY ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
(defwidget battery []
|
||||
(eventbox :onclick "eww open batterywindow --toggle"
|
||||
(label :text `${
|
||||
EWW_BATTERY.BAT0.status == "Charging" ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 10 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 20 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 30 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 40 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 50 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 60 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 70 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 80 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 90 ? "" : ""
|
||||
}`
|
||||
:limit-width 10
|
||||
:tooltip "${EWW_BATTERY.BAT0.status}: ${EWW_BATTERY.BAT0.capacity}%"
|
||||
:class "battery"
|
||||
))
|
||||
(label :text `${
|
||||
EWW_BATTERY.BAT0.status == "Charging" ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 10 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 20 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 30 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 40 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 50 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 60 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 70 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 80 ? "" :
|
||||
EWW_BATTERY.BAT0.capacity < 90 ? "" : ""
|
||||
}`
|
||||
:limit-width 10
|
||||
:class "battery"
|
||||
))
|
||||
)
|
||||
|
||||
(defwidget batterymenu []
|
||||
|
@ -121,51 +119,6 @@
|
|||
:height "60px")
|
||||
(cal))
|
||||
|
||||
;; powermenu
|
||||
|
||||
(defwidget powerbutton []
|
||||
(eventbox :cursor "hand"
|
||||
(button :class "reg-btn powerbutton"
|
||||
:onclick "eww open powermenu --toggle &" "")
|
||||
)
|
||||
)
|
||||
(defwidget powermenucontent []
|
||||
(box :orientation "h"
|
||||
:class "powermenu-container"
|
||||
(box :class "shutdown-btn-box"
|
||||
:orientation "h"
|
||||
(button :class "btn"
|
||||
:tooltip "Shutdown"
|
||||
:onclick "eww close powermenu && shutdown now"
|
||||
"⏻")
|
||||
)
|
||||
(box :class "reboot-btn-box"
|
||||
:orientation "h"
|
||||
(button :class "btn"
|
||||
:tooltip "Reboot"
|
||||
:onclick "eww close powermenu && reboot"
|
||||
"")
|
||||
)
|
||||
(box :class "exit-btn-box"
|
||||
:orientation "h"
|
||||
(button :class "btn"
|
||||
:tooltip "Suspend"
|
||||
:onclick "systemctl suspend"
|
||||
"⏾")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow powermenu
|
||||
:monitor 0
|
||||
:geometry (geometry :x "0%"
|
||||
:y "0%"
|
||||
:width "30%"
|
||||
:height "15%"
|
||||
:anchor "center center")
|
||||
:wm-ignore true
|
||||
(powermenucontent))
|
||||
|
||||
(deflisten workspaces_listen "./scripts/workspaces.sh")
|
||||
(defwidget workspaces []
|
||||
(literal :content workspaces_listen))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue