Friday, May 3, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 15647  / 1 Year ago, tue, january 10, 2023, 1:16:34

I do sudo apt-get update from time to time, and find it frustrating to have to check when it is done doing its thing. Is there anyway I can get it to offer a notification popup or play a sound when it has finished executing, so I can get on with my work?


More From » command-line

 Answers
1

I wrote a little scripts to make it. Script is located in github.



Here is installation guide:



Installation



Download or just clone repo



 $ git clone [email protected]:c0rp-aubakirov/notify_after_command_executed.git


Then add sourcing of script postexec_notify to your .bashrc.



Here is git clone example of installation:



 $ cd ~
$ git clone [email protected]:c0rp-aubakirov/notify_after_command_executed.git
$ cd ~/notify_after_command_executed
$ echo "source $(pwd)/postexec_notify" >> ~/.bashrc


Now restart your terminal. After restart you should see this messages:



preexec.sh is not exist
Trying to download it from github


Now try to test if notification appear:



$ sleep 6


Please let me know if something is unclear or you have any issues.


[#20439] Tuesday, January 10, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
calcur

Total Points: 189
Total Questions: 80
Total Answers: 95

Location: Burkina Faso
Member since Thu, Dec 15, 2022
1 Year ago
;