Misc updates

This commit is contained in:
David Tomaschik
2026-02-18 16:10:06 -08:00
parent cdbc40d1e8
commit 9ab1f9c298
14 changed files with 243 additions and 26 deletions

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env zsh
# A function to run a command and send a notification when it's done.
# Usage: alert sleep 10
alert() {
# Run the command passed as arguments
"$@"
# Capture the exit code
local ret=$?
# Determine the icon based on success or failure
local icon
if [ $ret -eq 0 ]; then
icon="terminal"
else
icon="error"
fi
# Send the notification with the executed command
notify-send --urgency=low -i "$icon" "Finished: '$@'"
# Return the original exit code
return $ret
}