chore: Migrate from waybar to eww

Very early state
This commit is contained in:
ziro 2023-12-27 13:48:26 +07:00
parent 6206bbffb9
commit e0409a6619
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 39 additions and 1 deletions

37
.config/eww/eww.yuck Normal file
View file

@ -0,0 +1,37 @@
;; Listeners
(deflisten active-workspace
`stdbuf -oL $HOME/.local/bin/scripts/eww-hyprland-active-workspace-listener`)
(deflisten workspace-list :initial '[1]'
`stdbuf -oL $HOME/.local/bin/scripts/eww-hyprland-workspace-list-listener`)
;; Windows
(defwindow bar
:monitor 0
:stacking "fg"
:exclusive true
:geometry (geometry :width "100%" :height "28px" :anchor "top center")
(bar))
(defwidget bar []
(centerbox
(start)
(middle)
(end)))
(defwidget start []
(workspaces))
(defwidget middle []
(literal :content "test"))
(defwidget end []
(literal :content "test"))
(defwidget workspaces []
(box :class "workspaces"
:space-evenly false
(for id in workspace-list
(button :class {active-workspace == id ? "active" : ""}
:onclick `hyprctl dispatch workspace ${id}`
id))))