You are not logged in.
Pages: 1
I'd like to view last notifications with a keyboard shortcut. I need to click the bell on the panel to view the notification window. Is it possible to do this without a mouse?
Xfce 4.14
Offline
Hello and welcome.
If you have logging enabled, it will log all notifications to ~/.cache/xfce4/notifyd/log. You can manually script/parse this file to get the last entry for the most recent notification. Here is an example using zenity (assign this command to a keyboard shortcut):
bash -c "zenity --title Last\ Notification --height 150 --no-wrap --info --text \"$(sed 'H;/^$/h;$!d;x' ~/.cache/xfce4/notifyd/log)\""
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I thought about reading the log file. But I'm more worried about the bell itself. It turns red if have unread messages, and I want quickly turn it off.
Offline
Hmm, that makes it difficult. There is no built-in way to do this that I am aware of, but you might be able to make use of an automation tool like xdotool. Assigning a command like:
xdotool mousemove 1200 20 click 1
...to a keyboard shortcut (you will need to adjust the geometry values of 1200 (x) and 20 (y) so that it sits on top of the icon) will move the mouse to the icon and click it displaying the context menu (and clearing the bell colour).
If required, you can also script xdotool to save the current location of the mouse pointer and return it there after the click to make it mostly seamless.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
OK. Thank you, ToZ. I'll give it a try.
Offline
Pages: 1
[ Generated in 0.012 seconds, 14 queries executed - Memory usage: 542.16 KiB (Peak: 543.44 KiB) ]