-
Notifications
You must be signed in to change notification settings - Fork 50
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
add option to start swayidle in locked state #81
base: master
Are you sure you want to change the base?
Conversation
Why can't you do that manually instead? |
that didn't work for me for some reason[*], but let me check again. [*] the problem I suspect is that swayidle doesn't really support any notification of its activated state, so it's a bit hard to know when to send the signal. and I'd like to avoid random |
so this one, does not work
it seems to kill the child process even before swayidle is exec'd OTOH, this one seems to work properly, since the swayidle process is first exec'd before systemd goes to the next step:
I do feel that the PR would still be useful since for ex. starting from environments without systemd, some shell doing this is still racy:
|
another option would be something like |
Ok on second test, just after a boot, even with
I guess since the system was not warm enough and files weren't cached the signal killed swayidle before it could handle it. This will always be racy. So either swayidle should implement some activation notification, or just merge this PR. |
I'd personally prefer implementing proper startup notification, as it would be generally more useful. |
sd_notify or full fork / setsid ? |
sd_notify would not be usable without systemd, so would prefer fork, even if that comes with its own issues. See also this stale PR: swaywm/swaylock#42 |
#82 here's the daemonize option ( I still think |
btw, #82 doesn't fix the this issue completely. obviously still racy running an external command after swayidle -f :(. |
How so? |
I'll comment there. |
I'd like to propose merging this, since:
|
This comment has been minimized.
This comment has been minimized.
11164cf
to
24276fe
Compare
add a CLI option
-l
to start swayidle in locked state. when used, swayidle will send itself the SIGUSR1 signal as soon as it starts and subsequently start the locker.fixes #80