savedra1 / clipse

Configurable TUI clipboard manager for Unix
MIT License
228 stars 8 forks source link

hyprland exec-once = clipse -listen not working on Nixos #51

Closed mononomori closed 2 months ago

mononomori commented 2 months ago

Distro Nixos.

Currently the hyprland startup execution isn't working for me. All my other exec-once programs work as intended so not sure why. If I manually run clipse -listen in a terminal, it works as intended (even after killing that terminal).

Any ideas?

savedra1 commented 2 months ago

Hey @mononomori :wave: thanks for raising this.

I'm not 100% sure why that's not working for you as it sounds like you have the same desktop setup as me. For some context, the clipse -listen command executes the sub-command nohup clipse --listen-shell >/dev/null 2>&1 &. Would your config have any issues with this during boot?

You could try substituting exec-once = clipse -listen for nohup clipse --listen-shell >/dev/null 2>&1 &, calling the sub command directly instead to see if that helps.

Assuming you confirmed you Nix flake/env was definitely rebuilt successfully after you added the exec-once cmd.

Only alternatives I can think of is to use a systemd service or a .desktop file but would rather avoid that ofc.

mononomori commented 2 months ago

nohup clipse --listen-shell >/dev/null 2>&1 & Didn't seem to work for me but on a whim I tried adding a 2 second delay to the startup execution exec-once sleep 2; clipse -listen That seems to have fixed the issue but I'm not really sure why? My hyprland setup is super minimal right now when it comes to startup executions, it's literally just:

exec-once = waybar
exec-once = nm-applet
exec-once = blueman-applet
exec-once = sleep 2; clipse -listen
savedra1 commented 2 months ago

@mononomori thanks for the update!

That is interesting, I'm not sure why that's fixed it either. Any errors that would arise from not being able to access the system clipboard on boot are ignored by the clipse binary so shouldn't be causing a panic.

I'm glad to hear you've found a decent work around though! I'll investigate this further before the next release, although it's difficult for me to replicate :thinking:

mononomori commented 2 months ago

Yeah it makes even less sense, because previously even when reloading hyprland after boot, it wouldn't fix the issue, which should have ruled out any issues with it potentially loading before wl-clipboard.

savedra1 commented 2 months ago

Yeah that is strange @mononomori . Could it be your version of Hyprland? Doubt it as it's been fine for me since 35.0.

I don't think I'm going to be able to help here as I can't replicate this. It's likely something to do with how your hardware is interacting with Hypr/wlroots on boot.

If you have any other questions I can try to help, otherwise will get this issue closed and add your fix to the FAQs.

mononomori commented 2 months ago

I'm on 0.40.0 so probably not anything to do with that.

It's probably like you say, some niche hardware interaction.

Thanks for your help, if I figure anything else out in the future I'll let you!