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

cliphist-rofi-img fails to display images #71

Closed
stratosgear opened this issue Nov 14, 2023 · 4 comments
Closed

cliphist-rofi-img fails to display images #71

stratosgear opened this issue Nov 14, 2023 · 4 comments

Comments

@stratosgear
Copy link

stratosgear commented Nov 14, 2023

When I trigger it like this:

$ rofi -modi clipboard:/home/stratos/dotfiles/bin/wayland_cliphist_images.sh  -show clipboard -show-icons
grep: (standard input): binary file matches

I get the above grep message on the console and an empty rofi window.

My partial cliphist list shows this:

$ cliphist list
201     rofi -modi clipboard:/home/stratos/dotfiles/bin/wayland_cliphist_images.sh -show clipboard -show-ic
200     cliphist-rofi-img
199     cliphist list \ | grep -Fv '<meta http-equiv="content-type"'
198     #!/usr/bin/env bash tmp_dir="/tmp/cliphist" rm -rf "$tmp_dir" if [[ -n "$1" ]]; then cliphist dec
197     binary data image/png
196     SN850X

There is one image copied in there

Am I "holding it wrong"?

BTW, I use:

wl-paste --watch cliphist store

to copy items to my clipboard (running in hyprland)

EDITED: To replace wayland with hyprland!

@sentriz
Copy link
Owner

sentriz commented Nov 14, 2023

@Sonico98 maybe we should remove the link in the readme, or back the script work for both 0.4 and 0.5

@sentriz
Copy link
Owner

sentriz commented Nov 15, 2023

hey just for fun (and wanting to close the issue) i updated the script to be backwards compatible with 0.4, and also made it much faster (avoiding spawning subprocesses in a loop basically)

seems to be quite a lot faster on my machine

hopefully that works for you @stratosgear, and @Sonico98 let me know if you are cool with the changes 👍

20231115_010435.mp4

@stratosgear
Copy link
Author

Yes. This works now. But I hate that the icons (previews?) appear so small. Looking for a better solution, somewhere...

Thanks!

@Sonico98
Copy link
Contributor

hey just for fun (and wanting to close the issue) i updated the script to be backwards compatible with 0.4, and also made it much faster (avoiding spawning subprocesses in a loop basically)

seems to be quite a lot faster on my machine

hopefully that works for you @stratosgear, and @Sonico98 let me know if you are cool with the changes 👍
20231115_010435.mp4

Of course! Thanks a lot for your efforts! I wouldn't have been able to come up with such a smart solution.

Yes. This works now. But I hate that the icons (previews?) appear so small. Looking for a better solution, somewhere...

Thanks!

That depends on your rofi theme. You can get bigger previews in a quick way with the following:
rofi -modi clipboard:cliphist-rofi -show clipboard -config /usr/share/rofi/themes/lb.rasi -show-icons -theme-str '#window {height: 80%; }' -theme-str '#element-icon {size: 10ch; }'
Otherwise, add those values inside your rofi config.rasi file, if you have any.
You may also replace 10ch with any other value you like more, for example 50px.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants