OneDeadKey / kalamine

Keyboard Layout Maker
MIT License
103 stars 29 forks source link

make `sudo xkalamine` easier #108

Closed fabi1cazenave closed 6 months ago

fabi1cazenave commented 6 months ago

Installing and removing custom keyboard layouts for XOrg is the last use case where xkalamine must be run as sudo, and it must be covered.

It looks like pipx is becoming a nice replacement for pip in this use case {= installing a Python app within a pyenv container). And TIL that apps installed by either pip or pipx can be run as sudo if the PATH is preserved:

sudo env "PATH=$PATH" xkalamine install layout.toml

So let’s make sure it’s in the README, and let’s modify xkalamine so that if run as user on XOrg, it fails and drops the above command to the console so that users can just copy/paste the line and get it working.