From 7078e5b872b3b0ade8f828094ff60b73733cec1a Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 20 Dec 2024 11:03:50 -0600 Subject: [PATCH 1/2] Add systray to eww bar --- modules/home-manager/eww/eww.scss | 2 +- modules/home-manager/eww/eww.yuck | 19 +++++++++++-------- modules/home-manager/sway.nix | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/modules/home-manager/eww/eww.scss b/modules/home-manager/eww/eww.scss index 9902fbc..78e8a1d 100644 --- a/modules/home-manager/eww/eww.scss +++ b/modules/home-manager/eww/eww.scss @@ -38,7 +38,7 @@ $rosewater: #f5e0dc; font-size: 12.0pt; } -.sidestuff slider { +.leftsidestuff slider { color: $sapphire; } diff --git a/modules/home-manager/eww/eww.yuck b/modules/home-manager/eww/eww.yuck index 139c3ea..d9c47f4 100644 --- a/modules/home-manager/eww/eww.yuck +++ b/modules/home-manager/eww/eww.yuck @@ -1,8 +1,9 @@ (defwidget bar [] (centerbox :orientation "h" - (sidestuff) + (leftsidestuff) (box) - (music))) + (rightsidestuff) + )) (defwindow bar0 :monitor 0 @@ -30,14 +31,16 @@ :anchor "bottom center") (bar)) -(defwidget sidestuff [] - (box :class "sidestuff" :orientation "h" :space-evenly false :halign "start" :valign "center" :spacing 10 - time - ; TODO: indicator/tray/taskbar/toolbar icons and management? (probably should use something standalone?) - ; https://github.com/elkowar/eww/issues/111 +(defwidget rightsidestuff [] + (box :class "rightsidestuff" :orientation "h" :space-evenly false :halign "end" :valign "center" :spacing 10 + (music) + (systray) + )) +(defwidget leftsidestuff [] + (box :class "leftsidestuff" :orientation "h" :space-evenly false :halign "start" :valign "center" :spacing 10 + time ; TODO: idle inhibitor? - ; TODO: hyprland workspaces? ; TODO: get these to align properly? icons seem lower than they should be? (box :class "mic" ( box :class {micMuted == "false" ? "live" : "muted"} {micMuted == "false" ? " " : " "} diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix index 20d729d..c5ccab4 100644 --- a/modules/home-manager/sway.nix +++ b/modules/home-manager/sway.nix @@ -43,7 +43,7 @@ border-color=${urgent} [urgency=high] - background-color=${urgent}AA + background-color=${urgent}EE border-color=${urgent} text-color=${bg} ''; From 5149e4aef061ae045956b5f1c9e4d17a47873565 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 20 Dec 2024 11:07:00 -0600 Subject: [PATCH 2/2] Fix memory icon --- modules/home-manager/eww/eww.yuck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home-manager/eww/eww.yuck b/modules/home-manager/eww/eww.yuck index d9c47f4..e24f8d5 100644 --- a/modules/home-manager/eww/eww.yuck +++ b/modules/home-manager/eww/eww.yuck @@ -51,7 +51,7 @@ ) {"${volume}%"} ) {" ${round(EWW_CPU["avg"], 0)}%"} - {" ${round(EWW_RAM["used_mem_perc"], 0)}%"} + {" ${round(EWW_RAM["used_mem_perc"], 0)}%"} ; TODO: have these "widgets" be omitted entirely instead of just empty strings {(showBrightness == "true") ? (" ${brightness}%") : ""} {(showBattery == "true") ? ("󱊣 ${EWW_BATTERY["BAT1"]["capacity"]}% (${batteryTime})") : ""}