[bug] CLI hangs when outputting to clipboard under Wayland
I used codesnap -f application.rb -o clipboard --has-breadcrumbs --has-line-number to generate a codesnap and it gets stuck on "Generating". When I replace -o clipboard with -o code.png it completes instantly. I imagine this is because clipboards under Wayland are complicated and have a completely different approach.
System information
System:
Host: tuxgamer Kernel: 6.12.5-1-cachyos-bore-lto arch: x86_64 bits: 64
Desktop: KDE Plasma v: 6.2.4 Distro: CachyOS
Graphics:
Device-1: Advanced Micro Devices [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900
XTX/7900 GRE/7900M] driver: amdgpu v: kernel
Display: wayland server: X.org v: 1.21.1.14 with: Xwayland v: 24.1.4
compositor: kwin_wayland driver: X: loaded: modesetting dri: radeonsi
gpu: amdgpu resolution: 5120x1440
API: EGL v: 1.5 drivers: kms_swrast,radeonsi,swrast
platforms: gbm,wayland,x11,surfaceless,device
API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.3.1-cachyos1.6
renderer: AMD Radeon RX 7900 XT (radeonsi navi31 LLVM 18.1.8 DRM 3.59
6.12.5-1-cachyos-bore-lto)
API: Vulkan v: 1.4.303 drivers: N/A surfaces: xcb,xlib,wayland
Turns out it doesn't actually hang. Of course the application has to stay open for the wayland clipboard content to stay available, but this isn't obvious when using the application.
Hey @kekonn, I just add a chapter to describe this issue on Wayland, you can refer to https://github.com/mistricky/CodeSnap?tab=readme-ov-file#linux-wayland
I have figured out the why in the mean time, I just think the prompt could be more helpful, but in my quick tinkering I haven't figured out how to make the spinner change from generating to something like: "Generating done, paste the image and close the program"