From 38371d0519fdf9bcc25f302de78b3f4e27f82b0a Mon Sep 17 00:00:00 2001 From: Joachim Nielandt Date: Mon, 8 Nov 2021 11:16:49 +0100 Subject: [PATCH] Cleaned up updates in polybar. --- dot_dotfiles/polybar/config.tmpl | 6 +++++- .../updates-aurhelper/executable_updates-aurhelper.sh | 2 +- .../updates-pacman/executable_updates-pacman.sh | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dot_dotfiles/polybar/config.tmpl b/dot_dotfiles/polybar/config.tmpl index dac7b21..b7ead0a 100644 --- a/dot_dotfiles/polybar/config.tmpl +++ b/dot_dotfiles/polybar/config.tmpl @@ -103,7 +103,7 @@ bottom = false ;border-right-size = 16 ;unused modules - mpd xbacklight backlight-acpi alsa modules-left = i3 -modules-center = temperature battery xkeyboard memory cpu filesystem updates-aurhelper reboot-check xbacklight top-process +modules-center = temperature battery xkeyboard memory cpu filesystem updates-pacman updates-aurhelper reboot-check xbacklight top-process modules-right = net wifi0 vpn powermenu ; TRAY MANAGEMENT @@ -388,11 +388,15 @@ label = %percentage_used%% [module/updates-pacman] type = custom/script +format-prefix=" " +format-prefix-foreground = ${colors.bright_green} exec = ~/.dotfiles/polybar/polybar-scripts/updates-pacman/updates-pacman.sh interval = 600 [module/updates-aurhelper] type = custom/script +format-prefix=" " +format-prefix-foreground = ${colors.bright_green} exec = ~/.dotfiles/polybar/polybar-scripts/updates-aurhelper/updates-aurhelper.sh interval = 600 diff --git a/dot_dotfiles/polybar/polybar-scripts/updates-aurhelper/executable_updates-aurhelper.sh b/dot_dotfiles/polybar/polybar-scripts/updates-aurhelper/executable_updates-aurhelper.sh index 5dfa63b..3a3ab07 100644 --- a/dot_dotfiles/polybar/polybar-scripts/updates-aurhelper/executable_updates-aurhelper.sh +++ b/dot_dotfiles/polybar/polybar-scripts/updates-aurhelper/executable_updates-aurhelper.sh @@ -10,7 +10,7 @@ if ! updates=$(yay -Qum 2> /dev/null | wc -l); then fi if [ "$updates" -gt 0 ]; then - echo "# $updates" + echo "$updates" else echo "" fi diff --git a/dot_dotfiles/polybar/polybar-scripts/updates-pacman/executable_updates-pacman.sh b/dot_dotfiles/polybar/polybar-scripts/updates-pacman/executable_updates-pacman.sh index 3c0a27d..3d9b8c7 100644 --- a/dot_dotfiles/polybar/polybar-scripts/updates-pacman/executable_updates-pacman.sh +++ b/dot_dotfiles/polybar/polybar-scripts/updates-pacman/executable_updates-pacman.sh @@ -5,7 +5,7 @@ if ! updates=$(checkupdates 2> /dev/null | wc -l ); then fi if [ "$updates" -gt 0 ]; then - echo "# $updates" + echo "$updates" else echo "" fi