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

Update keychron.service #18

Merged
merged 1 commit into from
Dec 15, 2022
Merged

Update keychron.service #18

merged 1 commit into from
Dec 15, 2022

Conversation

lesandie
Copy link
Contributor

@lesandie lesandie commented Dec 11, 2022

I thought maybe it can be improved if you use a laptop. Just let it start automatically but if you need to disconnect the keychron because you're going to use the integrated keyboard (travel, conmuting...) then it would be nice to simply do systemctl stop keychron and restore the config.

The settings changed in the service file:

Type=simple (the default setting) is used when the process configured with ExecStart is the main process of the service. Such units will wait until the process specified by ExecStart returns, then deactivate by running the process specified by ExecStop.

With RemainAfterExit=yes, the service will be considered active even when all its processes have returned, and therefore the process specified by ExecStop will not run automatically. However, this setting is not recommended for real services since the service will still appear as being active even if it has crashed, but it is useful for our use case.

Added `RemainAfterExit` and changed `Type` to simple instead of oneshot
Copy link
Owner

@adam-savard adam-savard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these are reasonable rules to have in place! Consider it done. Thanks!

@adam-savard adam-savard merged commit 6e7bb4d into adam-savard:master Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants