Improve archlinux checkupdate stuff

This commit is contained in:
Tobias Reisinger 2020-12-23 16:37:11 +01:00
parent e11fd1a774
commit c95a15afe8
2 changed files with 2 additions and 11 deletions

View file

@ -12,7 +12,7 @@
[module/check-arch-updates] [module/check-arch-updates]
type = custom/script type = custom/script
exec = cat $HOME/.cache/archlinux-updates.txt exec = cat $HOME/.cache/archlinux-updates.txt | wc -l | sed 's/^0$//'
interval = 30 interval = 30
format-prefix = " " format-prefix = " "
@ -20,6 +20,6 @@
format-underline = #1794D1 format-underline = #1794D1
format = <label> format = <label>
click-left = alacritty -e sh -c "$HOME/.local/bin/archlinux-update; $HOME/.local/bin/archlinux-check-updates > $HOME/.cache/archlinux-updates.txt; read" & click-left = alacritty -e sh -c "$HOME/.local/bin/archlinux-update; checkupdates > $HOME/.cache/archlinux-updates.txt; read" &
label = %output% label = %output%

View file

@ -1,9 +0,0 @@
#!/bin/sh
pkg_updates_count=$(checkupdates 2> /dev/null | wc -l)
if [ $((pkg_updates_count)) -gt 0 ]
then
echo $pkg_updates_count
else
echo ""
fi