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

systemd.unit support for filenames with hyphens #697

Merged
merged 1 commit into from
May 27, 2023

Conversation

nharward
Copy link
Contributor

@nharward nharward commented May 6, 2023

When using /etc/kmonad/*.kbd files with hyphens in the name systemd
will escape them to slashes when using %I. This commit changes to use
%i instead which does not escape the name, resulting in the correct
filename passed to kmonad.

It's important to use %i for the filename so that multiple instances
of kmonad can run for different keyboards at the same time, say for a
laptop and external keyboard. The DefaultInstance=config in line 11
will use a default value of config if no other value is given.

Examples:

`systemctl start kmonad@foo`     # Runs `kmonad /etc/kmonad/foo.kbd`
`systemctl start kmonad@foo-bar` # Runs `kmonad /etc/kmonad/foo-bar.kbd`
`systemctl start kmonad@`        # Runs `kmonad /etc/kmonad/config.kbd`

When using /etc/kmonad/*.kbd files with hyphens in the name systemd
will escape them to slashes when using %I. This commit changes to use
%i instead which does not escape the name, resulting in the correct
filename passed to kmonad.
@nharward
Copy link
Contributor Author

nharward commented May 26, 2023

Looks like the failed workflow step was GHC installation on Windows. Is it possible to re-trigger this flow to see if it was intermittent, or push through regardless? This PR is only for a contrib file related to systemd and does not affect kmonad core code.

cc @slotThe

@slotThe
Copy link
Member

slotThe commented May 27, 2023

Oh, sorry, I must have forgotten about this. AFAIR the workflow is due to some upstream issue; should go away by itself

Thanks!

@slotThe slotThe merged commit 97ac050 into kmonad:master May 27, 2023
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