Skip to content

Instantly share code, notes, and snippets.

@bbelderbos
Created July 25, 2025 08:41
Show Gist options
  • Save bbelderbos/f3b59eab93213882fcc98ad50db24865 to your computer and use it in GitHub Desktop.
Save bbelderbos/f3b59eab93213882fcc98ad50db24865 to your computer and use it in GitHub Desktop.
# start rust alarm app script/process when opening terminal, but only one time
function run_alarm_if_not_running {
if ! pgrep -f "alarm -m 45 -M" > /dev/null; then
echo "Starting alarm..."
alarm -m 45 -M "stand up" -t 2 -r &
fi
}
run_alarm_if_not_running
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment