Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-04-03 16:31:22

Mellowbob
Member
Registered: 2011-10-16
Posts: 286

Copy notification to clipboard

I'm running XFCE4 4.14, clipman panel plugin and xfce4-notifyd.

I could like to somehow copy the contents of a notification to my clipboard. I can't mouse-highlight it and retyping the content gets very old very fast smile

Well, I did find one option ... but retyping is probably faster smile Open xfce4-notifyd-config, click log, send the contents to an external app (little button on the bottom left) and then search for the content (different order, of course). Gotta be a way to just copy the highlighted notification to the clipboard???

Offline

#2 2021-04-03 21:17:09

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: Copy notification to clipboard

If its just the last notification, you can get the body of the notification with:

cat ~/.cache/xfce4/notifyd/log | tail -8 | grep ^body | awk -F'=' '{print $2}' | xclip -i

...requires "xclip". It will place it in your clipboard buffer so you can paste it somewhere. You can bind it to a keyboard shortcut to make it quick to get.

.

Or, you can quickly open the log in a zenity text-info window (that lets you copy) via:

zenity --text-info < ~/.cache/xfce4/notifyd/log

...requires "zenity". You can also bind this to a shortcut key to have it pop up quicker that then going manually through the options to get to it.

.

Otherwise, you'll need to create an enhancement request.


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

#3 2021-04-03 22:34:36

Mellowbob
Member
Registered: 2011-10-16
Posts: 286

Re: Copy notification to clipboard

Thanks for that. Even easier, for me, is:

  [03:32 PM ~] bob$ less < ~/.cache/xfce4/notifyd/log

or even:

  [03:32 PM ~] bob$ cat < ~/.cache/xfce4/notifyd/log

Both from a terminal or course. I'm going to write a little one liner and stick it in my bashrc.

Offline

Board footer

Powered by FluxBB