nixos-dotfiles/users/ultra/configs/eww/eww.yuck
Alex Stan 646db4783b eww go brrr
Signed-off-by: Alex Stan <stan.alexandru@ichb.ro>
2023-06-05 18:41:44 +03:00

56 lines
1.2 KiB
Plaintext

(defwindow bar
:monitor 0
:windowtype "dock"
:stacking "fg"
:exclusive true
:position "left"
:reserve (struts :distance "4%" :side "left")
:class "bar"
:valign "start"
; :spacing "4px"
:geometry ( geometry :width "2%"
:height "99%"
:x "8px"
:y "0%"
:anchor "left center" )
(box
:orientation "v"
:valign "start"
:halign "center"
:space-evenly true
:spacing 5
(time)
(workspaces)
)
;(greeter :text "Amogus"
; :name "Sus")
)
(defwidget time []
(box
:class "time"
time))
(defpoll time :interval "1s"
`date +'%I
%M
%S
%p'`)
(defvar workspace_nums "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]")
(defwidget workspaces []
(box :class "workspaces"
:orientation "v"
:space-evenly true
:halign "start"
:spacing 10
(for num in workspace_nums
(workspace :number num))))
(defwidget workspace [number]
(box :class { number == curr_workspace ? "active_workspace" : "workspace" }
(button :onclick "hyprctl dispatch workspace ${number}" number)))
(defpoll curr_workspace :interval "0s"
`hyprctl activeworkspace -j | jq '.id'`)