mirror of
https://github.com/nboughton/dotfiles
synced 2024-11-22 23:51:57 +01:00
checking for run safety needs work
This commit is contained in:
parent
d018ec534b
commit
9320218641
@ -122,9 +122,9 @@
|
||||
"format": " {}",
|
||||
"return-type": "json",
|
||||
"interval": 3600, // every hour
|
||||
"exec": "go run ~/.config/waybar/modules/update-check.go",
|
||||
"exec-if": "exit 0",
|
||||
"on-click": "~/.config/waybar/modules/update-system.sh; pkill -RTMIN+8 waybar",
|
||||
"exec": "go run ~/.config/waybar/modules/updates/update-check.go",
|
||||
"exec-if": "~/.config/waybar/modules/updates/update-run.sh",
|
||||
"on-click": "~/.config/waybar/modules/updates/update-system.sh; pkill -RTMIN+8 waybar",
|
||||
"signal": 8,
|
||||
"tooltip": true
|
||||
},
|
||||
|
12
waybar/modules/updates/update-run.sh
Executable file
12
waybar/modules/updates/update-run.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
pgrep checkupdates
|
||||
pac=$?
|
||||
|
||||
pgrep yay
|
||||
aur=$?
|
||||
|
||||
if [[ pac -eq 1 ]] && [[ aur -eq 1 ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exit 1
|
Loading…
Reference in New Issue
Block a user