dots-of-war/eww-laptop/.config/eww/eww.yuck

44 lines
1.3 KiB
Text
Raw Permalink Normal View History

2023-03-16 16:35:34 +00:00
(deflisten workspaces :initial "[]" "bash ./scripts/get-workspaces")
(deflisten current_workspace :initial "1" "bash ./scripts/get-active-workspace")
2024-04-20 12:48:48 +00:00
(defpoll time :interval "1s" "date '+%d.%m.%Y - %H:%M:%S'")
2023-03-16 16:26:29 +00:00
(defwidget workspaces []
(eventbox :halign "start"
:onscroll "bash ${EWW_CONFIG_DIR}/scripts/change-active-workspace {} ${current_workspace}"
:class "workspaces-widget"
(box :space-evenly true
(for workspace in workspaces
(eventbox :onclick "hyprctl dispatch workspace ${workspace.id}"
2023-03-16 16:35:34 +00:00
(label :class {workspace.id == current_workspace ? "current" : ""}
:text " ${workspace.windows > 0 ? "◆" : "◇"} "))))))
2023-03-16 16:26:29 +00:00
(defwidget bar []
(centerbox :class "bar"
(workspaces)
"${time}"
(box :halign "end"
:space-evenly true
:width "150"
"󰁹 ${EWW_BATTERY["BAT1"].capacity}%"
"󰍛 ${round(EWW_RAM.used_mem_perc, 0)}%"
"󰻠 ${round(EWW_CPU.avg, 0)}%")))
2024-04-20 12:48:48 +00:00
2023-03-16 16:26:29 +00:00
(defwindow bar
:monitor 0
:geometry (geometry :x 0 :y 0 :width "100%" :height "30px" :anchor "top center")
:stacking "fg"
:exclusive true
(bar))
2024-01-28 11:48:42 +00:00
2024-04-20 12:48:48 +00:00
(defwindow test
:monitor 0
:exclusive true
:geometry (geometry :x 0 :y 0 :width "100%" :height "20px" :anchor "top center")
(box
"${EWW_NET["enp34s0"]}"
(tooltip
"${time}"
(button "test"))))