Public bug reported:
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/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
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://bugzilla.redhat.com/show_bug.cgi?id=693207
Their solution is to add this to notify-send when you want it to be
transient:
--hint=int:transient:1
So I think the default alias should be this:
alias alert='notify-send --hint=int:transient:1 --urgency=low -i
"$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed
-e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
I've tested this on my machine and it does what I was wanting: A
notification pops up, then goes away.
** Affects: bash (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1067774
Title:
'alert' alias creates notifications that don't go away in GNOME 3
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1067774/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs