mirror of
https://github.com/d3m0k1d/dots.git
synced 2026-03-15 02:12:43 +00:00
Add my dots
This commit is contained in:
24
.config/waybar/scripts/myUpdates.sh
Executable file
24
.config/waybar/scripts/myUpdates.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
format() {
|
||||
if [ "$1" -eq 0 ]; then
|
||||
echo '-'
|
||||
else
|
||||
echo "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
if ! updates_arch="$(checkupdates | wc -l)"; then
|
||||
updates_arch=0
|
||||
fi
|
||||
|
||||
if ! updates_aur="$(yay -Qum 2>/dev/null | wc -l)"; then
|
||||
updates_aur=0
|
||||
fi
|
||||
|
||||
updates="$((updates_arch + updates_aur))"
|
||||
|
||||
if [ "$updates" -gt 0 ]; then
|
||||
echo " ($(format $updates_arch)/$(format $updates_aur))"
|
||||
else
|
||||
echo
|
||||
fia
|
||||
Reference in New Issue
Block a user