nixos/modules/hyprland/eww/config/eww.yuck

65 lines
No EOL
1.1 KiB
Text

; inspired by https://github.com/saimoomedits/eww-widgets/tree/main
(include "widgets/workspaces/eww.yuck")
(include "widgets/window-title/eww.yuck")
(include "widgets/resources/eww.yuck")
(defwidget left []
(box
:space-evenly false
:halign "start"
:class "container"
(label :text "" :class "nixos-icon")
(workspaces)
))
(defwidget center []
(box
:space-evenly false
:halign "center"
:class "container"
:visible {strlength(window) != 0}
(windowtitle)
))
(defwidget right []
(box
:space-evenly false
:halign "end"
:class "container"
(systray)
(volume)
(cpu)
(mem)
(network)
(bluetooth)
(datetime)
))
(defwidget top-bar-oled []
(centerbox
:class "oled"
(left)
(right)
)
)
(defwidget top-bar-non-oled []
(centerbox
:class "non-oled"
(left)
(center)
(right)
)
)
(defwindow top-bar [oled]
:monitor 0
:geometry (geometry :x "0%"
:y "10px"
:width "98.8%"
:height "30px"
:anchor "top center")
:stacking "fg"
:exclusive true
(literal :content {oled ? "(top-bar-oled)" : "(top-bar-non-oled)"})
)