With the command notify-send
, it's possible to show a notification on screen for a small amount of time. But I'd like to have a specific notification on my screen for an undetermined amount of time. I'm creating a script that is initiated and terminated by the user, for me it'd be useful to have a command that activates the notification and then deactivates it after my script is finished. The pseudocode would be something like this:
#!/bin/bash
activatenotification "my text"
# my script commands
deactivatenotification
Is it possible to do? Is there such a command line tool or can I do something like that using notify-send
?
If your issue is with the short duration of the
notify-send
alert, then you can set the urgency level of an alert to 'critical'. This would produce a persistent notification which you'll have to dismiss manually.Use the following format