Misterio77 / nix-config

Personal nixos and home-manager configurations.
https://m7.rs/git/nix-config/
MIT License
719 stars 42 forks source link

QUESTION: How did you fix the problem of wofi on waybar with systemd integration setup? #24

Closed nakoo closed 1 month ago

nakoo commented 10 months ago

I recently switched my waybar setup with systemd integration, following the a1cbf69 commit. However, I've encountered an issue where wofi doesn't seem to work correctly in this setup. Unlike when I execute the wofi command in the terminal, wofi on waybar only detects significantly fewer applications. Furthermore, when I click the custom/menu icon on waybar to open drun menu, drun menu pops up no matter where I click on waybar. I'm curious about how you resolved these issues. I've been following your commits but haven't been able to figure it out myself. I would appreciate your help. Thanks.

Misterio77 commented 10 months ago

Hi!

Whoa I actually have this issue haha, I didn't notice it until I read this.

It seems that the problem with the menu opening no matter where you click only happens after you click on the usual place at least once; as for the issue with applications missing, I'd say it is due to environment variables not being present on waybar when it runs via systemd (same reason why the PATH has almost anything), I gotta take a deeper look at it

I mostly open the menu with a keybind anyway, so I might actually "fix" this by simply removing the on-click event

nakoo commented 10 months ago

While not ideal, I could mitigate the click issue by adding a sleep .1 line. https://github.com/hyprwm/Hyprland/issues/1348#issuecomment-1565604984

nakoo commented 1 month ago

Sorry for the late reply. It seems hyprland added home-manager options for this purpose.

wayland.windowManager.hyprland.systemd.variables = ["--all"] fixed issue.

https://wiki.hyprland.org/Nix/Hyprland-on-Home-Manager/#programs-dont-work-in-systemd-services-but-do-on-the-terminal

Also it seems on-click bug has been fixed. I didn't face any issue so far.