Skip to content

Instantly share code, notes, and snippets.

@amimaro
Last active August 29, 2020 23:44
Show Gist options
  • Save amimaro/604fb11a3cbd9ff2200fb1ea241a3950 to your computer and use it in GitHub Desktop.
Save amimaro/604fb11a3cbd9ff2200fb1ea241a3950 to your computer and use it in GitHub Desktop.
Script to beep and/or notify after command finish at terminal
#!/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.
#!/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