Input device configurator for SwayWM, written in Python and Qt6, inspired by nwg-shell-config. It uses standard libinput options to configure keyboard, touchpad and pointer devices.
git clone https://github.com/Sunderland93/sway-input-config.git
cd sway-input-config && python setup.py install
pip install sway-input-config
Available in AUR
Configuration file is located in ~/.config/sway-input-config/settings. It's a JSON-file:
{
"keyboard-layout": [
"us"
],
"keyboard-variant": [
""
],
"keyboard-shortcut": "",
"keyboard-identifier": "",
"keyboard-model": "pc105",
"keyboard-repeat-delay": 300,
"keyboard-repeat-rate": 40,
"keyboard-capslock": "disabled",
"keyboard-numlock": "disabled",
"pointer-identifier": "",
"pointer-accel-profile": "flat",
"pointer-pointer-accel": 0.0,
"pointer-natural-scroll": "disabled",
"pointer-scroll-factor": 1.0,
"pointer-left-handed": "disabled",
"touchpad-identifier": "",
"touchpad-accel-profile": "flat",
"touchpad-pointer-accel": 0.0,
"touchpad-natural-scroll": "disabled",
"touchpad-scroll-factor": 1.0,
"touchpad-scroll-method": "two_finger",
"touchpad-left-handed": "disabled",
"touchpad-tap": "enabled",
"touchpad-tap-button-map": "lrm",
"touchpad-drag": "enabled",
"touchpad-drag-lock": "disabled",
"touchpad-dwt": "enabled",
"touchpad-middle-emulation": "enabled"
}If settings file is corrupted or missing, Sway Input Configurator will use the default settings and recreate settings file. Config files for keyboard, touchpad and mouse is located in ~/.config/sway/ (keyboard, touchpad and pointer respectively).
If you would like to translate Sway Input Configurator into your language, please follow the instructions below:
- Install the necessary utilities - Qt Linguist and pylupdate6. For Debian-based systems:
sudo apt install pyqt6-dev-tools linguist-qt6
- Clone the repository and generate translation:
git clone [email protected]:Sunderland93/sway-input-config.git
cd sway-input-config
./locale-gen.sh
It creates lang_*.ts file in sway_input_config/langs based on your system locale. If you want to create translation other than your system locale, pass yourlocale option to locale-gen script (e.g for German, you can pass de_DE):
./locale-gen.sh de_DE
-
Open created
lang_*.tsfile in Qt Linguist tool, choose language and translate all strings. After that, select File -> Compile and save yourlang_*.qmfile in the same directory aslang_*.ts(sway_input_config/langs). -
Test your translation. If your translation is the same as your system locale, Sway Input Configurator apply it automatically. Or you can pass
--locale "yourlocale"option to Sway Input Configurator to force the locale (e.g--locale de_DE). -
Feel free to send PR with your translation :)


