SUPERCILEX / clipboard-history

Ringboard—the clipboard manager for Linux
Apache License 2.0
143 stars 5 forks source link

Tune ringboard-x11.service #19

Closed hedgieinsocks closed 1 month ago

hedgieinsocks commented 1 month ago

Hi! Being on gnome wayland, I've installed it via curl oneliner, and after a reboot I noticed that the x11 watcher does not work. It turns out sometimes it fails the ConditionEnvironment=DISPLAY after a reboot and gets stuck. And sometimes it just gets stuck due to too many failures on boot. So I've just commented out ConditionEnvironment=DISPLAY and added RestartSec=1 which solved my issue. Perhaps you'll come up with a more elegant solution ;)

SUPERCILEX commented 1 month ago

Dang, mine has never failed but then again I'm still on X11.

The goal with that condition is just to prevent the watcher from trying to start if no X11 server is present, so I need to figure out a way to add that dependency explicitly instead of this hacky stuff.

SUPERCILEX commented 1 month ago

There's a bunch of reading here I'll look at tomorrow: https://wiki.archlinux.org/title/Systemd/User

SUPERCILEX commented 1 month ago

I just updated the service files. Can you give it another go? I think the bug is that I had a dependency on graphical rather than graphical-session.

hedgieinsocks commented 1 month ago

I confirm that the service now starts without issues after reboot. Thank you!

Now, unrelated stuff, I've tried egui and have a couple of things to bring up:

SUPERCILEX commented 1 month ago

egui window does not want to get closed

What does this mean exactly? The process is supposed to stay alive, but all the UI should disappear and be hidden until you trigger a reopen. I'll need to double check the flicker.

Will look into the other bugs tomorrow.


This is great feedback BTW, thank you!

hedgieinsocks commented 1 month ago

https://github.com/user-attachments/assets/f7e94913-8517-494d-bdcc-e98e0c7763f9

SUPERCILEX commented 1 month ago

Thanks for the video! I think issue 1 and 2 are the same. What's supposed to happen is the window closes and the UI completely unloads to save memory. Then when you reopen, the app does a full reload which would explain the "scrolling" (in reality everything is reset). Probs a wayland bug, lemme look into it.

hedgieinsocks commented 1 month ago

Yeah, most likely as always. By the way, it's not related to the recent refactor, egui did not close for me from the initial release.

SUPERCILEX commented 1 month ago

Well this is dumb but wayland just straight up doesn't support it: https://github.com/rust-windowing/winit/issues/2388

You'll need to cargo +nightly install clipboard-history-egui --no-default-features --features wayland to make sure you get the fix. Wait for deployment first: https://github.com/SUPERCILEX/clipboard-history/actions/runs/10271223333

SUPERCILEX commented 1 month ago

Oh holy shit actually wayland startup is ridiculously fast so you don't really need my quick start stuff anyway. That makes me happy. Lemme know if anything else is broken. :)

hedgieinsocks commented 1 month ago

Yeah, installed v0.4.2 and the window now properly closes. But guess what? Yes, you are right: now it fails to copy the selected entry to the clipboard. It says paste, but I believe it means copy item to the clipboard. Cause the previous x11 version did that (selected entry went into the clipboard), but wayland version does not want us to be happy ;) image

hedgieinsocks commented 1 month ago

Ah, and looking at that bright scrollbar, perhaps bleak it down to match the font/minimize/close color? And while on this topic, is there any flag to build the light theme version?

SUPERCILEX commented 1 month ago

Oh for that did you install the latest version of the clipboard watcher and server?

cargo +nightly install clipboard-history-x11 --no-default-features
cargo +nightly install clipboard-history-server --no-default-features --features systemd
SUPERCILEX commented 1 month ago

BTW not sure if you're using https://crates.io/crates/cargo-update but it should make updating easier.

SUPERCILEX commented 1 month ago

And does the scrollbar not shrink when not in use? It's supposed to be completely hidden by default and look like this when hovering over the list: image

Yours looks like the scrollbar when being actively used.

SUPERCILEX commented 1 month ago

Regarding the theme, would you always stick with light mode? I could add an environment variable. Otherwise I'd need a UI option that's persisted to disk somewhere which sounds annoying.

hedgieinsocks commented 1 month ago

Actually, scratch my latest bug report. The error was due to failed ringboard-x11.service cause I messed up the /tmp files. It does work as expected now!

Thanks for cargo-update advise, noted!

The scrollbar complaint was indeed about focused active mode. But I guess it comes with the library.

About theming, it was just curiosity after checking out https://github.com/emilk/egui ENV sounds nice, in theory one could launch it like RNGBRD_THEME=nord ringboard-egui but it seems that you would need to create hardcoded styles, and the project is not that mature for you to waste yourself on that. Today this, tomorrow native window decorations, then add AI :D

hedgieinsocks commented 1 month ago

While the issue is not yet closed, another improvement suggestion: hitting Esc should close/hide the window. Also, I believe in the future you will face more wayland issues due to inability of wayland on gnome to remember the size and position of windows (eghhhh disappointment :D)

SUPERCILEX commented 1 month ago

But I guess it comes with the library.

Yeah.

Today this, tomorrow native window decorations, then add AI :D

Loooool. Well I added a THEME=light envvar anyway cuz it's easy to do.

hitting Esc should close/hide the window

Done. v0.5 will hit the shelves in a few mins.

hedgieinsocks commented 1 month ago

Great! It works :D Nice to watch it evolve before your own eyes, keep it up!!

SUPERCILEX commented 1 month ago

Hell yeah, thanks for the great suggestions and bug reports!