chore: Add datetime

This commit is contained in:
ziro 2023-12-27 14:16:58 +07:00
parent e0409a6619
commit 8150baf7fb
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -5,6 +5,9 @@
(deflisten workspace-list :initial '[1]' (deflisten workspace-list :initial '[1]'
`stdbuf -oL $HOME/.local/bin/scripts/eww-hyprland-workspace-list-listener`) `stdbuf -oL $HOME/.local/bin/scripts/eww-hyprland-workspace-list-listener`)
(deflisten datetime
`stdbuf -oL $HOME/.local/bin/scripts/eww-datetime-listener`)
;; Windows ;; Windows
(defwindow bar (defwindow bar
:monitor 0 :monitor 0
@ -23,10 +26,13 @@
(workspaces)) (workspaces))
(defwidget middle [] (defwidget middle []
(literal :content "test")) (label :text "test"))
(defwidget end [] (defwidget end []
(literal :content "test")) (box :halign "end"
:class "end"
:space-evenly false
(clock)))
(defwidget workspaces [] (defwidget workspaces []
(box :class "workspaces" (box :class "workspaces"
@ -35,3 +41,12 @@
(button :class {active-workspace == id ? "active" : ""} (button :class {active-workspace == id ? "active" : ""}
:onclick `hyprctl dispatch workspace ${id}` :onclick `hyprctl dispatch workspace ${id}`
id)))) id))))
(defwidget clock []
(pair :icon "a" :text {datetime.full})))
(defwidget pair [icon text]
(box :width 70
:space-evenly false
(label :text icon)
(label :text text)))