I asked Gemini, he gaves me:
qdbus6 --literal org.kde.KWin /ColorPicker org.kde.kwin.ColorPicker.pick|grep -oE [0-9]+
but still using the pointer, so before we can e.g.:
ydotool mousemove -a 90 30
Should I create the feature request?
I asked Gemini, he gaves me:
qdbus6 --literal org.kde.KWin /ColorPicker org.kde.kwin.ColorPicker.pick|grep -oE [0-9]+
but still using the pointer, so before we can e.g.:
ydotool mousemove -a 90 30
Should I create the feature request?
I’m having trouble understanding what you mean, are you wanting to get a screen location without using the pointer?
The command above still use the pointer yes.
It would be e.g.:
colorpicker 90 30
colorpicker x y
I forgot to say: I tried AUR (en) - pixelcolor without success: it uses X, not Wayland.
kdialog --getcolor
will show you the coordinates of your cursor, is that what you mean?
Color Picker is a widget, right click the panel then “Add or Manage Widgets…” to get it, your command opens a color chooser then returns the color in HTML… Color Picker on any display’s pixel…
the about tab in the widget configuration has an email address you can reach out to.
but i’m still not clear on what you are asking for
do you want to be able to pick a color from coordinates?
or do you want the coordinates of the color you picked from the screen?
The 1st, see the title “x y as input”.
I think you could use grim and Image Magick. In a shell function for example:
pixelcolor() {
grim -g "$1,$2 1x1" -t ppm - |
magick - -format '#%[fx:int(255*r)]%[fx:int(255*g)]%[fx:int(255*b)]\n' txt:-
}
Then: pixelcolor 90 30
You tried your command?
[a@archlinux ~]$ grim -g "90,30 1x1" -t ppm -
compositor doesn't support the screen capture protocol
[a@archlinux ~]$ sudo grim -g "90,30 1x1" -t ppm -
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
failed to create display
& it’s a screenshot utility…
I didn’t try it yesterday but I’ve used grim to get coordinates before. Are you on wayland or X11?
Arch Linux KDE Wayland.
Arch Linux KDE Wayland.
Ahh, just looked it up and the grim method doesn’t work on Wayland either. There may be not way to do this currently but I’ll keep looking.