snippets

terminal notifications

i usually chain this one after commands like dig, combined with watch. for example:

code copied!
	watch -g "dig sayitditto.net +short" && notif

this makes it so that, when the watch command detects a change, it exits, and then triggers the notif function. it’s extremely convenient.

the function triggers a sound with aplay OR paplay (depends on your audio setup), but you can change the path to any audio file you’d like.

code copied!
	# to get quick notifs
# after long commands
notif() {
	notify-send "done!"
	paplay /usr/share/sounds/sound-icons/start
	spd-say -t female3 -r +25 "done!"
}