Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

piping to rofi or dmenu broken in 1.2.4 #61

Closed
magnetophon opened this issue Aug 13, 2017 · 9 comments
Closed

piping to rofi or dmenu broken in 1.2.4 #61

magnetophon opened this issue Aug 13, 2017 · 9 comments
Labels

Comments

@magnetophon
Copy link

magnetophon commented Aug 13, 2017

I use clipster trough rofi, with the command clipster -o -n 0 -0 | rofi -i -dmenu -sep '\x00' -eh 2 -p paste: | sed -ze 's/\n$//' | clipster.
On version 1.0.1 that worked just fine, but on 1.2.4 I get all the text overlaid on one line: https://imgur.com/a/QKpjT

Also more minimal versions fail in similar ways:
clipster -o -n 0 -0 | rofi -dmenu
clipster -o -n 0 -0 | dmenu

@mrichar1
Copy link
Owner

mrichar1 commented Aug 13, 2017

Hi,

Thanks for this report.

I'm trying to replicate what you're describing, but I'm not sure what you mean by 'text overlaid on one line.'

My test seems to work as expected:

>$ echo -e "cat\ndog\nfish\n\n" | clipster
(server:) DEBUG:[u'cat\ndog\nfish\n\n']

 $ clipster -o -n 0 -0 | rofi -i -dmenu -sep '\x00' -eh 2 -p paste: | sed -ze 's/\n$//'
<*select only item in rofi*>
cat
dog
fish

>$

Can you give me an example of the expected versus actual output you're seeing? Thanks!

@magnetophon
Copy link
Author

Did you see the screenshot?

@magnetophon
Copy link
Author

magnetophon commented Aug 13, 2017

I just tried with 1.2.3, and that works fine too.

@mrichar1
Copy link
Owner

Hi - thanks for the screenshot and updates.

Turns out that in fixing a python 2 unicode bug in 1.2.4 I'd introduced a new one for python 3. py2 needs stringscontaining unicode explicitly encoding, but calling encode() on python3 strings converts them to bytes, which rofi doesn't cope with.

I've hopefully fixed this in ed205c6 - can you try 1.2.5 and let me know if you are still having issues. Thanks!

@magnetophon
Copy link
Author

All good now!
Thank you!

@fourstepper
Copy link

@magnetophon Hi, how do you use the above? I tried to use your option in i3wm with rofi, got the menu up and running when I select one of the options it seems that nothing happens. clipster daemon is up and running

@magnetophon
Copy link
Author

At the moment I'm using clipster trough fzf, for even better search capabilities and a nice preview window: https://github.com/magnetophon/.dot/blob/master/common/.local/bin/clipster_fzf.sh

@fourstepper
Copy link

Sorry for the ignorance, but how do I copy the output of the fuzzy find to my primary clipboard?

@magnetophon
Copy link
Author

@mrichar1 mrichar1 added the bug label Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants