RSS Amplifier

Bash Prompt · Aug 19, 2021

Create A Simple Desktop Notification From Bash With notify-send

0
Sign in to vote or save

Elliot Cooper · Bash Prompt

Some Bash commands take a long time to finish and provide no estimate for when that will happen. This means that you have to keep switching back to its terminal to check its status.

That’s a pain that interrupts your workflow.

Instead, use this simple command to create a popup notification on your desktop that will let you know the process has finished.

First, install libnotify on your machine.

Next, use the following simple syntax to create a desktop notification when your command has finished:

$ <COMMAND> && notify-send "Notification Message"

Here is another example using the sleep command.

sleep 3 && notify-send "Process Finished"

sleep does nothing but waits for a specified time and then exit.

Read the original on bash-prompt.net

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.