mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Added missing exit codes
This commit is contained in:
parent
25a925f1dc
commit
ff9588637c
@ -3,7 +3,7 @@
|
|||||||
# Notify me with notify-send if my battery is below 25%.
|
# Notify me with notify-send if my battery is below 25%.
|
||||||
# You can set this to run via cron.
|
# 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 ] &&
|
[ "$(cat /sys/class/power_supply/BAT0/capacity)" -lt 25 ] &&
|
||||||
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u $USER)/bus &&
|
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u $USER)/bus &&
|
||||||
notify-send -u critical "Battery critically low."
|
notify-send -u critical "Battery critically low."
|
||||||
|
|||||||
@ -3,11 +3,11 @@
|
|||||||
# Set as a cron job to check for new RSS entries for newsboat.
|
# Set as a cron job to check for new RSS entries for newsboat.
|
||||||
# If newsboat is open, sends it an "R" key to refresh.
|
# 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..."
|
/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
|
echo 🔃 > /tmp/newsupdate
|
||||||
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}"
|
pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}"
|
||||||
|
|||||||
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
# entr command to run `queueandnotify` when newsboat queue is changed
|
# 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
|
echo "${XDG_DATA_HOME:-$HOME/.local/share}"/newsboat/queue | entr -p queueandnotify 2>/dev/null
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user