sentriz / cliphist

wayland clipboard manager with support for multimedia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible to use with xclip ?

foxjaw opened this issue · comments

On sway cliphists rocks with wl-clipboard.
On i3 I currently configured greenclip.

Is this project works only with wl-clipboard / other wl based protocols ? Or can the command be piped properly to support x11/xclip too ?

PS

I have tried these so far just for curiosity:

cliphist list | rofi -dmenu | cliphist decode | xclip -selection c -

xclip -selection c $(cliphist list | rofi -dmenu | cliphist decode)

dumbly without any luck.

you'd still need to "watch" clipboard changes and pipe them into cliphist store

maybe try something like

while 1; xclip -o -selection c | cliphist store; sleep 1; end?

Didn't work. Can you look into this on your x11/xclip setup & lemme know if it's possible ?

PS

I'm trying to replace greenclip with cliphist, caz why use multiple different programs for different display servers ? Cliphist is just a clipboard database that reads clipboards, stores clips & retrieves them when needed. This shouldn't have to be display server dependent tbh.

I don't have an x11 system sorry

and you're right it's nothing to so with x or Wayland

you just need to pipe clipboard changes into cliphist store, and retrieve with list and decode

Btw, you could use clipnotify to avoid polling in x11, which works well in my case:

while clipnotify; xclip -o -selection c | cliphist store; end

I've completely migrated from i3 to sway now.

while clipnotify; xclip -o -selection c | cliphist store; end

@phanen What's the polling issue btw ? Were you successfully able to use cliphist on x11 with above command ?

Work well for me, and I still use bspwm now (.xinitrc)

About "polling", I just mean xclip will only run on your "copy event"(e.g. press ctrl-c on selected text) rather than on each second. It may cost less, and handle some cases in which you want to copy multiple times within 1 second. (: