mirror of
https://github.com/ksyasuda/rice.git
synced 2025-07-31 14:36:10 -07:00
fix rofi bluetooth and add weather module
integrated weather module with date/time module instead of making its own section
This commit is contained in:
28
polybar-themes/sblocks/scripts/package-updates
Executable file
28
polybar-themes/sblocks/scripts/package-updates
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env 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="$(paru -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))"
|
||||
# echo " ($(format $updates_arch)/$(format $updates_aur))"
|
||||
# dunstify -i "/usr/share/icons/breeze-dark/mimetypes/24/package-x-generic.svg" " Outdated Packages: ($(format $updates_arch)/$(format $updates_aur))"
|
||||
# dunstify -i "/usr/share/icons/breeze-dark/mimetypes/24/package-x-generic.svg" "Outdated Packages: ($(format $updates_arch)/$(format $updates_aur))"
|
||||
echo "%{B#ecbe7b} %{B-}%{B#464b55} ($(format $updates_arch)/$(format $updates_aur)) %{B-}"
|
||||
else
|
||||
echo
|
||||
fi
|
Reference in New Issue
Block a user