'alert' alias creates notifications that don't go away in GNOME 3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The default .bashrc has this:
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^
This creates a libnotify popup showing your last command. The problem is that it creates a notification in the system tray, which only goes away when you right click and choose "Remove". This is annoying since now instead of just getting a notification and handling it, you need to go into the system tray and remove the notification, then handle whatever it is you actually wanted to do.
Red Hat has a bug report on this:
https:/
Their solution is to add this to notify-send when you want it to be transient:
--hint=
So I think the default alias should be this:
alias alert='notify-send --hint=
I've tested this on my machine and it does what I was wanting: A notification pops up, then goes away.
Changed in bash (Ubuntu): | |
status: | New → Confirmed |
I can confirm that the fixed alias works. This is a minor change so it would be nice if it was fixed by default.