From 9612ff6b70bfdfc3cfcb06aed28aed43ad006736 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Thu, 2 Jan 2025 13:27:54 -0600 Subject: [PATCH] refactor(waybar): remove pacman update --- users/price/dots/.config/waybar/config | 9 -------- .../scripts/get-pacman-package-updates.bash | 23 ------------------- users/price/dots/.config/waybar/style.css | 6 ----- 3 files changed, 38 deletions(-) delete mode 100755 users/price/dots/.config/waybar/scripts/get-pacman-package-updates.bash diff --git a/users/price/dots/.config/waybar/config b/users/price/dots/.config/waybar/config index a52841e5..735ddbe7 100644 --- a/users/price/dots/.config/waybar/config +++ b/users/price/dots/.config/waybar/config @@ -19,7 +19,6 @@ "custom/media" ], "modules-right": [ - "custom/pacman-update", "systemd-failed-units", "tray", "backlight", @@ -207,14 +206,6 @@ "on-click": "playerctl play-pause", "exec": "~/.config/waybar/scripts/get-media.bash" }, - "custom/pacman-update": { - "return-type": "json", - "exec": "~/.config/waybar/scripts/get-pacman-package-updates.bash", - "format": "󰇚 {}", - "tooltip": true, - "interval": 3600, - "signal": 8 - }, "wlr/taskbar": { "format": "{icon}", "icon-size": 12, diff --git a/users/price/dots/.config/waybar/scripts/get-pacman-package-updates.bash b/users/price/dots/.config/waybar/scripts/get-pacman-package-updates.bash deleted file mode 100755 index dd23640c..00000000 --- a/users/price/dots/.config/waybar/scripts/get-pacman-package-updates.bash +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -main() { - set -o pipefail - local package_updates - package_updates="$(checkupdates | cut -d " " -f1)" - - if [[ "${?}" != 0 ]]; then - return 0 - fi - - package_update_number="$(wc -l <<<"${package_updates}")" - - # Limit the number of results shown to ten, add trailing ellipsis - package_updates="$(printf "%s" "${package_updates}" | head -n 10)" - if ((package_update_number > 10)); then - package_updates+="\n..." - fi - - printf '{"text": "%s", "tooltip": "%s"}\n' "${package_update_number}" "${package_updates//$'\n'/\\n}" -} - -main diff --git a/users/price/dots/.config/waybar/style.css b/users/price/dots/.config/waybar/style.css index e5f5bcdc..dda1732b 100644 --- a/users/price/dots/.config/waybar/style.css +++ b/users/price/dots/.config/waybar/style.css @@ -68,7 +68,6 @@ #submap, tooltip, tooltip label, -#custom-pacman-update, #taskbar, #tray, #backlight, @@ -264,11 +263,6 @@ tooltip { background: #98bb6c; } -/* Pacman Updates */ -#custom-pacman-update { - color: #7e9cd8; -} - #systemd-failed-units.ok { color: #98BB6C; }