When running commands such as bundle install
(for Ruby apps), I'd like to hear a small sound (or popup) notification when the command finishes. How can I do this?
In the Terminal app on your Mac, choose Terminal > Settings, then click Profiles. In the profiles list on the left, select a profile. Click Advanced. Below Bell, select the type of alert you want.
Sound in Ubuntu is based on PulseAudio. On both phone and PC, its user interface includes a “Sound” panel in System Settings (which also covers vibrations on the phone), volume notification bubbles, and the sound menu. For help with using sound in Ubuntu, see Ubuntu Help online.
Sending notifications from the Linux terminal To send notifications from the Linux terminal, use the notify-send command. It's often already installed as a part of your desktop, but you can run which notify-send to confirm. If it's not installed yet, install it with your package manager of choice.
Install the tool 'beep'.
$ sudo apt-get install beep
Now you append "; beep" to whatever command you run.
$ bundle install; beep
To get a pop-up notification, you can use notify-send. This gives you a notification using the same bubble pop-up as you see the OS using for new mail, etc. It is non-modal, so it will only last for a set amount of time though. You can extend the amount of time with the -t option.
Zenity will give you a modal pop-up than you can clear manually. Use something like:
zenity --info --text="message text"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With