From f24f6ea00f245e0ba1e593f954267f7eefd59c8a Mon Sep 17 00:00:00 2001 From: Sam Nystrom Date: Tue, 13 Jan 2026 18:07:21 -0500 Subject: update eww config --- .config/eww/bar.yuck | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to '.config/eww/bar.yuck') diff --git a/.config/eww/bar.yuck b/.config/eww/bar.yuck index a691155..d6bfc28 100644 --- a/.config/eww/bar.yuck +++ b/.config/eww/bar.yuck @@ -3,7 +3,7 @@ (defpoll song :initial "" :interval "5s" `rmpc song`) (deflisten cava :initial "" `cava -p ~/.config/eww/cava.ini | python3 ~/.config/eww/cava.py`) -(defwindow bar +(defwindow bar [output] :monitor 0 :geometry (geometry :x "0%" :y "8px" @@ -13,30 +13,32 @@ :stacking "fg" :exclusive true :focusable false - (bar)) + (bar :output output)) -(defwidget bar [] +(defwidget bar [output] (centerbox :orientation "h" :class "bar" - (tags) - (center) + (tags :output output) + (music) (status))) -(defwidget tags [] +(defwidget tags [output] (box :orientation "h" :halign "start" :class "tags" (for tag in "[1, 2, 3, 4, 5, 6, 7, 8, 9]" (button :onclick `riverctl set-focused-tags $(dc -e"2 ${tag} 1- ^p")` - :class {jq(tags_json, `.[] | select(.id == ${tag}) | {focused, occupied} | to_entries | map(select(.value) | .key) | join(" ") | {"class": .}`).class})))) + :class {jq(tags_json, `.[] | select(.output == "${output}" and .id == ${tag}) | {focused, occupied} | to_entries | map(select(.value) | .key) | join(" ") | {"class": .}`).class})))) - -(defwidget center [] +(defwidget music [] (box :orientation "h" :spacing 4 :space-evenly false :class "music" - (label :text "${song.metadata.artist} - ${song.metadata.title}" :class "song") + (label :text "${song.metadata.artist} - ${song.metadata.title}" + :class "song" + :show-truncated true + :limit-width 55) (label :text {cava} :class "cava"))) @@ -60,18 +62,18 @@ :class "status" :spacing 8 :space-evenly false - (revealer-on-hover :var showvol - :varname "showvol" - :icon "a" - :transition "slideleft" - :class "volume" - (scale :orientation "h" - :min 0 - :max 1 - :value {volume} - :onchange `wpctl set-volume @DEFAULT_SINK@ {}`) - (label :text "${matches(volume, "MUTED") ? " " : volume == 0 ? "" : volume < 50 ? "" : " "} ${volume}%" - :class "volume")) + ;(revealer-on-hover :var showvol + ;:varname "showvol" + ;:icon "a" + ;:transition "slideleft" + ;:class "volume" + ;(scale :orientation "h" + ;:min 0 + ;:max 1 + ;:value {volume} + ;:onchange `wpctl set-volume @DEFAULT_SINK@ {}`) + (label :text "${matches(volume, "MUTED") ? " " : volume == 0 ? "" : volume < 50 ? "" : " "} ${volume}%" + :class "volume") (label :text "${ssid == "" ? "󰖪" : "󰖩"} ${ssid}" :class "network") (label :text " ${brightness}%" -- cgit v1.2.3