Improve waybar custom scripts
This commit is contained in:
parent
adc39bd74d
commit
018c576357
4 changed files with 12 additions and 4 deletions
|
@ -61,7 +61,7 @@ animations {
|
|||
bezier = overshot, 0.05, 0.9, 0.1, 1.1
|
||||
|
||||
animation = windows, 1, 3, overshot, slide
|
||||
animation = fade, 1, 6, default
|
||||
animation = fade, 0, 6, default
|
||||
animation = border, 1, 6, default
|
||||
animation = workspaces, 1, 6, overshot, slide
|
||||
}
|
||||
|
|
|
@ -78,12 +78,13 @@
|
|||
"custom/pacman": {
|
||||
"format": " {}",
|
||||
"interval": 3600,
|
||||
"exec": "checkupdates | wc -l",
|
||||
"on-click": "alacritty -e 'archlinux-update'; pkill -SIGRTMIN+8 waybar",
|
||||
"exec": "~/.config/waybar/custom/pacman",
|
||||
"on-click": "alacritty -e 'archlinux-update; pkill -SIGRTMIN+8 waybar'",
|
||||
"return-type": "json",
|
||||
"signal": 8
|
||||
},
|
||||
"custom/weather": {
|
||||
"exec": "~/.config/waybar/wttr.py",
|
||||
"exec": "~/.config/waybar/custom/weather",
|
||||
"return-type": "json",
|
||||
"format": "{}",
|
||||
"tooltip": true,
|
||||
|
|
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…
Reference in a new issue