mirror of
https://github.com/ksyasuda/rice.git
synced 2024-10-28 09:04:10 -07:00
update color
This commit is contained in:
parent
e8d27623fc
commit
4aac865473
@ -1,28 +1,28 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
format() {
|
format() {
|
||||||
if [ "$1" -eq 0 ]; then
|
if [ "$1" -eq 0 ]; then
|
||||||
echo '-'
|
echo '-'
|
||||||
else
|
else
|
||||||
echo "$1"
|
echo "$1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! updates_arch="$(checkupdates | wc -l)"; then
|
if ! updates_arch="$(checkupdates | wc -l)"; then
|
||||||
updates_arch=0
|
updates_arch=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! updates_aur="$(paru -Qum 2> /dev/null | wc -l)"; then
|
if ! updates_aur="$(paru -Qum 2> /dev/null | wc -l)"; then
|
||||||
updates_aur=0
|
updates_aur=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
updates="$((updates_arch + updates_aur))"
|
updates="$((updates_arch + updates_aur))"
|
||||||
|
|
||||||
if [ "$updates" -gt 0 ]; then
|
if [ "$updates" -gt 0 ]; then
|
||||||
#echo " ($(format $updates_arch)/$(format $updates_aur))"
|
#echo " ($(format $updates_arch)/$(format $updates_aur))"
|
||||||
# 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))"
|
||||||
# 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#d19a66} %{B-}%{B#464b55} ($(format $updates_arch)/$(format $updates_aur)) %{B-}"
|
echo "%{B#6C77BB} %{B-}%{B#464b55} ($(format $updates_arch)/$(format $updates_aur)) %{B-}"
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
@ -325,7 +325,7 @@ type = custom/ipc
|
|||||||
interval = 400
|
interval = 400
|
||||||
hook-0 = ~/SudacodeRice/polybar-themes/sblocks/scripts/package-updates
|
hook-0 = ~/SudacodeRice/polybar-themes/sblocks/scripts/package-updates
|
||||||
format-padding = 1
|
format-padding = 1
|
||||||
format-background = ${color.yellow}
|
format-background = ${color.indigo}
|
||||||
format-overline = ${color.background}
|
format-overline = ${color.background}
|
||||||
format-underline = ${color.background}
|
format-underline = ${color.background}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user