Improve archlinux checkupdate stuff
This commit is contained in:
parent
e11fd1a774
commit
c95a15afe8
2 changed files with 2 additions and 11 deletions
|
@ -12,7 +12,7 @@
|
|||
|
||||
[module/check-arch-updates]
|
||||
type = custom/script
|
||||
exec = cat $HOME/.cache/archlinux-updates.txt
|
||||
exec = cat $HOME/.cache/archlinux-updates.txt | wc -l | sed 's/^0$//'
|
||||
interval = 30
|
||||
|
||||
format-prefix = " "
|
||||
|
@ -20,6 +20,6 @@
|
|||
format-underline = #1794D1
|
||||
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%
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue