openSUSE / openSUSEway

dotfiles for Sway on openSUSE
MIT License
92 stars 17 forks source link

Clipboard #5

Open jubalh opened 4 years ago

jubalh commented 4 years ago

https://github.com/yory8/clipman with wofi integration might be nice for some users. (I don't intend to package it, but if you have time..)

m-rey commented 4 years ago

It is already packaged for the XFCE panel for Leap 15.1: https://build.opensuse.org/package/show/openSUSE%3ALeap%3A15.1/xfce4-panel-plugin-clipman Someone packaged it for Tumbleweed, but it's neither in devel nor factory: https://build.opensuse.org/package/show/home%3AAndnoVember%3AXFCE/xfce4-panel-plugin-clipman

Maybe those two projects could help with packaging and submitting clipman to factory.

jubalh commented 4 years ago

There also is https://github.com/bugaevc/wl-clipboard

Which we have here https://build.opensuse.org/package/show/X11:Wayland/wl-clipboard but for some reason is still not submitted to Factory. (I asked already one year ago)

jubalh commented 4 years ago

@rtyler any reason why you don't add it to Factory?

jubalh commented 4 years ago

Actually.. After one year without an answer I added myself as maintainer too. And SR#818986 will bring this to Factory.

rtyler commented 4 years ago

:shrug: I never saw the comments, I sort of lost track of it after I put it into X11:Wayland. Thanks for taking it the last mile @jubalh

jubalh commented 3 years ago

@mcepl packaged clipman: https://build.opensuse.org/request/show/868038.

denisok commented 3 years ago

as for closing the issue, should it be first integrated in branding package to adjust Sway config ?

jubalh commented 3 years ago

I foremost opened the issue to just remember to package it.

But we can reopen if you also want it in the config.

Keep in mind that there is also wl-clipboard mentioned above. So you have several options of which one you want to include.

mcepl commented 3 years ago

Keep in mind that there is also wl-clipboard mentioned above. So you have several options of which one you want to include.

Just for the sake of clarity: wl-clipboard just contains wl-copy and wl-paste. What you meant probably is wl-clipboard-manager (https://github.com/maximbaz/wl-clipboard-manager), which seems like an alternative to clipman. We do have clipman in Factory.

taschenlampe commented 2 years ago

Not sure, as this issue seems to be close, but is clipman already included in openSUSEway, can't find any traces of it? (I think it would make sense, as it integrated pretty well in (at least) my workflow. Using Mod+c (for clipman) quite often.)

denisok commented 2 years ago

lets reevaluate

mcepl commented 2 years ago

https://build.opensuse.org/package/show/openSUSE:Factory/clipman

denisok commented 2 years ago

@mcepl or @taschenlampe could you please submit PR to add that into the https://github.com/openSUSE/openSUSEway/blob/main/.config/sway/config.d/50-openSUSE.conf ?

As you probably have it configured, it should be easy for you.

As for wl-clipboard vs clipman, looks like clipman has more features and integration with wofi.

mcepl commented 2 years ago

My ~/.config/dotfiles/sway/config.d/40_clipboard.conf is:

# Clipboard management
#
# See https://github.com/yory8/clipman
#
exec wl-paste -n -t text --watch clipman store --histpath="~/.cache/clipman.json" >> /tmp/clipman-log.txt 2>&1 &
bindsym $mod+x exec clipman pick -t wofi --histpath="~/.cache/clipman.json"
taschenlampe commented 2 years ago

My config looks similar but with little diffs, as I have compiled clipman into ~/.local therefore the path are different to mcepl's.

Using additional parameters --tool-args in line1 should open wofi in the current (opensway-)css style

bindsym $mod+c exec clipman pick --tool wofi --tool-args="--conf=/etc/wofi/config --style=/etc/wofi/style.css"

exec wl-paste -t text --watch ~/.local/bin/clipman store

Comparing the parameters used by @mcepl , could you please explain why you use "-n" and "--histpath="~/.cache/clipman.json" >> /tmp/clipman-log.txt 2>&1 &" ? This is not a critique :-) I have set up wl & clipman several months ago, I struggled to get it running back then and when the tools worked I just kept my config that was working, so I curious.

taschenlampe commented 2 years ago

This is how it look here with my settings...seems ok to me, @mcepl @jubalh

20221003_23h32m35s_grim

mcepl commented 2 years ago

Comparing the parameters used by @mcepl , could you please explain why you use "-n" and "--histpath="~/.cache/clipman.json" >> /tmp/clipman-log.txt 2>&1 &" ?

I am not sure about -n actually. Perhaps, it is just a mistake. And --histpath should be obvious from --help, isn’t it?

taschenlampe commented 2 years ago

I am a little confused as @mcepl 's --histpath seems not to work on my system. First I though that this is due to the fact that I have compiled clipman on my own, but even with OSuse rpm I failed to get wofi to show the copied commands.

##works
exec wl-paste -t text --watch clipman store
#doesnt work
#exec wl-paste -t text --watch clipman store --histpath="~/.cache/clipman.json" >> /tmp/clipman-log.txt 2>&1 &

I remember that I struggled a while to get this working some months ago, maybe I "did something" that I can't recall now. @all: Could someone please test which of these parameters works on its system... I am super curious and confused (<-that's normal though).

taschenlampe commented 1 year ago

I rechecked this should be correct way -from a fresh install:

exec wl-paste -p -t text --watch clipman store -P --histpath="~/.local/share/clipman.json"
bindsym $mod+c exec clipman pick -t wofi --tool-args="--conf=/etc/wofi/config --style=/etc/wofi/style.css"

I have clipman.json here: /home/use/.local/share/clipman.json not sure why "~/.cache/clipman.json" is true @mcepl

mcepl commented 1 year ago

Yes, you are right, I have mostly copied you settings.

krishjainx commented 8 months ago

@denisok How would you like to address this? I'll create a PR

denisok commented 8 months ago

@krishjainx I am not sure, I am not affected by this as I don't use this feature. Try it out and if you find it useful - sure submit a PR