Improve waybar custom scripts
This commit is contained in:
parent
adc39bd74d
commit
018c576357
4 changed files with 12 additions and 4 deletions
.config/waybar/custom
7
.config/waybar/custom/pacman
Executable file
7
.config/waybar/custom/pacman
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
updates=$(checkupdates)
|
||||
text=$(echo "$updates" | wc -l)
|
||||
tooltip=$(echo "$updates" | sed 's/$/\\n/' | tr -d '\n' | sed 's/\\n$//')
|
||||
|
||||
echo "{\"text\": \"$text\", \"tooltip\": \"$tooltip\"}"
|
Loading…
Add table
Add a link
Reference in a new issue