GithubHelp home page GithubHelp logo

hyprwm / hyprpicker Goto Github PK

View Code? Open in Web Editor NEW
626.0 6.0 27.0 91 KB

A wlroots-compatible Wayland color picker that does not suck.

License: BSD 3-Clause "New" or "Revised" License

CMake 7.37% C++ 88.29% Nix 4.34%
wayland wlroots color picker

hyprpicker's People

Contributors

bvr-yr avatar eclairevoyant avatar eviefp avatar felixdorn avatar fufexan avatar kara-zor-el avatar lisuke avatar lucalumetti avatar mango0x45 avatar pebble-24 avatar pg83 avatar scorpion-26 avatar sroemer avatar thatonecalculator avatar theonlymrcat avatar thesuncat avatar tmneth avatar vaxerski avatar wineee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hyprpicker's Issues

Add color preview

Sometimes I just want to compare two colors on screen. It would be great to have a preview under zoom lens with a color code, similar to how ShareX does it.

sharex

Bus error (core dumped) when starting hyprpicker

I honestly have no idea where to start with this.
I'm running NixOS.
Running hyprpicker, both from Nixpkgs and from the flake gives me the same error:
image

I've tried running it in gdb to get some more info, that's what it gives me:

(gdb) run
Starting program: /home/neoney/code/hyprpicker/build/hyprpicker 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/fz54faknl123dimzz6jsppw193lx2mip-glibc-2.35-163/lib/libthread_db.so.1".

Program received signal SIGBUS, Bus error.
0x0000000000407427 in CHyprpicker::convertBuffer(SPoolBuffer*) ()

The thing is, the issue only starts after a while on Hyprland. I'll try to do some stuff to further narrow down when it breaks.

[Bug] Invalid buffer stride error

Version Info

hyprpicker e4c2672
hyprland hyprwm/Hyprland@d1a7f1d

GPU: GTX 750ti with driver version 525.85.05
Installed hyprpicker and hyprland both through flake in the repo.

Error

$ hyprpicker
zwlr_screencopy_frame_v1@11: error 1: invalid buffer stride
Segmentation fault (core dumped)
Starting program: /nix/store/y578shwhgl5qc84da74rrxvng75pg7gx-system-path/bin/hyprpicker 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/libthread_db.so.1".
zwlr_screencopy_frame_v1@11: error 1: invalid buffer stride

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f5f688 in wl_map_insert_at () from /nix/store/rq2d1gp2hhh4l584112vrkrbijpw7xhm-wayland-1.21.0/lib/libwayland-client.so.0
(gdb) backtrace
#0  0x00007ffff7f5f688 in wl_map_insert_at () from /nix/store/rq2d1gp2hhh4l584112vrkrbijpw7xhm-wayland-1.21.0/lib/libwayland-client.so.0
#1  0x00007ffff7f5ac03 in proxy_destroy () from /nix/store/rq2d1gp2hhh4l584112vrkrbijpw7xhm-wayland-1.21.0/lib/libwayland-client.so.0
#2  0x00007ffff7f5b092 in wl_proxy_marshal_array_flags () from /nix/store/rq2d1gp2hhh4l584112vrkrbijpw7xhm-wayland-1.21.0/lib/libwayland-client.so.0
#3  0x00007ffff7f5b2ae in wl_proxy_marshal_flags () from /nix/store/rq2d1gp2hhh4l584112vrkrbijpw7xhm-wayland-1.21.0/lib/libwayland-client.so.0
#4  0x0000000000405fdb in CLayerSurface::~CLayerSurface() ()
#5  0x0000000000405ba0 in std::unique_ptr<CHyprpicker, std::default_delete<CHyprpicker> >::~unique_ptr() ()
#6  0x00007ffff74400c5 in __run_exit_handlers () from /nix/store/fz54faknl123dimzz6jsppw193lx2mip-glibc-2.35-163/lib/libc.so.6
#7  0x00007ffff744024e in exit () from /nix/store/fz54faknl123dimzz6jsppw193lx2mip-glibc-2.35-163/lib/libc.so.6
#8  0x00007ffff7429255 in __libc_start_call_main () from /nix/store/fz54faknl123dimzz6jsppw193lx2mip-glibc-2.35-163/lib/libc.so.6
#9  0x00007ffff7429309 in __libc_start_main_impl () from /nix/store/fz54faknl123dimzz6jsppw193lx2mip-glibc-2.35-163/lib/libc.so.6
#10 0x0000000000403cb5 in _start ()

env

$ nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.9, NixOS, 23.05 (Stoat), 23.05.20230209.724bfc0`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.2`
 - channels(root): `"nixos"`
 - channels(rito): `"home-manager, nixpkgs"`
 - channels(riro): `"home-manager, nixpkgs"`
 - nixpkgs: `/home/usr/.nix-defexpr/channels/nixpkgs`

Error: invalid buffer stride

Installed from AUR. Running hyprland. Unfortunately, hyprpicker fails with the following error:

❯ hyprpicker
zwlr_screencopy_frame_v1@11: error 1: invalid buffer stride

hyprpicker stops working after a couple of uses

In hyprland.conf I use a bind for hyprpicker:

bind=SUPER,C,exec,hyprpicker -a && notify-send --icon ~/.config/hypr/assets/blossom.png -u critical -t 4000 "$(wl-paste)"

It works for about 20 times. But then it suddenly breaks. When running hyprpicker in the terminal afterwards I get:

❯ hyprpicker
zsh: bus error (core dumped)  hyprpicker

Rebooting gets it working again. But then it breaks again, after a couple of uses.

I'm on AMD, and installed hyprpicker-git from the AUR.

Segfault

Getting a segfault when trying to run hyprpicker. Built locally.

uname -a:
Linux james-xps 5.19.0-41-generic #42~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 18 17:40:00 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Trace:

(gdb) run
Starting program: /home/james/projects/third-party/hyprpicker/build/hyprpicker 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f93e34 in wl_proxy_get_version () from /lib/x86_64-linux-gnu/libwayland-client.so.0
(gdb) bt -full
#0  0x00007ffff7f93e34 in wl_proxy_get_version () from /lib/x86_64-linux-gnu/libwayland-client.so.0
No symbol table info available.
#1  0x000000000040b79a in zwlr_layer_shell_v1_get_layer_surface (zwlr_layer_shell_v1=0x0, surface=0x4513f0, output=0x452190, layer=3, _namespace=0x41134b "hyprpicker")
    at /home/james/projects/third-party/hyprpicker/./wlr-layer-shell-unstable-v1-protocol.h:209
        id = 0x419718 <g_pHyprpicker>
#2  0x000000000040b3a1 in CLayerSurface::CLayerSurface (this=0x451c40, pMonitor=0x450390) at /home/james/projects/third-party/hyprpicker/src/helpers/LayerSurface.cpp:17
No locals.
#3  0x000000000040ef6e in std::make_unique<CLayerSurface, SMonitor*> () at /usr/include/c++/11/bits/unique_ptr.h:962
No locals.
#4  0x000000000040beb0 in CHyprpicker::init (this=0x44bfa0) at /home/james/projects/third-party/hyprpicker/src/hyprpicker.cpp:21
        m = std::unique_ptr<SMonitor> = {get() = 0x450390}
        __for_range = std::vector of length 1, capacity 1 = {std::unique_ptr<SMonitor> = {get() = 0x450390}}
        __for_begin = std::unique_ptr<SMonitor> = {get() = 0x450390}
        __for_end = std::unique_ptr<SMonitor> = {get() = 0x0}
#5  0x0000000000410639 in main (argc=1, argv=0x7fffffffe068, envp=0x7fffffffe078) at /home/james/projects/third-party/hyprpicker/src/main.cpp:64
No locals.
(gdb) 

Magnifying lens size

It would be awesome to interactively increase both the size and the zoom factor, perhaps also as an optional standalone magnify mode!

Color doesn't get picked

The behaviour

  • It shows the circular magnifier, but doesn't show the border with targeted color
  • Clicking anyway just returns #000000
    image

Details

  • Happens with the latest commit 3 days ago (03bc27b)
    • Before that it functions normally
  • Hyprland version, if it matters:
Hyprland, built from branch main at commit 6e53c47e68c1d15032b755270568eb5485f2c684 dirty (renderer: fix missing premultiplication for border multisampling).
Tag: v0.28.0-10-g6e53c47e

flags: (if any)

Hyprland crashes when I launch hyprpicker

Hello guys, I am kinda new to making issues on github so please don't mind my lack of manners.
I am currently facing a quite tricky situation where hyprland crashes whenever I try to launch hyprpicker, without providing me a relevant error message. I have a pic here of what the error looks like (and if I can get logs for you please tell me, I have no idea how to get the logs of a crash).

Thanks in advance..

image

Formats

Config file to choose default, flag at runtime to change

  • Hex (default) (high priority)
  • RGB(a) (high priority)
  • HSL (mid priority)
  • HSV (mid priority)
  • CMYK (low priority)

Black screen upon running command in terminal

System:
Arch + Hyprland
Ryzen 5 6600H
RTX 3050 ti

Issue:
When running the command the output is,
[WARN] 24 bit formats are unsupported, hyprpicker may or may not work as intended! #000000
If I keep my cursor completely still and navigate via keyboard, the screen does not go black. As soon as I start moving my cursor, the screen blacks out. Since my screen goes entirely black after launching, I can only click on the black of the screen, resulting in the hex code above. My cursor also changes to the xwayland default cursor while the program is running. Nothing crashes. As soon as I either "ESC" or click on the black screen, the program finishes. Thanks for the great WM, hope I can make use of the colorpicker as well.

Version:
I tried the current AUR package (r8.0fc1134-1) and compiled main with latest commit. Both having the same exact issue and output in terminal.

Error building git on Ubuntu 23.10

Until recently hyprpicker was building successfully. Now I'm getting this error during compilation:

error: invalid argument '-std=c++23' not allowed with 'C'
gmake[3]: *** [CMakeFiles/hyprpicker.dir/build.make:174: CMakeFiles/hyprpicker.dir/wlr-layer-shell-unstable-v1-protocol.c.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
1 warning generated.
gmake[2]: *** [CMakeFiles/Makefile2:83: CMakeFiles/hyprpicker.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/hyprpicker.dir/rule] Error 2
gmake: *** [Makefile:189: hyprpicker] Error 2

I'm using clang/clang++ 18.1 and Hyprland 0.36 (manual build copy). Any advice would be appreciated.
Thanks.

hyprpicker command returns: segmentation fault (core dumped)

Description

hyprpicker commands returns this message to the console when executing it:

segmentation fault (core dumped) 

System info

OS: openSUSE Tumbleweed x86_64
Kernel: 6.6.1-1-default
Shell: bash 5.2.15
Resolution: 2560x1440
DE: Hyprland
Terminal: kitty
CPU: AMD Ryzen 7 1700X (16) @ 3.400GHz
GPU: AMD ATI Radeon RX 5600 OEM/5600 XT / 5700/5700 XT
Memory: 7453MiB / 32016MiB

hyprland version (from zypper): 0.32.3-1.1
hyprpicker version (from build.opensuse.org/home:smolsheep): 0.2.0-2.4

Log/core dump info

gdb /usr/bin/hyprpicker

GNU gdb (GDB; openSUSE Tumbleweed) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.opensuse.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/hyprpicker...

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.opensuse.org/>
Enable debuginfod for this session? (y or [n]) n
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
(No debugging symbols found in /usr/bin/hyprpicker)
(gdb) run
Starting program: /usr/bin/hyprpicker 
Missing separate debuginfos, use: zypper install hyprpicker-debuginfo-0.2.0-2.4.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x000055555555e693 in CHyprpicker::recheckACK() ()
corecoredumpctl info /usr/bin/hyprpickerdumpctl info /usr/bin/hyprpicker

           PID: 30777 (hyprpicker)
           UID: 1000 (ricardo)
           GID: 1000 (ricardo)
        Signal: 11 (SEGV)
     Timestamp: Fri 2023-11-17 23:46:37 CET (9min ago)
  Command Line: hyprpicker
    Executable: /usr/bin/hyprpicker
 Control Group: /user.slice/user-1000.slice/session-3.scope
          Unit: session-3.scope
         Slice: user-1000.slice
       Session: 3
     Owner UID: 1000 (ricardo)
       Boot ID: 1f3422e6568c4d98bace3b9927a621d7
    Machine ID: 7705050f974844688d71b678d48a076b
      Hostname: localhost.localdomain
       Storage: /var/lib/systemd/coredump/core.hyprpicker.1000.1f3422e6568c4d98bace3b9927a621d7.30777.1700261197000000.zst (present)
  Size on Disk: 139.6K
       Message: Process 30777 (hyprpicker) of user 1000 dumped core.
                
                Stack trace of thread 30777:
                #0  0x0000564d55e7f693 _ZN11CHyprpicker10recheckACKEv (hyprpicker + 0xa693)
                #1  0x00007f1fee0c6962 n/a (libffi.so.8 + 0x7962)
                #2  0x00007f1fee0c32df n/a (libffi.so.8 + 0x42df)
                #3  0x00007f1fee0c5f26 ffi_call (libffi.so.8 + 0x6f26)
                #4  0x00007f1fee278a23 n/a (libwayland-client.so.0 + 0x7a23)
                #5  0x00007f1fee279203 n/a (libwayland-client.so.0 + 0x8203)
                #6  0x00007f1fee279494 wl_display_dispatch_queue_pending (libwayland-client.so.0 + 0x8494)
                #7  0x00007f1fee27bf8f wl_display_roundtrip_queue (libwayland-client.so.0 + 0xaf8f)
                #8  0x0000564d55e7d8f9 _ZN11CHyprpicker4initEv (hyprpicker + 0x88f9)
                #9  0x0000564d55e7ab3d main (hyprpicker + 0x5b3d)
                #10 0x00007f1feda281b0 __libc_start_call_main (libc.so.6 + 0x281b0)
                #11 0x00007f1feda28279 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x28279)
                #12 0x0000564d55e7ac25 _start (hyprpicker + 0x5c25)
                ELF object binary architecture: AMD x86-64

Add a flag to hide the cursor in hyprpicker

Resolves hyprwm/contrib#92

I know that the flag itself seems unnecessary/unfitting for this project, but considering that a good chunk of users use hyprpicker solely for "freezing" their monitors, I see this as necessary.

Because, without this (in the case of grimblast), the user's actual mouse cursor isn't captured in their screenshots. Instead, a part of a crosshair cursor is shown in the corner of their screenshot (when taking a screenshot of a region).

Requested changes: When the flag is passed,

  • Capture and show the user's original cursor (captured before running hyprpicker) as well in hyprpicker.
  • Hide the user's current cursor (the crosshair shown when the user moves around their mouse in hyprpicker).

I'm open to create a PR if maintainers aren't opposed to this proposal.

Cachix?

Could you add hyprpicker to cachix so that I don't have to build everytime? thanks

output bug

❯ wl-copy -c
❯ hyprpicker | wl-copy
❯ wl-paste

❯ hyprpicker --autocopy | wl-copy
❯ wl-paste
#066FB6

Feature: cancel color picking

When invoking Hyprpicker to pick a color, it would be nice to be able to cancel the operation and not overwrite the clipboard. This could be done by handling an escape keypress for example, and quitting without copying to clipboard if that is pressed.

Error while downloading hyprpicker via yay

So, I tried to install hyprpicker via yay and got an error:

make: entering directory "/home/padlakun/.cache/yay/hyprpicker-git/src/hyprpicker"
make: *** There is no rule for building the "all" target. Stop.
make: exit directory "/home/padlakun/.cache/yay/hyprpicker-git/src/hyprpicker"
==> ERROR: There was a failure in build().
Interrupt...
-> build error: hyprpicker-git-exit status 4
-> Failed to install the following packages. Manual intervention is required:
hyprpicker-git - exit status 4

Distro: Arch; Kernel: cachyos-bore 6.8.1-3

segfault: Invalid stride (9023)

I'm currently running hyprland and hyprpicker fails with the following error message:

[destroyed object]: error 1: Invalid stride (9023)
Segmentation fault (core dumped)

I am using EndeavourOS with a Surface Laptop 4 with the linux-surface kernel. I've noticed other issues mentioned having a Nvidia GPU but this appears to have been fixed since this works on my desktop which has a 3070ti.

Sample an area for color picking

This work great!

It would work even greater though , :) if there was an option to sample a given area (--sample [area], where areas could be 3x3 or 5x5 etc) and pick the average color of the area.

The issue is that from same dithered images it is difficult/impossible to pick up a color when you have to pick a specific pixel only.

Add option for lowercase hex

I prefer lowercase hex but hyprpicker only outputs uppercase hex and there seems to be no option to change that.

Workaround:

hyprpicker | tr '[:upper:]' '[:lower:]' | wl-copy

Flatpak?

I would really appreciate a distro independent way to install this. I'm not really into compiling myself right now.

I tried https://copr.fedorainfracloud.org/coprs/g/fedora-review/fedora-review-2244782-hyprpicker (4 months old) but it fails with

connect(3, {sa_family=AF_UNIX, sun_path="/run/user/1000/wayland-0"}, 27) = 0
rt_sigaction(SIGTERM, {sa_handler=0x558909934580, sa_mask=[TERM], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f5f636389a0}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\0\0\1\0\f\0\2\0\0\0\1\0\0\0\0\0\f\0\3\0\0\0", iov_len=24}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 24
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\2\0\0\0\0\0$\0\1\0\0\0\16\0\0\0wl_compositor\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 2148
brk(0x55890ac07000)                     = 0x55890ac07000
sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\2\0\0\0\0\0(\0\1\0\0\0\16\0\0\0wl_compositor\0\0\0"..., iov_len=332}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 332
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x40} ---
+++ killed by SIGSEGV (core dumped) +++

Invalid buffer stride

Running hyprpicker causes an instant abort with the error zwlr_screencopy_frame_v1@11: error 1: invalid buffer stride on NixOS.

Segmentation fault (core dumped)

I'm using the latest package on NixOS. I just upgraded to the Nvidia 545 driver. It was working before. This one, v0.2.0: hyprpicker

~ ❯ hyprpicker
Segmentation fault (core dumped)
~ ❯ hyprpicker -h
Hyprpicker usage: hyprpicker [arg [...]].

Arguments:
 -a | --autocopy          | Automatically copies the output to the clipboard (requires wl-clipboard)
 -f | --format=fmt        | Specifies the output format (cmyk, hex, rgb, hsl, hsv)
 -n | --no-fancy          | Disables the "fancy" (aka. colored) outputting
 -h | --help              | Show this help message
 -r | --render-inactive   | Render (freeze) inactive displays
 -z | --no-zoom           | Disable the zoom lens

image

error: 'uint' has not been declared

> make all
make clear
make[1]: Entering directory '/home/hugo/src/github.com/hyprwm/hyprpicker'
rm -rf build
rm -f *.o *-protocol.h *-protocol.c
make[1]: Leaving directory '/home/hugo/src/github.com/hyprwm/hyprpicker'
make protocols
make[1]: Entering directory '/home/hugo/src/github.com/hyprwm/hyprpicker'
/usr/bin/wayland-scanner private-code \
	protocols/wlr-layer-shell-unstable-v1.xml wlr-layer-shell-unstable-v1-protocol.c
/usr/bin/wayland-scanner client-header \
	protocols/wlr-layer-shell-unstable-v1.xml wlr-layer-shell-unstable-v1-protocol.h
cc -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function -Wno-unused-variable -Wno-unused-result -Wdeclaration-after-statement -I. -DWLR_USE_UNSTABLE -std=c99 -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm    -c -o wlr-layer-shell-unstable-v1-protocol.o wlr-layer-shell-unstable-v1-protocol.c
/usr/bin/wayland-scanner private-code \
	protocols/wlr-screencopy-unstable-v1.xml wlr-screencopy-unstable-v1-protocol.c
/usr/bin/wayland-scanner client-header \
	protocols/wlr-screencopy-unstable-v1.xml wlr-screencopy-unstable-v1-protocol.h
cc -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function -Wno-unused-variable -Wno-unused-result -Wdeclaration-after-statement -I. -DWLR_USE_UNSTABLE -std=c99 -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm    -c -o wlr-screencopy-unstable-v1-protocol.o wlr-screencopy-unstable-v1-protocol.c
/usr/bin/wayland-scanner private-code \
	//usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.c
/usr/bin/wayland-scanner client-header \
	//usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.h
cc -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function -Wno-unused-variable -Wno-unused-result -Wdeclaration-after-statement -I. -DWLR_USE_UNSTABLE -std=c99 -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm    -c -o xdg-shell-protocol.o xdg-shell-protocol.c
make[1]: Leaving directory '/home/hugo/src/github.com/hyprwm/hyprpicker'
make release
make[1]: Entering directory '/home/hugo/src/github.com/hyprwm/hyprpicker'
mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 13.1.1
-- The CXX compiler identification is GNU 13.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring hyprpicker!
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.9.5") 
-- Checking for modules 'wayland-client;wayland-protocols;cairo;pango;pangocairo;libjpeg'
--   Found wayland-client, version 1.22.0
--   Found wayland-protocols, version 1.31
--   Found cairo, version 1.17.8
--   Found pango, version 1.50.14
--   Found pangocairo, version 1.50.14
--   Found libjpeg, version 2.1.5.1
-- Configuring done (0.2s)
-- Generating done (0.0s)
-- Build files have been written to: /home/hugo/src/github.com/hyprwm/hyprpicker/build
cmake --build ./build --config Release --target all -j 10
[1/8] Building CXX object CMakeFiles/hyprpicker.dir/src/main.cpp.o
[2/8] Building CXX object CMakeFiles/hyprpicker.dir/src/hyprpicker.cpp.o
[3/8] Building CXX object CMakeFiles/hyprpicker.dir/src/helpers/Vector2D.cpp.o
[4/8] Building CXX object CMakeFiles/hyprpicker.dir/src/helpers/LayerSurface.cpp.o
[5/8] Building CXX object CMakeFiles/hyprpicker.dir/src/events/Events.cpp.o
[6/8] Building CXX object CMakeFiles/hyprpicker.dir/src/debug/Log.cpp.o
[7/8] Building CXX object CMakeFiles/hyprpicker.dir/src/clipboard/Clipboard.cpp.o
ninja: job failed: /usr/bin/c++ -DGIT_BRANCH=\"main\" -DGIT_COMMIT_HASH=\"deaca6a4d8e307d90b1f5b1033a8ea6c83b9b260\" -DGIT_COMMIT_MESSAGE="\"    core: avoid leaving garbage buffers on exit\"" -DGIT_DIRTY=\"\" -I/home/hugo/src/github.com/hyprwm/hyprpicker/. -isystem /usr/include/pango-1.0 -isystem /usr/include/harfbuzz -isystem /usr/include/cairo -isystem /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -isystem /usr/include/freetype2 -isystem /usr/include/blkid -isystem /usr/include/libmount -isystem /usr/include/pixman-1 -isystem /usr/include/fribidi -isystem /usr/include/libpng16 -O3 -DNDEBUG -std=c++23 -DWLR_USE_UNSTABLE -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -pthread -MD -MT CMakeFiles/hyprpicker.dir/src/helpers/LayerSurface.cpp.o -MF CMakeFiles/hyprpicker.dir/src/helpers/LayerSurface.cpp.o.d -o CMakeFiles/hyprpicker.dir/src/helpers/LayerSurface.cpp.o -c /home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/LayerSurface.cpp
In file included from /home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/LayerSurface.cpp:3:
/home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/../events/Events.hpp:36:69: error: 'uint' has not been declared
   36 |     void handleKeyboardKeymap(void* data, wl_keyboard* wl_keyboard, uint format, int fd, uint size);
      |                                                                     ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/../events/Events.hpp:36:90: error: 'uint' has not been declared
   36 |     void handleKeyboardKeymap(void* data, wl_keyboard* wl_keyboard, uint format, int fd, uint size);
      |                                                                                          ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/../events/Events.hpp:40:68: error: 'uint' has not been declared
   40 |     void handleKeyboardEnter(void* data, wl_keyboard* wl_keyboard, uint serial, wl_surface* surface, wl_array* keys);
      |                                                                    ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/../events/Events.hpp:42:68: error: 'uint' has not been declared
   42 |     void handleKeyboardLeave(void* data, wl_keyboard* wl_keyboard, uint serial, wl_surface* surface);
      |                                                                    ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/../events/Events.hpp:44:72: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                        ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/../events/Events.hpp:44:85: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                                     ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/../events/Events.hpp:44:106: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                                                          ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/../events/Events.hpp:44:125: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                                                                             ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/../events/Events.hpp:44:143: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                                                                                               ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/../events/Events.hpp:68:70: error: invalid conversion from 'void (*)(void*, wl_keyboard*, int, int, int)' to 'void (*)(void*, wl_keyboard*, uint32_t, int32_t, uint32_t)' {aka 'void (*)(void*, wl_keyboard*, unsigned int, int, unsigned int)'} [-fpermissive]
   68 |     inline const wl_keyboard_listener keyboardListener = { .keymap = handleKeyboardKeymap, .enter = handleKeyboardEnter,.leave = handleKeyboardLeave, .key = handleKeyboardKey, .modifiers = handleKeyboardModifiers };
      |                                                                      ^~~~~~~~~~~~~~~~~~~~
      |                                                                      |
      |                                                                      void (*)(void*, wl_keyboard*, int, int, int)
/home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/../events/Events.hpp:68:101: error: invalid conversion from 'void (*)(void*, wl_keyboard*, int, wl_surface*, wl_array*)' to 'void (*)(void*, wl_keyboard*, uint32_t, wl_surface*, wl_array*)' {aka 'void (*)(void*, wl_keyboard*, unsigned int, wl_surface*, wl_array*)'} [-fpermissive]
   68 |     inline const wl_keyboard_listener keyboardListener = { .keymap = handleKeyboardKeymap, .enter = handleKeyboardEnter,.leave = handleKeyboardLeave, .key = handleKeyboardKey, .modifiers = handleKeyboardModifiers };
      |                                                                                                     ^~~~~~~~~~~~~~~~~~~
      |                                                                                                     |
      |                                                                                                     void (*)(void*, wl_keyboard*, int, wl_surface*, wl_array*)
/home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/../events/Events.hpp:68:130: error: invalid conversion from 'void (*)(void*, wl_keyboard*, int, wl_surface*)' to 'void (*)(void*, wl_keyboard*, uint32_t, wl_surface*)' {aka 'void (*)(void*, wl_keyboard*, unsigned int, wl_surface*)'} [-fpermissive]
   68 |     inline const wl_keyboard_listener keyboardListener = { .keymap = handleKeyboardKeymap, .enter = handleKeyboardEnter,.leave = handleKeyboardLeave, .key = handleKeyboardKey, .modifiers = handleKeyboardModifiers };
      |                                                                                                                                  ^~~~~~~~~~~~~~~~~~~
      |                                                                                                                                  |
      |                                                                                                                                  void (*)(void*, wl_keyboard*, int, wl_surface*)
/home/hugo/src/github.com/hyprwm/hyprpicker/src/helpers/../events/Events.hpp:68:190: error: invalid conversion from 'void (*)(void*, wl_keyboard*, int, int, int, int, int)' to 'void (*)(void*, wl_keyboard*, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)' {aka 'void (*)(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)'} [-fpermissive]
   68 |     inline const wl_keyboard_listener keyboardListener = { .keymap = handleKeyboardKeymap, .enter = handleKeyboardEnter,.leave = handleKeyboardLeave, .key = handleKeyboardKey, .modifiers = handleKeyboardModifiers };
      |                                                                                                                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                                                                                                              |
      |                                                                                                                                                                                              void (*)(void*, wl_keyboard*, int, int, int, int, int)
ninja: job failed: /usr/bin/c++ -DGIT_BRANCH=\"main\" -DGIT_COMMIT_HASH=\"deaca6a4d8e307d90b1f5b1033a8ea6c83b9b260\" -DGIT_COMMIT_MESSAGE="\"    core: avoid leaving garbage buffers on exit\"" -DGIT_DIRTY=\"\" -I/home/hugo/src/github.com/hyprwm/hyprpicker/. -isystem /usr/include/pango-1.0 -isystem /usr/include/harfbuzz -isystem /usr/include/cairo -isystem /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -isystem /usr/include/freetype2 -isystem /usr/include/blkid -isystem /usr/include/libmount -isystem /usr/include/pixman-1 -isystem /usr/include/fribidi -isystem /usr/include/libpng16 -O3 -DNDEBUG -std=c++23 -DWLR_USE_UNSTABLE -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -pthread -MD -MT CMakeFiles/hyprpicker.dir/src/hyprpicker.cpp.o -MF CMakeFiles/hyprpicker.dir/src/hyprpicker.cpp.o.d -o CMakeFiles/hyprpicker.dir/src/hyprpicker.cpp.o -c /home/hugo/src/github.com/hyprwm/hyprpicker/src/hyprpicker.cpp
In file included from /home/hugo/src/github.com/hyprwm/hyprpicker/src/hyprpicker.cpp:3:
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:36:69: error: 'uint' has not been declared
   36 |     void handleKeyboardKeymap(void* data, wl_keyboard* wl_keyboard, uint format, int fd, uint size);
      |                                                                     ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:36:90: error: 'uint' has not been declared
   36 |     void handleKeyboardKeymap(void* data, wl_keyboard* wl_keyboard, uint format, int fd, uint size);
      |                                                                                          ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:40:68: error: 'uint' has not been declared
   40 |     void handleKeyboardEnter(void* data, wl_keyboard* wl_keyboard, uint serial, wl_surface* surface, wl_array* keys);
      |                                                                    ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:42:68: error: 'uint' has not been declared
   42 |     void handleKeyboardLeave(void* data, wl_keyboard* wl_keyboard, uint serial, wl_surface* surface);
      |                                                                    ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:44:72: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                        ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:44:85: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                                     ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:44:106: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                                                          ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:44:125: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                                                                             ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:44:143: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                                                                                               ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:68:70: error: invalid conversion from 'void (*)(void*, wl_keyboard*, int, int, int)' to 'void (*)(void*, wl_keyboard*, uint32_t, int32_t, uint32_t)' {aka 'void (*)(void*, wl_keyboard*, unsigned int, int, unsigned int)'} [-fpermissive]
   68 |     inline const wl_keyboard_listener keyboardListener = { .keymap = handleKeyboardKeymap, .enter = handleKeyboardEnter,.leave = handleKeyboardLeave, .key = handleKeyboardKey, .modifiers = handleKeyboardModifiers };
      |                                                                      ^~~~~~~~~~~~~~~~~~~~
      |                                                                      |
      |                                                                      void (*)(void*, wl_keyboard*, int, int, int)
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:68:101: error: invalid conversion from 'void (*)(void*, wl_keyboard*, int, wl_surface*, wl_array*)' to 'void (*)(void*, wl_keyboard*, uint32_t, wl_surface*, wl_array*)' {aka 'void (*)(void*, wl_keyboard*, unsigned int, wl_surface*, wl_array*)'} [-fpermissive]
   68 |     inline const wl_keyboard_listener keyboardListener = { .keymap = handleKeyboardKeymap, .enter = handleKeyboardEnter,.leave = handleKeyboardLeave, .key = handleKeyboardKey, .modifiers = handleKeyboardModifiers };
      |                                                                                                     ^~~~~~~~~~~~~~~~~~~
      |                                                                                                     |
      |                                                                                                     void (*)(void*, wl_keyboard*, int, wl_surface*, wl_array*)
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:68:130: error: invalid conversion from 'void (*)(void*, wl_keyboard*, int, wl_surface*)' to 'void (*)(void*, wl_keyboard*, uint32_t, wl_surface*)' {aka 'void (*)(void*, wl_keyboard*, unsigned int, wl_surface*)'} [-fpermissive]
   68 |     inline const wl_keyboard_listener keyboardListener = { .keymap = handleKeyboardKeymap, .enter = handleKeyboardEnter,.leave = handleKeyboardLeave, .key = handleKeyboardKey, .modifiers = handleKeyboardModifiers };
      |                                                                                                                                  ^~~~~~~~~~~~~~~~~~~
      |                                                                                                                                  |
      |                                                                                                                                  void (*)(void*, wl_keyboard*, int, wl_surface*)
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:68:190: error: invalid conversion from 'void (*)(void*, wl_keyboard*, int, int, int, int, int)' to 'void (*)(void*, wl_keyboard*, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)' {aka 'void (*)(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)'} [-fpermissive]
   68 |     inline const wl_keyboard_listener keyboardListener = { .keymap = handleKeyboardKeymap, .enter = handleKeyboardEnter,.leave = handleKeyboardLeave, .key = handleKeyboardKey, .modifiers = handleKeyboardModifiers };
      |                                                                                                                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                                                                                                              |
      |                                                                                                                                                                                              void (*)(void*, wl_keyboard*, int, int, int, int, int)
ninja: job failed: /usr/bin/c++ -DGIT_BRANCH=\"main\" -DGIT_COMMIT_HASH=\"deaca6a4d8e307d90b1f5b1033a8ea6c83b9b260\" -DGIT_COMMIT_MESSAGE="\"    core: avoid leaving garbage buffers on exit\"" -DGIT_DIRTY=\"\" -I/home/hugo/src/github.com/hyprwm/hyprpicker/. -isystem /usr/include/pango-1.0 -isystem /usr/include/harfbuzz -isystem /usr/include/cairo -isystem /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -isystem /usr/include/freetype2 -isystem /usr/include/blkid -isystem /usr/include/libmount -isystem /usr/include/pixman-1 -isystem /usr/include/fribidi -isystem /usr/include/libpng16 -O3 -DNDEBUG -std=c++23 -DWLR_USE_UNSTABLE -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -pthread -MD -MT CMakeFiles/hyprpicker.dir/src/events/Events.cpp.o -MF CMakeFiles/hyprpicker.dir/src/events/Events.cpp.o.d -o CMakeFiles/hyprpicker.dir/src/events/Events.cpp.o -c /home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.cpp
In file included from /home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.cpp:1:
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:36:69: error: 'uint' has not been declared
   36 |     void handleKeyboardKeymap(void* data, wl_keyboard* wl_keyboard, uint format, int fd, uint size);
      |                                                                     ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:36:90: error: 'uint' has not been declared
   36 |     void handleKeyboardKeymap(void* data, wl_keyboard* wl_keyboard, uint format, int fd, uint size);
      |                                                                                          ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:40:68: error: 'uint' has not been declared
   40 |     void handleKeyboardEnter(void* data, wl_keyboard* wl_keyboard, uint serial, wl_surface* surface, wl_array* keys);
      |                                                                    ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:42:68: error: 'uint' has not been declared
   42 |     void handleKeyboardLeave(void* data, wl_keyboard* wl_keyboard, uint serial, wl_surface* surface);
      |                                                                    ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:44:72: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                        ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:44:85: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                                     ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:44:106: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                                                          ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:44:125: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                                                                             ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:44:143: error: 'uint' has not been declared
   44 |     void handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group);
      |                                                                                                                                               ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:68:70: error: invalid conversion from 'void (*)(void*, wl_keyboard*, int, int, int)' to 'void (*)(void*, wl_keyboard*, uint32_t, int32_t, uint32_t)' {aka 'void (*)(void*, wl_keyboard*, unsigned int, int, unsigned int)'} [-fpermissive]
   68 |     inline const wl_keyboard_listener keyboardListener = { .keymap = handleKeyboardKeymap, .enter = handleKeyboardEnter,.leave = handleKeyboardLeave, .key = handleKeyboardKey, .modifiers = handleKeyboardModifiers };
      |                                                                      ^~~~~~~~~~~~~~~~~~~~
      |                                                                      |
      |                                                                      void (*)(void*, wl_keyboard*, int, int, int)
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:68:101: error: invalid conversion from 'void (*)(void*, wl_keyboard*, int, wl_surface*, wl_array*)' to 'void (*)(void*, wl_keyboard*, uint32_t, wl_surface*, wl_array*)' {aka 'void (*)(void*, wl_keyboard*, unsigned int, wl_surface*, wl_array*)'} [-fpermissive]
   68 |     inline const wl_keyboard_listener keyboardListener = { .keymap = handleKeyboardKeymap, .enter = handleKeyboardEnter,.leave = handleKeyboardLeave, .key = handleKeyboardKey, .modifiers = handleKeyboardModifiers };
      |                                                                                                     ^~~~~~~~~~~~~~~~~~~
      |                                                                                                     |
      |                                                                                                     void (*)(void*, wl_keyboard*, int, wl_surface*, wl_array*)
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:68:130: error: invalid conversion from 'void (*)(void*, wl_keyboard*, int, wl_surface*)' to 'void (*)(void*, wl_keyboard*, uint32_t, wl_surface*)' {aka 'void (*)(void*, wl_keyboard*, unsigned int, wl_surface*)'} [-fpermissive]
   68 |     inline const wl_keyboard_listener keyboardListener = { .keymap = handleKeyboardKeymap, .enter = handleKeyboardEnter,.leave = handleKeyboardLeave, .key = handleKeyboardKey, .modifiers = handleKeyboardModifiers };
      |                                                                                                                                  ^~~~~~~~~~~~~~~~~~~
      |                                                                                                                                  |
      |                                                                                                                                  void (*)(void*, wl_keyboard*, int, wl_surface*)
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.hpp:68:190: error: invalid conversion from 'void (*)(void*, wl_keyboard*, int, int, int, int, int)' to 'void (*)(void*, wl_keyboard*, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)' {aka 'void (*)(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)'} [-fpermissive]
   68 |     inline const wl_keyboard_listener keyboardListener = { .keymap = handleKeyboardKeymap, .enter = handleKeyboardEnter,.leave = handleKeyboardLeave, .key = handleKeyboardKey, .modifiers = handleKeyboardModifiers };
      |                                                                                                                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                                                                                                              |
      |                                                                                                                                                                                              void (*)(void*, wl_keyboard*, int, int, int, int, int)
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.cpp:246:73: error: 'uint' has not been declared
  246 | void Events::handleKeyboardKeymap(void* data, wl_keyboard* wl_keyboard, uint format, int fd, uint size) {}
      |                                                                         ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.cpp:246:94: error: 'uint' has not been declared
  246 | void Events::handleKeyboardKeymap(void* data, wl_keyboard* wl_keyboard, uint format, int fd, uint size) {}
      |                                                                                              ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.cpp:253:72: error: 'uint' has not been declared
  253 | void Events::handleKeyboardEnter(void* data, wl_keyboard* wl_keyboard, uint serial, wl_surface* surface, wl_array* keys) {}
      |                                                                        ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.cpp:255:72: error: 'uint' has not been declared
  255 | void Events::handleKeyboardLeave(void* data, wl_keyboard* wl_keyboard, uint serial, wl_surface* surface) {}
      |                                                                        ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.cpp:257:76: error: 'uint' has not been declared
  257 | void Events::handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group) {}
      |                                                                            ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.cpp:257:89: error: 'uint' has not been declared
  257 | void Events::handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group) {}
      |                                                                                         ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.cpp:257:110: error: 'uint' has not been declared
  257 | void Events::handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group) {}
      |                                                                                                              ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.cpp:257:129: error: 'uint' has not been declared
  257 | void Events::handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group) {}
      |                                                                                                                                 ^~~~
/home/hugo/src/github.com/hyprwm/hyprpicker/src/events/Events.cpp:257:147: error: 'uint' has not been declared
  257 | void Events::handleKeyboardModifiers(void* data, wl_keyboard* wl_keyboard, uint serial, uint mods_depressed, uint mods_latched, uint mods_locked, uint group) {}
      |                                                                                                                                                   ^~~~
ninja: subcommands failed
make[1]: *** [Makefile:53: release] Error 1
make[1]: Leaving directory '/home/hugo/src/github.com/hyprwm/hyprpicker'
make: *** [Makefile:62: all] Error 2

It's unclear to me if I'm missing a dependency or what's going on.

Copy of magnifier stays on screen after moving cursor to another screen

Unless I move my cursor between screens slowly the magnifier circle is still visible close to the edge of the screen that I moved my cursor from.

I'm guessing what is visible is the last frame before I moved the cursor to the other screen since it's not always the same distance from the edge.

I'd assume the fix would be to render one more frame after the cursor leaves the screen.

I'm using hyprpicker 0.2.0-2.
I have the problem with and without -r option which I had hoped would fix it.

[destroyed object]: error 1: Invalid stride(10240)

System: ArchLinux with Nvidia

[WARN] 24 bit formats are unsupported, hyprpicker may or may not work as intended!
[destroyed object]: error 1: Invalid stride (10240)
Segmentation fault (core dumped)

The output of bt -full is listed below.

#0  0x00007ffff7f3e415 in  () at /usr/lib/libwayland-client.so.0
#1  0x00007ffff7f3e573 in  () at /usr/lib/libwayland-client.so.0
#2  0x00007ffff7f40132 in wl_proxy_marshal_array_flags () at /usr/lib/libwayland-client.so.0
#3  0x00007ffff7f40bda in wl_proxy_marshal_flags () at /usr/lib/libwayland-client.so.0
#4  0x000000000040bbd8 in wl_surface_destroy(wl_surface*) (wl_surface=0x45ca70)
    at /usr/include/wayland-client-protocol.h:3733
#5  0x000000000040b9db in CLayerSurface::~CLayerSurface() (this=0x45c8b0, __in_chrg=<optimized out>)
    at /home/Leo/Personal/hyprpicker/src/helpers/LayerSurface.cpp:37
#6  0x000000000040b564 in std::default_delete<CLayerSurface>::operator()(CLayerSurface*) const
    (this=0x45e8e0, __ptr=0x45c8b0) at /usr/include/c++/13.2.1/bits/unique_ptr.h:99
#7  0x000000000040b4d2 in std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> >::~unique_ptr() (this=0x45e8e0, __in_chrg=<optimized out>) at /usr/include/c++/13.2.1/bits/unique_ptr.h:404
        __ptr = @0x45e8e0: 0x45c8b0
#8  0x000000000040b457 in std::destroy_at<std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> > >(std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> >*) (__location=0x45e8e0)
    at /usr/include/c++/13.2.1/bits/stl_construct.h:88
#9  0x000000000040b3ff in std::_Destroy<std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> > >(std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> >*) (__pointer=0x45e8e0)
    at /usr/include/c++/13.2.1/bits/stl_construct.h:149
#10 0x000000000040b39e in std::_Destroy_aux<false>::__destroy<std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> >*>(std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> >*, std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> >*) (__first=0x45e8e0, __last=0x45e8e8)
    at /usr/include/c++/13.2.1/bits/stl_construct.h:163
--Type <RET> for more, q to quit, c to continue without paging--
 >*>(std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> >*, std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> >*) (__first=0x45e8e0, __last=0x45e8e8)
    at /usr/include/c++/13.2.1/bits/stl_construct.h:196
#12 0x000000000040b102 in std::_Destroy<std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> >*, std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> > >(std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> >*, std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> >*, std::allocator<std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> > >&)
    (__last=0x45e8e8, __first=0x45e8e0) at /usr/include/c++/13.2.1/bits/alloc_traits.h:947
#13 std::vector<std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> >, std::allocator<std::unique_ptr<CLayerSurface, std::default_delete<CLayerSurface> > > >::~vector()
    (this=0x4566d8, __in_chrg=<optimized out>) at /usr/include/c++/13.2.1/bits/stl_vector.h:732
#14 0x000000000040afca in CHyprpicker::~CHyprpicker() (this=0x456640, __in_chrg=<optimized out>) at /home/Leo/Personal/hyprpicker/src/helpers/../hyprpicker.hpp:16
#15 0x000000000040b006 in std::default_delete<CHyprpicker>::operator()(CHyprpicker*) const (this=0x4196d8 <g_pHyprpicker>, __ptr=0x456640) at /usr/include/c++/13.2.1/bits/unique_ptr.h:99
#16 0x000000000040af2a in std::unique_ptr<CHyprpicker, std::default_delete<CHyprpicker> >::~unique_ptr() (this=0x4196d8 <g_pHyprpicker>, __in_chrg=<optimized out>) at /usr/include/c++/13.2.1/bits/unique_ptr.h:404
        __ptr = @0x4196d8: 0x456640
#17 0x00007ffff745ecc6 in  () at /usr/lib/libc.so.6
#18 0x00007ffff745ee10 in  () at /usr/lib/libc.so.6
#19 0x00007ffff7445cd7 in  () at /usr/lib/libc.so.6
#20 0x00007ffff7445d8a in __libc_start_main () at /usr/lib/libc.so.6
#21 0x00000000004045d5 in _start ()

Cancel with actual Escape key

Support was added in #20 to cancel colour picking with the Escape key.
This is mapped to the physical Escape key on most keyboards, which is not always the actual Escape key
(eg. I have swapped Escape and Caps Lock on my keyboard).

Crash on exit when built against libc++

Affects libc++ at least from LLVM 10-16 (-std=c++2b or -std=c++17).

Clang backtrace
$ export CC=clang CXX=clang++ CXXFLAGS=-stdlib=libc++
$ cmake -G Ninja -B /tmp/hyprpicker_build
$ cmake --build /tmp/hyprpicker_build
$ cmake --install /tmp/hyprpicker_build

$ hyprpicker
<press ESC to exit>
Segmentation fault

* thread #1, name = 'hyprpicker', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)
    frame #0: 0x00000000002111ae hyprpicker`CLayerSurface::~CLayerSurface(this=0x0000000835f2d000) at LayerSurface.cpp:39:37
   36       wl_surface_destroy(pSurface);
   37       zwlr_layer_surface_v1_destroy(pLayerSurface);
   38
-> 39       wl_display_flush(g_pHyprpicker->m_pWLDisplay);
   40   }
(lldb) p g_pHyprpicker
(std::unique_ptr<CHyprpicker, std::default_delete<CHyprpicker> >) $0 = nullptr {
  __ptr_ = {
    std::__1::__compressed_pair_elem<CHyprpicker *, 0, false> = {
      __value_ = nullptr
    }
  }
}
(lldb) bt
* thread #1, name = 'hyprpicker', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)
  * frame #0: 0x00000000002111ae hyprpicker`CLayerSurface::~CLayerSurface(this=0x0000000835f2d000) at LayerSurface.cpp:39:37
    frame #1: 0x000000000020e5fb hyprpicker`std::__1::default_delete<CLayerSurface>::operator(this=0x0000000835eea010, __ptr=0x0000000835f2d000)[abi:v160000](CLayerSurface*) const at unique_ptr.h:65:5
    frame #2: 0x000000000020e57c hyprpicker`std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >::reset[abi:v160000](this=0x0000000835eea010, __p=0x0000000000000000) at unique_ptr.h:297:7
    frame #3: 0x000000000020e519 hyprpicker`std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >::~unique_ptr[abi:v160000](this=0x0000000835eea010) at unique_ptr.h:263:75
    frame #4: 0x000000000020e4f5 hyprpicker`void std::__1::__destroy_at[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, 0>(__loc=0x0000000835eea010) at construct_at.h:66:13
    frame #5: 0x000000000020e4d5 hyprpicker`void std::__1::destroy_at[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, 0>(__loc=0x0000000835eea010) at construct_at.h:91:5
    frame #6: 0x000000000020e4b9 hyprpicker`void std::__1::allocator_traits<std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::destroy[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, void, void>((null)=0x0000000835f13068, __p=0x0000000835eea010) at allocator_traits.h:323:9
    frame #7: 0x000000000020e478 hyprpicker`std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__base_destruct_at_end[abi:v160000](this=0x0000000835f13058, __new_last=0x0000000835eea010) at vector:836:9
    frame #8: 0x000000000020e328 hyprpicker`std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__clear[abi:v160000](this=0x0000000835f13058) at vector:830:29
    frame #9: 0x000000000020e205 hyprpicker`std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__destroy_vector::operator(this=0x0000000820e85ec0)[abi:v160000]() at vector:446:20
    frame #10: 0x000000000020e0d5 hyprpicker`std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::~vector[abi:v160000](this=0x0000000835f13058) at vector:456:67
    frame #11: 0x000000000020e07a hyprpicker`CHyprpicker::~CHyprpicker(this=0x0000000835f13000) at hyprpicker.hpp:15:7
    frame #12: 0x000000000020e01b hyprpicker`std::__1::default_delete<CHyprpicker>::operator(this=0x0000000000219340, __ptr=0x0000000835f13000)[abi:v160000](CHyprpicker*) const at unique_ptr.h:65:5
    frame #13: 0x000000000020df9c hyprpicker`std::__1::unique_ptr<CHyprpicker, std::__1::default_delete<CHyprpicker> >::reset[abi:v160000](this=0x0000000000219340, __p=0x0000000000000000) at unique_ptr.h:297:7
    frame #14: 0x000000000020d8b9 hyprpicker`std::__1::unique_ptr<CHyprpicker, std::__1::default_delete<CHyprpicker> >::~unique_ptr[abi:v160000](this=0x0000000000219340) at unique_ptr.h:263:75
    frame #15: 0x0000000825fd255a libc.so.7`__cxa_finalize + 362
    frame #16: 0x0000000825fd2ae1 libc.so.7`exit + 33
    frame #17: 0x0000000000211bd3 hyprpicker`CHyprpicker::finish(this=0x0000000835f13000, code=0) at hyprpicker.cpp:45:5
    frame #18: 0x000000000020d5b1 hyprpicker`Events::handleKeyboardKey(data=0x0000000835efc280, keyboard=0x0000000835efc500, serial=4847, time=59417495, key=1, state=1) at Events.cpp:268:24
    frame #19: 0x000000082771161a libffi.so.8`ffi_call_unix64 at unix64.S:104
    frame #20: 0x00000008277108b2 libffi.so.8`ffi_call_int(cif=0x0000000820e86260, fn=(hyprpicker`Events::handleKeyboardKey(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int) at Events.cpp:266), rvalue=0x0000000000000000, avalue=0x0000000820e86290, closure=0x0000000000000000) at ffi64.c:673:3
    frame #21: 0x0000000827710422 libffi.so.8`ffi_call(cif=0x0000000820e86260, fn=(hyprpicker`Events::handleKeyboardKey(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int) at Events.cpp:266), rvalue=0x0000000000000000, avalue=0x0000000820e86290) at ffi64.c:710:3
    frame #22: 0x0000000822f4e858 libwayland-client.so.0`wl_closure_invoke(closure=0x0000000835f2bb00, flags=1, target=0x0000000835efc500, opcode=3, data=0x0000000835efc280) at connection.c:1025:2
    frame #23: 0x0000000822f4c0df libwayland-client.so.0`dispatch_event(display=0x0000000835f18000, queue=0x0000000835f180d0) at wayland-client.c:1595:3
    frame #24: 0x0000000822f4af64 libwayland-client.so.0`dispatch_queue(display=0x0000000835f18000, queue=0x0000000835f180d0) at wayland-client.c:1741:3
    frame #25: 0x0000000822f4ad2d libwayland-client.so.0`wl_display_dispatch_queue_pending(display=0x0000000835f18000, queue=0x0000000835f180d0) at wayland-client.c:1983:8
    frame #26: 0x0000000822f4a8fe libwayland-client.so.0`wl_display_dispatch_queue(display=0x0000000835f18000, queue=0x0000000835f180d0) at wayland-client.c:1959:9
    frame #27: 0x0000000822f4afe0 libwayland-client.so.0`wl_display_dispatch(display=0x0000000835f18000) at wayland-client.c:2026:9
    frame #28: 0x0000000000211a69 hyprpicker`CHyprpicker::init(this=0x0000000835f13000) at hyprpicker.cpp:33:26
    frame #29: 0x0000000000215c9a hyprpicker`main(argc=1, argv=0x0000000820e86640, envp=0x0000000820e86650) at main.cpp:65:20
    frame #30: 0x000000000020a2a0 hyprpicker`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1_c.c:75:7
GCC backtrace
$ export CC=gcc CXX=g++ CXXFLAGS=-stdlib=libc++
$ cmake -G Ninja -B /tmp/hyprpicker_build
$ cmake --build /tmp/hyprpicker_build
$ cmake --install /tmp/hyprpicker_build

$ hyprpicker
<press ESC to exit>
Segmentation fault

CLayerSurface::~CLayerSurface (this=0x801a4b000, __in_chrg=<optimized out>) at hyprpicker-fe4535a/src/helpers/LayerSurface.cpp:39
39          wl_display_flush(g_pHyprpicker->m_pWLDisplay);
(gdb) p g_pHyprpicker
$1 = std::unique_ptr<CHyprpicker> = 0x0
(gdb) bt
#0  CLayerSurface::~CLayerSurface (this=0x801a4b000, __in_chrg=<optimized out>) at hyprpicker-fe4535a/src/helpers/LayerSurface.cpp:39
#1  0x000000000040ae2d in std::__1::default_delete<CLayerSurface>::operator()[abi:v160000](CLayerSurface*) const (__ptr=0x801a4b000, this=0x801a08010)
    at /usr/include/c++/v1/__memory/unique_ptr.h:65
#2  std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >::reset[abi:v160000](CLayerSurface*) (__p=0x0, this=0x801a08010)
    at /usr/include/c++/v1/__memory/unique_ptr.h:297
#3  std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >::~unique_ptr[abi:v160000]() (this=0x801a08010, __in_chrg=<optimized out>)
    at /usr/include/c++/v1/__memory/unique_ptr.h:263
#4  std::__1::__destroy_at[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, 0>(std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >*) (__loc=0x801a08010)
    at /usr/include/c++/v1/__memory/construct_at.h:66
#5  std::__1::destroy_at[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, 0>(std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >*) (__loc=0x801a08010)
    at /usr/include/c++/v1/__memory/construct_at.h:91
#6  std::__1::allocator_traits<std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::destroy[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, void, void>(std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > >&, std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >*) (__p=0x801a08010)
    at /usr/include/c++/v1/__memory/allocator_traits.h:323
#7  std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__base_destruct_at_end[abi:v160000](std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >*) (__new_last=0x801a08010, this=0x801a31058) at /usr/include/c++/v1/vector:836
#8  std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__clear[abi:v160000]() (
    this=0x801a31058) at /usr/include/c++/v1/vector:830
#9  std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__destroy_vector::operator()[abi:v160000]() (this=<optimized out>) at /usr/include/c++/v1/vector:446
#10 std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::~vector[abi:v160000]() (
    this=0x801a31058, __in_chrg=<optimized out>) at /usr/include/c++/v1/vector:456
#11 CHyprpicker::~CHyprpicker (this=0x801a31000, __in_chrg=<optimized out>) at hyprpicker-fe4535a/src/helpers/../hyprpicker.hpp:15
#12 0x000000000040aa1a in std::__1::default_delete<CHyprpicker>::operator()[abi:v160000](CHyprpicker*) const (__ptr=0x801a31000, this=0x619b68 <g_pHyprpicker>)
    at /usr/include/c++/v1/__memory/unique_ptr.h:65
#13 std::__1::unique_ptr<CHyprpicker, std::__1::default_delete<CHyprpicker> >::reset[abi:v160000](CHyprpicker*) (__p=0x0, this=0x619b68 <g_pHyprpicker>)
    at /usr/include/c++/v1/__memory/unique_ptr.h:297
#14 std::__1::unique_ptr<CHyprpicker, std::__1::default_delete<CHyprpicker> >::~unique_ptr[abi:v160000]() (this=0x619b68 <g_pHyprpicker>, __in_chrg=<optimized out>)
    at /usr/include/c++/v1/__memory/unique_ptr.h:263
#15 0x0000000800ce555a in __cxa_finalize () from /lib/libc.so.7
#16 0x0000000800ce5ae1 in exit () from /lib/libc.so.7
#17 0x000000000040ed96 in CHyprpicker::finish (this=0x801a31000, code=0) at hyprpicker-fe4535a/src/hyprpicker.cpp:45
#18 0x000000000040a215 in Events::handleKeyboardKey (data=0x801a1a280, keyboard=0x801a1a500, serial=11867, time=60748792, key=1, state=1) at hyprpicker-fe4535a/src/events/Events.cpp:268
#19 0x0000000800faf61a in ffi_call_unix64 () at ../src/x86/unix64.S:104
#20 0x0000000800fae8b2 in ffi_call_int (cif=0x7fffffffd550, fn=0x40a1cb <Events::handleKeyboardKey(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int)>, rvalue=0x0, avalue=0x7fffffffd580, closure=0x0)
    at ../src/x86/ffi64.c:673
#21 0x0000000800fae422 in ffi_call (cif=0x7fffffffd550, fn=0x40a1cb <Events::handleKeyboardKey(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int)>, rvalue=0x0, avalue=0x7fffffffd580) at ../src/x86/ffi64.c:710
#22 0x0000000800674858 in wl_closure_invoke (closure=0x801a49b00, flags=1, target=0x801a1a500, opcode=3, data=0x801a1a280) at ../src/connection.c:1025
#23 0x00000008006720df in dispatch_event (display=0x801a36000, queue=0x801a360d0) at ../src/wayland-client.c:1595
#24 0x0000000800670f64 in dispatch_queue (display=0x801a36000, queue=0x801a360d0) at ../src/wayland-client.c:1741
#25 0x0000000800670d2d in wl_display_dispatch_queue_pending (display=0x801a36000, queue=0x801a360d0) at ../src/wayland-client.c:1983
#26 0x00000008006708fe in wl_display_dispatch_queue (display=0x801a36000, queue=0x801a360d0) at ../src/wayland-client.c:1959
#27 0x0000000800670fe0 in wl_display_dispatch (display=0x801a36000) at ../src/wayland-client.c:2026
#28 0x000000000040eacd in CHyprpicker::init (this=0x801a31000) at hyprpicker-fe4535a/src/hyprpicker.cpp:33
#29 0x0000000000415546 in main (argc=1, argv=0x7fffffffea18, envp=0x7fffffffea28) at hyprpicker-fe4535a/src/main.cpp:65

Focus windows before picking

Currently I have to launch hyprpicker from a terminal window, which unfocuses all other windows. So, if I pick a color from another window, it will have transparency effects applied to it, changing the color. Can we change the code so that when you hover the picker over a window, it focuses automatically? Super+arrow keys aren't working for me either.

Notifications are no longer blurred

I added a few window rules, changed a few keybinds, and for some reason the notifications are no longer being blurred
image

rules.conf

# ######## Window rules ########
#windowrule = noblur,.*
# windowrule = opacity 0.89 override 0.89 override, .* # Applies transparency to EVERY WINDOW
windowrule = float, ^(blueberry.py)$
windowrule = float, ^(steam)$
windowrule = float, ^(guifetch)$ # FlafyDev/guifetch
windowrulev2 = tile,class:(wps)
windowrulev2 = tile,class:(dev.warp.Warp)

windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$
windowrulev2 = noanim,class:^(xwaylandvideobridge)$
windowrulev2 = nofocus,class:^(xwaylandvideobridge)$
windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$


windowrule = float,^(ru-turikhay-tlauncher-bootstrap-Bootstrap)$
windowrule = float,title^(About Tor — Tor Browser)$
windowrule = center,title^(About Tor — Tor Browser)$
windowrule = float,title:^(Save File)$
windowrule = center,title:^(Save File)$
windowrule = float,^(Viewnior)$
windowrule = center,^(Viewnior)$
windowrule = float, nwg-look|qt5ct|mpv
windowrule = float,^(qt6ct)$
windowrule = center,^(qt6ct)$
windowrule = size 544 657,title:^(Qt6 Configuration Tool)$
windowrule = center,^(mpv)$
windowrule = noblur,^(brave)$
windowrule = float,^(org.kde.ark)$
windowrule = float,^(kvantummanager)$
windowrule = float,^(kitty)$
windowrule = float,^(Yad)$
windowrule = float,^(com.obsproject.Studio)$
windowrule = float,^(com.github.wwmm.easyeffects)$
windowrule = float,^(vlc)$
windowrule = float,^(imv)$
windowrule = float,^(visualboyadvance-m)$
windowrule = float,^(org.qbittorrent.qBittorrent)$
windowrule = float,^(org.kde.kdialog)$
windowrule = float,^(msiexec.exe)$
windowrule = float,^(7zFM)$
windowrule = float,^(7zfm)$
windowrule = float,^(org.kde.polkit-kde-authentication-agent-1)$
windowrule = float,^(woeusbgui)$
windowrule = float, wofi
windowrule = float,^(Lxappearance)$
windowrule = float,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrule = float,title:^(Picture in picture)$
windowrule=float,pavucontrol-qt
windowrule=float,pavucontrol
windowrule = size 650 420,class:^(pavucontrol)$
windowrule=float,kcalc
windowrule=float,zoom

# windowrule=float, com-group_finity-mascot-Main
# windowrule=nobluZ, com-group_finity-mascot-Main
# windowrule=nofocus, com-group_finity-mascot-Main
# windowrule=noshadow, com-group_finity-mascot-Main
# windowrule=noborder, com-group_finity-mascot-Main

windowrulev2=windowdance,class:^(REAPER)$,title:^(menu)$
windowrulev2=forceinput,class:^(REAPER)$,title:^(menu)$

windowrule = size 640 420,^(AlacrittyF)$
windowrule = center,^(AlacrittyF)$
windowrule = float,^(AlacrittyF)$

windowrule = size 620 420,title:^(foot)$
windowrule = center,title:^(foot)$
windowrule = float,title:^(foot)$

# Dialogs
windowrule=float,title:^(Open File)(.*)$
windowrule=float,title:^(Select a File)(.*)$
windowrule=float,title:^(Choose wallpaper)(.*)$
windowrule=float,title:^(Open Folder)(.*)$
windowrule=float,title:^(Save As)(.*)$
windowrule=float,title:^(Library)(.*)$
windowrule = float,title:^(Sign In - Google Accounts - Brave)$
windowrule = float,title:^(Sign In - Google Accounts — Mozilla Firefox)$
windowrule=float,Pinentry-gtk-2

# ######## Layer rules ########
layerrule = xray 1, .*
# layerrule = noanim, .*
layerrule = noanim, selection
layerrule = noanim, overview
layerrule = noanim, anyrun
layerrule = noanim, sideleft
layerrule = noanim, sideright
layerrule = noanim, osk

layerrule = noanim, noanim
layerrule = blur, gtk-layer-shell
layerrule = ignorezero, gtk-layer-shell
layerrule = blur, launcher
layerrule = ignorealpha 0.5, launcher
layerrule = blur, notifications
layerrule = ignorealpha 0.69, notifications

# ags
layerrule = blur, session
layerrule = noanim, sideright
layerrule = noanim, sideleft
layerrule = blur, bar
layerrule = ignorealpha 0.6, bar
layerrule = blur, corner.*
layerrule = ignorealpha 0.6, corner.*
layerrule = blur, dock
layerrule = ignorealpha 0.6, dock
layerrule = blur, indicator.*
layerrule = ignorealpha 0.6, indicator.*
layerrule = blur, overview
layerrule = ignorealpha 0.6, overview
layerrule = blur, cheatsheet
layerrule = ignorealpha 0.6, cheatsheet
layerrule = blur, sideright
layerrule = ignorealpha 0.6, sideright
layerrule = blur, sideleft
layerrule = ignorealpha 0.6, sideleft
layerrule = blur, indicator*
layerrule = ignorealpha 0.6, indicator*
layerrule = blur, osk
layerrule = ignorealpha 0.6, osk

general.conf

# MONITOR CONFIG
monitor=,preferred,auto,1
# monitor=,addreserved, 0, 0, 0, 0 # Custom reserved area

#monitor=DP-1,1680x1050@75, auto, 1
#monitor=HDMI-A-1,1440x900@75, auto, 1
workspace = DP-1, 1
workspace = HDMI-A-1, 1680x210, 2

# HDMI port: mirror display. To see device name, use `hyprctl monitors`
# monitor=HDMI-A-1,1920x1080@60,1920x0,1,mirror,eDP-1

input {
    # Keyboard: Add a layout and uncomment kb_options for Win+Space switching shortcut
    kb_layout = us
    # kb_options = grp:win_space_toggle
    numlock_by_default = true
    repeat_delay = 255
    repeat_rate = 92
    float_switch_override_focus=0
 
    touchpad {
        natural_scroll = yes
        disable_while_typing = true
        clickfinger_behavior = true
        scroll_factor = 0.5
    }
    special_fallthrough = true
    follow_mouse = 1
}

binds {
    # focus_window_on_workspace_c# For Auto-run stuff see execs.confhange = true
    scroll_event_delay = 0
}

gestures {
    workspace_swipe = true
    workspace_swipe_distance = 700
    workspace_swipe_fingers = 4
    workspace_swipe_cancel_ratio = 0.2
    workspace_swipe_min_speed_to_force = 5
    workspace_swipe_direction_lock = true
    workspace_swipe_direction_lock_threshold = 10
    workspace_swipe_create_new = true
}

general {
    # Gaps and border
    gaps_in = 4
    gaps_out = 6
    gaps_workspaces = 50
    border_size = 1
    
    # Fallback colors
    col.active_border = rgba(0DB7D4FF)
    col.inactive_border = rgba(31313600)

    resize_on_border = true
    no_focus_fallback = true
    layout = dwindle
    
    #focus_to_other_workspaces = true # ahhhh i still haven't properly implemented this
    allow_tearing = true # some guy told me tearing might make things smoother idk
}

dwindle {
	preserve_split = true
        # no_gaps_when_only = 1
	smart_split = false
	smart_resizing = false
}

decoration {
    rounding = 20
    
    blur {
        enabled = true
        xray = true
        special = true
        new_optimizations = true
        popups = true
        size = 7
        passes = 4
        brightness = 1
        noise = 0.01
        contrast = 1
    }
    # Shadow
    drop_shadow = true
    shadow_ignore_window = true
    shadow_range = 20
    shadow_offset = 0 2
    shadow_render_power = 3
    col.shadow = rgba(000000CC)
    
    # Shader
    # screen_shader = ~/.config/hypr/shaders/nothing.frag
    # screen_shader = ~/.config/hypr/shaders/vibrance.frag
    
    # Dim
    dim_inactive = false
    dim_strength = 0.1
    dim_special = 0
}

animations {
    enabled = true
    # Animation curves
    
    bezier = linear, 0, 0, 1, 1
    bezier = md3_standard, 0.2, 0, 0, 1
    bezier = md3_decel, 0.05, 0.7, 0.1, 1
    bezier = md3_accel, 0.3, 0, 0.8, 0.15
    bezier = overshot, 0.05, 0.9, 0.1, 1.1
    bezier = crazyshot, 0.1, 1.5, 0.76, 0.92 
    bezier = hyprnostretch, 0.05, 0.9, 0.1, 1.0
    bezier = fluent_decel, 0.1, 1, 0, 1
    bezier = easeInOutCirc, 0.85, 0, 0.15, 1
    bezier = easeOutCirc, 0, 0.55, 0.45, 1
    bezier = easeOutExpo, 0.16, 1, 0.3, 1
    bezier = softAcDecel, 0.26, 0.26, 0.15, 1
    # Animation configs
    animation = windows, 1, 3, md3_decel, popin 60%
    animation = border, 1, 10, default
    animation = fade, 1, 2.5, md3_decel
    # animation = workspaces, 1, 3.5, md3_decel, slide
    animation = workspaces, 1, 7, fluent_decel, slide
    # animation = workspaces, 1, 2.5, softAcDecel, slide
    # animation = workspaces, 1, 7, fluent_decel, slidefade 15%
    # animation = specialWorkspace, 1, 3, md3_decel, slidefadevert 15%
    animation = specialWorkspace, 1, 3, md3_decel, slidevert
}

misc {
    vfr = 1
    vrr = 1
    # layers_hog_mouse_focus = true
    focus_on_activate = true
    animate_manual_resizes = false
    animate_mouse_windowdragging = false
    no_direct_scanout = true
    enable_swallow = false
    swallow_regex = (foot|kitty|allacritty|Alacritty)
    
    disable_hyprland_logo = true
    force_default_wallpaper = 0
    new_window_takes_over_fullscreen = 2
}

am I missing something?

not removing temporary files in /run/user/1000

My /run/user/1000 tmpfs was full of .hyprpicker_XXXXXX files, 8MB each. Hyprpicker doesn't seem to delete these files on it's own, leading to this directory being completely filled.

Also, a single run of hyprpicker creates 6 of these 8MB files.

Running hyprpicker -an using a hyprland keybind, version 0.1.1, on nixos.

Memory leak?

Same as #38 , but a little bit more context

Using waybar w/ hyprpaper.

Reproduce

Pressing button on waybar (hyprpaper is bound to it) and dragging it out of waybar area blocks waybar, what eventually (over time) will result in 'hyprpicker' terminated by signal SIGBUS (Misaligned address error) after couple of iterations. Same behavior will happen for other apps eventually, the only fix is to restart system, but meehhh...

Looks like a memory leak or smthing i dunno

Add pixel grid

It would be nice to see grid between pixels when zoomed. You might be able to do that by getting the screen resolution and generating a grid but only render it in the magnifying glass.

I really need this to do pixel measurements when ricing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.