Skip to content

[bug] CLI hangs when outputting to clipboard under Wayland #45

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

Open
kekonn opened this issue Dec 17, 2024 · 3 comments
Open

[bug] CLI hangs when outputting to clipboard under Wayland #45

kekonn opened this issue Dec 17, 2024 · 3 comments

Comments

@kekonn
Copy link

kekonn commented Dec 17, 2024

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
@kekonn
Copy link
Author

kekonn commented Dec 19, 2024

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.

@mistricky
Copy link
Member

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

@kekonn
Copy link
Author

kekonn commented Dec 23, 2024

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"

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

2 participants