DEV Community

Discussion on: Meme Monday πŸ‘

Collapse
 
sarahokolo profile image
sahra πŸ’«

You can write a simple bash script for that

Thread Thread
 
coderamrin profile image
Amrin

never thought of that, let's put this on the might do list.

Thread Thread
 
corentinbettiol profile image
Corentin Bettiol

Try this in a *nix shell: tput bel

Thread Thread
 
corentinbettiol profile image
Corentin Bettiol

Or this if you're on *ubuntu:

your_command_here && notify-send "Success" || notify-send "Error"
Enter fullscreen mode Exit fullscreen mode

If it succeeds, the "success" notification will be sent, else the "error" notification will be sent.

Example:

1 == 1 => success
1 == 2 => error

[[ 1 == 1 ]] && notify-send "Success" || notify-send "Error"
sleep 3
[[ 1 == 2 ]] && notify-send "Success" || notify-send "Error"
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
coderamrin profile image
Amrin

Thanks man!