Last active
August 29, 2020 23:44
-
-
Save amimaro/604fb11a3cbd9ff2200fb1ea241a3950 to your computer and use it in GitHub Desktop.
Script to beep and/or notify after command finish at terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Save this script at ~/Scripts | |
# Add to the script folder to PATH at ~/.bashrc (export PATH="~/Scripts:$PATH") | |
# Don't forget to make this script executable, use: chmod +x _beep | |
# Install sox: apt install sox | |
# Use any audio file | |
# -q -V1 to use silent mode | |
play ~/Music/263133__pan14__tone-beep.wav -q -V1 | |
# Also notify | |
notify-send Done -i 'none' | |
# How to use it | |
# After any command at the terminal, finish it with [&& _beep] | |
# This way, after the command finish executing it will beep and show the notification. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Save this script at ~/Scripts | |
# Add to the script folder to PATH at ~/.bashrc (export PATH="~/Scripts:$PATH") | |
# Don't forget to make this script executable, use: chmod +x _done | |
# Notify | |
notify-send Done -i 'none' | |
# How to use it | |
# After any command at the terminal, finish it with [&& _done] | |
# This way, after the command finish executing it will show the notification. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment