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:
22
.config/waybar/scripts/myupdate.sh
Executable file
22
.config/waybar/scripts/myupdate.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkgmgr="pacman"
|
||||
hash paru 2>/dev/null && pkgmgr="paru"
|
||||
hash yay 2>/dev/null && pkgmgr="yay"
|
||||
|
||||
IFS=$'\n'$'\r'
|
||||
|
||||
updatesli=($($pkgmgr -Qu))
|
||||
text=${#updatesli[@]}
|
||||
icon=""
|
||||
[ $text -eq 0 ] && icon="" || icon="📦"
|
||||
|
||||
for i in ${updatesli[@]}
|
||||
do
|
||||
tooltip+="$i\n"
|
||||
done
|
||||
|
||||
cat << EOF
|
||||
{ "text":"$icon", "tooltip":"UPDATES: $text"}
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user