diff --git a/.local/bin/cron/cronbat b/.local/bin/cron/cronbat index bd953c7a..f677138a 100755 --- a/.local/bin/cron/cronbat +++ b/.local/bin/cron/cronbat @@ -3,7 +3,7 @@ # Notify me with notify-send if my battery is below 25%. # You can set this to run via cron. -[ "$(cat /sys/class/power_supply/BAT0/status)" = "Charging" ] && exit +[ "$(cat /sys/class/power_supply/BAT0/status)" = "Charging" ] && exit 0 [ "$(cat /sys/class/power_supply/BAT0/capacity)" -lt 25 ] && export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u $USER)/bus && notify-send -u critical "Battery critically low." diff --git a/.local/bin/cron/newsup b/.local/bin/cron/newsup index 29f2b3c9..3916dfba 100755 --- a/.local/bin/cron/newsup +++ b/.local/bin/cron/newsup @@ -3,11 +3,11 @@ # Set as a cron job to check for new RSS entries for newsboat. # If newsboat is open, sends it an "R" key to refresh. -ping -q -c 1 example.org > /dev/null || exit +ping -q -c 1 example.org > /dev/null || exit 1 /usr/bin/notify-send "📰 Updating RSS feeds..." -pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit +pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit 0 echo 🔃 > /tmp/newsupdate pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}" diff --git a/.local/bin/podentr b/.local/bin/podentr index 9454b07f..a4c4d48a 100755 --- a/.local/bin/podentr +++ b/.local/bin/podentr @@ -2,6 +2,6 @@ # entr command to run `queueandnotify` when newsboat queue is changed -[ "$(pgrep -x "$(basename "$0")" | wc -l)" -gt 2 ] && exit +[ "$(pgrep -x "$(basename "$0")" | wc -l)" -gt 2 ] && exit 1 echo "${XDG_DATA_HOME:-$HOME/.local/share}"/newsboat/queue | entr -p queueandnotify 2>/dev/null