You are not logged in.
Hey guys!
Let's say you put a "sleep 2m" into the terminal.
Does the 4.16 Xfce Terminal come with a feature to send a notification once the command has been completed?
Offline
I don't think there is an inbuilt feature for that. I have had some terminal notify me of task completion but I don't remember which one they were. Maybe it was konsole? IDK.
But what you can do is something like this...
~$ command 1 && command 2
So command 2 will be automatically executed once command 1 is completed. Now you can just set command 2 to play a sound file or something.
Use "&&" or ";" both should work.
Last edited by desipher (2021-05-19 16:48:00)
Offline
Thanks! Meanwhile I found this [1] which is exactly what I was looking for.
Offline
Thanks! Meanwhile I found this [1] which is exactly what I was looking for.
I found another thing. It's an inbuilt command called "notify-send" In case the ntfy thing stops working you can still use this one. Also it's really robust. Although it won't send a notification to your phone which is a deal breaker I can understand. But since I was having difficulties installing ntfy, I thought I'd just let you know.
notify-send "Did you tell your loved once today, how much you love them? Go do it."
This will just appear on your desktop as a notification.
Last edited by desipher (2021-05-20 09:57:47)
Offline
This is good, yes!
However, I just want this built-in for all long commands that take longer than X seconds.
Don't want to always remember to put the notify-send prefix before another command. ;-)
Offline
This is good, yes!
However, I just want this built-in for all long commands that take longer than X seconds.
Don't want to always remember to put the notify-send prefix before another command. ;-)
Yea chief the closest thing to that which I can think of is an alias so you can shorten notify-send to something like ns "done" meaning you will have to type this
ns && whatever_command-you@want
However it is posibble to have a command run before every other command in bash. I don't know how to do it but if you want check this out.
Let me know how it goes.
Offline
[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 533.42 KiB (Peak: 534.27 KiB) ]