dotfiles/homes/x86_64-linux/christopher@cobalt/fixtures/eww/eww.yuck
Christopher Mühl 786af32daf
Publish my config
This is the result of ~100 commits to my NixOS config. Since I haven't
always used `agenix-rekey`, this is another initial commit so that none
of the secrets in my git history are leaked
2025-07-30 23:36:39 +02:00

96 lines
2.5 KiB
Text

(include './variables.yuck')
(defwidget workspaceButton [workspace]
(box
(eventbox
:class "workspaceButton icon gradient-${workspace.id} ${workspace.id == activeWorkspace ? 'active' : ''} ${workspace.windows == 0 ? 'empty' : ''}"
:cursor "pointer"
; :visible {workspace.windows != 0 || workspace.id == activeWorkspace}
"${workspace.name}")))
(defwidget applauncher []
(box
(eventbox
:class "icon gradient-10 applauncher"
:cursor "pointer"
:onclick "tofi-drun | xargs hyprctl dispatch exec --"
"\\ue196")))
(defwidget left []
(box :class "box" :space-evenly false
(applauncher)
(box :style "padding-left: 25px;" :spacing 8
(for space in workspaces
(workspaceButton :workspace space)))))
(defwidget sysinfo []
(box :space-evenly false :class "sys"
(children)))
(defwidget system []
(box :space-evenly false :spacing 8
(sysinfo
(label
:class "icon intern bg-teal color-crust"
:text "\\uf2db")
(box :class "bg-crust color-text" :space-evenly false
"${round(EWW_CPU.avg, 2)} %"
(label
:class "color-overlay0"
:style "padding: 0;"
:text " |")
"${temps.cpu}"))
(sysinfo
(label
:class "icon intern bg-maroon color-base"
:text "\\uf538")
(label
:class "bg-surface0 color-text"
:text "${memory.used}"))
(sysinfo
(label
:class "icon intern bg-surface1 color-blue"
:text "\\uf0a0")
(label
:class "bg-surface2 color-text"
:text "${round(EWW_DISK["/"].used_perc, 2)} %"))
(sysinfo
(label :class "icon color-overlay2" :text "\\uf1b2")
(label
:class "color-overlay2"
:style "padding-left: 0;"
:text "${pkgCount}"))))
(defwidget right []
(box :spacing 20 :halign "end" :hexpand true :space-evenly false
(box :class "box"
(system))
(box :class "box time" :space-evenly false :spacing 10
(label
:valign "center"
:class "icon gradient-5"
:text "\\uf017")
(label
:valign "center"
:text "${time.hour}:${time.min}")
(label
:valign "center"
:class "date"
:text "${date}"))))
(defwidget layout []
(box
:class "layout"
:orientation "horizontal"
:space-evenly false
(left)
(right)))
(defwindow spraggins
:monitor 0
:stacking "bg"
:windowtype "normal"
:wm-ignore true
:exclusive true
:geometry (geometry :width "100%" :height "45")
(layout))