From 43f41958f5c4a270d4ca528504b68d3d6f95b3a0 Mon Sep 17 00:00:00 2001 From: Michel Fedde Date: Sat, 15 Mar 2025 13:32:20 +0100 Subject: [PATCH] Adds yay updater --- .config/waybar/ModulesCustom.json | 10 ++++++++++ .config/waybar/config | 1 + .config/waybar/scss/style.scss | 9 ++++++++- .config/waybar/style.css | 8 +++++++- .config/yadm/bootstrap.d/11-DesktopEnv.sh | 2 +- 5 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.config/waybar/ModulesCustom.json b/.config/waybar/ModulesCustom.json index b0468ee..d7c7c12 100644 --- a/.config/waybar/ModulesCustom.json +++ b/.config/waybar/ModulesCustom.json @@ -200,5 +200,15 @@ "custom/hypr-class": { "format": "󰲌 ", "on-click": "hyprctl activewindow | grep 'class:' | awk -F': ' '{print $2}' | wl-copy -n" + }, + "custom/updates": { + "format": "{icon}{0}", + "return-type": "json", + "format-icons": { + "pending-updates": " ", + "updated": " " + }, + "exec-if": "which waybar-updates", + "exec": "waybar-updates" } } diff --git a/.config/waybar/config b/.config/waybar/config index 5ea1c59..19d73df 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -33,6 +33,7 @@ "modules-right": [ "network#speed", + "custom/updates", "group/laptop", "custom/separator#line", "tray", diff --git a/.config/waybar/scss/style.scss b/.config/waybar/scss/style.scss index 080ff23..3fcedc7 100644 --- a/.config/waybar/scss/style.scss +++ b/.config/waybar/scss/style.scss @@ -96,7 +96,10 @@ window#waybar { #custom-weather.severe, #custom-weather.showyIcyDay, #custom-weather.snowyIcyNight, -#custom-weather.sunnyDay { +#custom-weather.sunnyDay, +#custom-updates, +#custom-updates.pending-updates +{ color: $foreground; padding: 3px 6px 3px 6px; } @@ -200,3 +203,7 @@ window#waybar { #custom-swaync:hover { background-color: $green; } + +#custom-updates.pending-updates { + background-color: dodgerblue; +} diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 7e26482..75de769 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -85,7 +85,9 @@ window#waybar { #custom-weather.severe, #custom-weather.showyIcyDay, #custom-weather.snowyIcyNight, -#custom-weather.sunnyDay { +#custom-weather.sunnyDay, +#custom-updates, +#custom-updates.pending-updates { color: #d5c4a1; padding: 3px 6px 3px 6px; } @@ -190,4 +192,8 @@ window#waybar { background-color: #b8bb26; } +#custom-updates.pending-updates { + background-color: dodgerblue; +} + /*# sourceMappingURL=style.css.map */ diff --git a/.config/yadm/bootstrap.d/11-DesktopEnv.sh b/.config/yadm/bootstrap.d/11-DesktopEnv.sh index dab1924..b5c00e6 100755 --- a/.config/yadm/bootstrap.d/11-DesktopEnv.sh +++ b/.config/yadm/bootstrap.d/11-DesktopEnv.sh @@ -16,7 +16,7 @@ fi if [ $XDG_SESSION_DESKTOP = "Hyprland" ]; then yay -S --needed hyprland \ - waybar \ + waybar waybar-updates \ hyprlock \ swww \ hyprswitch \