More eww styling

This commit is contained in:
2024-05-12 23:05:31 +02:00
parent acfeed782e
commit 517b4499e1
3 changed files with 82 additions and 48 deletions

View File

@ -1,13 +1,11 @@
(defwindow bar0
:monitor 0
:geometry (geometry :y "0%"
:x "3px"
:height "90%"
:width "50px"
:geometry (geometry :height "100%"
:width "40px"
:anchor "center left")
:stacking "fg"
:exclusive true
(centerbox :orientation "v"
(centerbox :orientation "v" :active true :class "sidebar"
(workspaces)
(middle)
(bottom)
@ -15,15 +13,14 @@
(defwindow bar1
:monitor 1
:geometry (geometry :y "0%"
:x "3px"
:height "90%"
:geometry (geometry :height "100%"
:width "50px"
:anchor "center left")
:stacking "fg"
:exclusive true
(box :orientation "v" :space-evenly: false
(centerbox :orientation "v" :active true :class "sidebar"
(workspaces)
(middle)
(bottom)
))
@ -45,6 +42,7 @@
(box :class "thingy" (systray :orientation "v"))
(date)
(clock)
(pwr)
))
(defwidget workspaces []
@ -111,7 +109,7 @@
(calendar :class "calendar")
(button :onclick "ba gnome-calendar"
:hexpand true
:class "thingy date"
:class "thingy date clickable"
(box :orientation "v"
(label :text current_month)
(label :text current_day)
@ -125,7 +123,32 @@
(label :text current_minute)
))
(defwidget pwr []
(button :orientation "v"
:valign "end"
:class "thingy pwrbtn clickable"
:onclick "${EWW_CMD} open --toggle pwrctl"
(label :text "⏻")
))
(defwindow pwrctl
:monitor 0
:geometry (geometry :y "5%"
:x "20px"
:height "200px"
:width "300px"
:anchor "bottom left")
:stacking "fg"
;:exclusive true
(box :orientation "v"
:valign "end"
:class "thingy"
(label :text "SLEEP")
(label :text "OFF")
))
(defvar show_volume false)
(defpoll workspaces_json :interval "1s" "eww-workspaces")
(defpoll volume_out :interval "1s" "pamixer --get-volume")
(defpoll vpn_status :interval "1s" "mullvad-status")