Skip to content
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

Swhks stops after login #253

Open
Canious opened this issue Mar 4, 2024 · 5 comments
Open

Swhks stops after login #253

Canious opened this issue Mar 4, 2024 · 5 comments
Assignees

Comments

@Canious
Copy link

Canious commented Mar 4, 2024

Version Information:

  • Distribution Information ( run uname -a ) 6.7.8 arch 1-1
  • swhkd version ( swhkd -V ) 1.30-dev

Describe the bug:
I have found that swhks stops after logging in, although I have checked that swhkd is still running. I followed the systemd step and checked if it works by adding an additional autostart command to my hyprland configuration, but no luck, it doesn't work.
Expected behavior:
Swhks should works with swhkd after login

Actual behavior:

To Reproduce:

Additional information:
I think it might be the window manager startup issue that intercepted the process, but I can't tell which one it is.
And my log seems to be normal,

● hotkeys.service - swhkd hotkey daemon
     Loaded: loaded (/etc/xdg/systemd/user/hotkeys.service; enabled; preset: enabled)
     Active: active (running) since Tue 2024-03-05 22:47:38 CET; 12s ago
   Main PID: 599 (bash)
      Tasks: 20 (limit: 38173)
     Memory: 6.8M (peak: 20.5M)
        CPU: 182ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/hotkeys.service
             ├─599 bash /home/swer/.config/swhkd/hotkeys.sh
             ├─609 /usr/bin/swhkd
             └─932 swhks

Mar 05 22:47:38 berserk systemd[589]: Started swhkd hotkey daemon.
Mar 05 22:47:38 berserk hotkeys.sh[608]: [2024-03-05T21:47:38Z WARN  swhks::environ] XDG_DATA_HOME Variable is not set, falling back on hardcoded path.
Mar 05 22:47:38 berserk pkexec[609]: pam_unix(polkit-1:session): session opened for user root(uid=0) by swer(uid=1000)


@newtoallofthis123
Copy link
Contributor

Hey @Canious! I have put up a proposal for this an enhancement that would fix this issue! Check it out here #251 and feel free to let me know what you think about it. Work is being done on this :)

@Canious
Copy link
Author

Canious commented Mar 5, 2024

I have seen this but how can we achieve that, I am totally a rookie. However, I saw this #144, is that what you mean @newtoallofthis123

@Canious Canious closed this as completed Mar 5, 2024
@Canious Canious reopened this Mar 5, 2024
@newtoallofthis123
Copy link
Contributor

Not per se @Canious....I mean that if swhkd detects that swhks is not running, it tries it's best to start the process as a daemon. I am still figuring out how to exactly start the daemon in itself without adding too much to the dependency graph.

@Canious
Copy link
Author

Canious commented Mar 5, 2024

How does swhkd detect if swhks is working, I am totally new to this repository, got no idea what to do about it

@newtoallofthis123
Copy link
Contributor

As far I understand, swhks saves a file called swhks.pid in the XDR_RUNTIME_DIR that can be read to get the pid of the server if it is running. If it isn't we just spawn it... The spawn mechanics is something that I am trying to figure out currently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants