Score:0

Send a desktop notification once command completed

uz flag

I have installed sudo apt install libnotify-bin which is used to send notification at desktop level.
So if you run below command, it will send you a notification once command's execution finished.
sudo apt update; notify-send Done

enter image description here

As you can see I am printing message as Done. But I want that it should print command name instead of Done.
Example :

  • If we run ls -lR /home; notify-send Done then it should print ls Done
  • If we run npm install; notify-send Done then it should print npm Done

Is it possible ?

muru avatar
us flag
Ubuntu's `.bashrc` comes with an alias for this: https://askubuntu.com/a/409763/158442
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.