FineFindus / eyedropper

Pick and format colors
https://apps.gnome.org/Eyedropper
GNU General Public License v3.0
260 stars 26 forks source link

Not Working on SwayWM #117

Closed nydragon closed 8 months ago

nydragon commented 8 months ago

Describe the bug On Sway i get the notification "Failed to select a color" when trying to pick a color.

To Reproduce Steps to reproduce the behavior:

  1. Click on "Pick a color"
  2. Click anywhere on the screen

Expected behavior The color to be selected

Additional context OS: Arch Linux x86_64 Kernel: 6.6.8-arch1-1 WM: sway version: 1.0.0

Not sure if related but I am using the wlr screencast portal.

FineFindus commented 8 months ago

Thanks for the report. It's unlikely that the bug is on Eyedropper's side, since Eyedropper only uses the Screenshot Portal's color picker method. Please make sure your screenshot portal is set up correctly and working, if your portal is set up correctly and other color pickers using the portal work, please reopen this issue.

nydragon commented 8 months ago

Alright, thank you very much for the info!

azzamsa commented 7 months ago

@Nydragon what is your final solution?

In Hyprland, it works fine, but it doesn't have the color previewer/magnifier when selecting a color. It works fine in GNOME though.

nydragon commented 7 months ago

@Nydragon what is your final solution?

In Hyprland, it works fine, but it doesn't have the color previewer/magnifier when selecting a color. It works fine in GNOME though.

I didn't find a solution for eyedropper (either wlr doesn't support that or I misunderstood how to configure) but i found this alternative

grim -g "$(slurp -p)" -t ppm - | convert - -format "%[pixel:p{0,0}]" txt:- | tail -n 1 | cut -d " " -f 4 | wl-copy

It will output the Hex value

azzamsa commented 7 months ago

It worked well for me in Hyprland

windowrulev2 = float,title:(Eyedropper)
windowrulev2 = center([1]) ,title:(Eyedropper)

2024-01-13_09-05

nydragon commented 7 months ago

Your message prompted me to test again, and by some magic it is working for me as well now...

This is my config;

~/.config/xdg-desktop-portal/portals.conf

[preferred]
default=gtk
org.freedesktop.portal.ScreenCast=wlr

~/.config/xdg-desktop-portal-wlr/sway

[screencast]
chooser_type=simple
chooser_cmd=slurp -f %o -or

Make sure $XDG_CURRENT_DESKTOP is set to sway

(in case you are still looking @azzamsa)

I don't get a magnifying glass however, but I assume it can be changed in the second config file.