plasma-applet-commandoutput icon indicating copy to clipboard operation
plasma-applet-commandoutput copied to clipboard

We need the ability to copy text (with a checkbox in the widget settings that enables/disables this feature)

Open DAVIDhaker opened this issue 1 year ago • 4 comments

DAVIDhaker avatar Dec 14 '23 13:12 DAVIDhaker

fwiw, you can pipe command output in click, e.g.

for my custom tailscale widget, i have the click action set to

ip=$(tailscale ip --4 2>/dev/null) && echo "$ip" | xsel --clipboard && notify-send "Copied ${ip}"

which copy my tailscale ip to the clipboard using xsel, and send a desktop notification using notify-send

davidosomething avatar Dec 14 '23 14:12 davidosomething

@davidosomething, yes. Good idea, but how to be, when i need to copy random parts/string from text?

DAVIDhaker avatar Dec 14 '23 16:12 DAVIDhaker

grep to match the pattern and pipe the grep results, you can find grep commands for matching urls on stackoverflow for instance

davidosomething avatar Dec 14 '23 17:12 davidosomething

Suggested implementation in PR #48

guss77 avatar Feb 29 '24 21:02 guss77