Paste item directly after select
bingo084 opened this issue · 5 comments
I use command below as picker.
cliphist list | rofi -dmenu | cliphist decode | wl-copy
After select an item, I have to use ctrl-v
paste it again, is there anyway paste item directly after select?
I tried command below but not working.
cliphist list | rofi -dmenu | cliphist decode | wl-copy && wl-paste
cliphist list | rofi -dmenu | cliphist decode | wl-copy && wtype $(wl-paste)
be sure to install wtype
cliphist list | rofi -dmenu | cliphist decode | wl-copy && wtype $(wl-paste)
be sure to install wtype
Thanks, but I found that this only works for text, not images.
I simulated the shortcut key for paste.
cliphist list | rofi -dmenu | cliphist decode | wl-copy && wtype -M ctrl -k v -m ctrl
this more or less works, but the problem is that if you have a character like -S
it fail wtype and nothing is pasted.
try pacman -S xdg-desktop-portal-hyprland
for example
I solved with
cliphist list | wofi -dmenu | cliphist decode | wl-copy && wl-paste --no-newline | xargs -I {} wtype {}
if you have a character like -S it fail wtype and nothing is pasted
you probably need a --
to discern flags from arguments. eg wtype -- -S
will type -S