{"id":20703160,"url":"https://github.com/sfttech/xautocfg","last_synced_at":"2025-04-23T00:18:05.838Z","repository":{"id":142753884,"uuid":"583434191","full_name":"SFTtech/xautocfg","owner":"SFTtech","description":"Automatic keyboard repeat rate configuration for new keyboards","archived":false,"fork":false,"pushed_at":"2024-08-18T20:14:27.000Z","size":37,"stargazers_count":22,"open_issues_count":0,"forks_count":5,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-23T00:17:56.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SFTtech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"liberapay":"SFTtech"}},"created_at":"2022-12-29T19:12:01.000Z","updated_at":"2025-03-19T13:34:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"5cc19b73-1b7c-49ba-a709-127dd5cc0491","html_url":"https://github.com/SFTtech/xautocfg","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SFTtech%2Fxautocfg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SFTtech%2Fxautocfg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SFTtech%2Fxautocfg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SFTtech%2Fxautocfg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SFTtech","download_url":"https://codeload.github.com/SFTtech/xautocfg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250343960,"owners_count":21415042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T01:06:30.799Z","updated_at":"2025-04-23T00:18:05.819Z","avatar_url":"https://github.com/SFTtech.png","language":"C++","funding_links":["https://liberapay.com/SFTtech"],"categories":[],"sub_categories":[],"readme":"# `xautocfg`\n\nAutomatic run-time configuration for X11\n\nFeatures:\n- Automatic keyboard repeat rate configuration.\n  When a new keyboard is connected and used by X11, configure its repeat rate to desired values.\n\n\n## Setup\n\n### Installation\n\ndependencies:\n- `C++20`\n- `libX11`\n- `libXi`\n\nbuilding:\n- run `make`\n\n\n### Running\n\nYou should install `xautocfg` through your linux distribution, so that all necessary files are managed and updated by your package manager.\n\nThen:\n- place [config](etc/xautocfg.cfg) in ~/.config/xautocfg.cfg\n- run `xautocfg` manually or:\n- enable/use the systemd user service (which needs `graphical-session.target`!):\n  - `systemctl --user enable xautocfg.service`\n  - `systemctl --user start xautocfg.service`\n\n\n### `systemd` setup for window managers\n\nThe `systemd` service binds to the `graphical-session.target` which is started by your desktop environment.\nSome window managers (e.g. i3 in 2022) don't start `graphical-session.target`, so you need custom user service files.\n\nAs an example, these files are needed for [i3](https://i3wm.org/) as long as it doesn't start the target on its own.\n\n`~/.config/systemd/user/i3-session.service`:\n```systemd\n[Unit]\nDescription=i3 window manager session\nPartOf=i3-session.target\nWants=i3-session.target\n\n# this service is started by i3 in its config file\n# it's done like this so i3 and its launched child processes\n# are not a service itself, but in the regular session scope.\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/bin/true\nRestart=on-failure\n```\n\n`~/.config/systemd/user/i3-session.target`:\n```\n# this target is wanted by i3-session.service (started by i3 config file)\n[Unit]\nDescription=i3 Session\nRequires=basic.target\nBindsTo=graphical-session.target\nBefore=graphical-session.target\n\nDefaultDependencies=no\nRefuseManualStart=yes\nRefuseManualStop=yes\nRequires=basic.target\nStopWhenUnneeded=yes\n```\n\nand finally in your i3 configuration file:\n\n```cfg\nexec --no-startup-id systemctl start --user i3-session.service\n```\n\nit remains to be solved how we can reliably stop `i3-session.service` once i3 has exited.\n\n## Alternative setup ideas\n\n### XServer startup options\nAs alternative to this tool, you can set defaults for the X Server at startup.\n- For the keyboard repeat rate:\n```\nX -ardelay 200 -arinterval 20  # (interval is 1000/rate_in_hz)\n```\n\nFor this to configure, you need the privileges to edit X launch properties (probably in your login tool like `lightdm`).\n\n### XServer configuration file\nXServer since version [21.1.0](https://cgit.freedesktop.org/xorg/xserver/commit/?id=4f95d87d66b6a6e11aa8616c9242e0907ffee66b) supports the option `AutoRepeat`.\nBasically you need an xorg config section like this (the second value again `1000/rate_in_hz`):\n\n```\nSection \"InputClass\"\n    Identifier \"system-keyboard\"\n    MatchIsKeyboard \"on\"\n    Option \"AutoRepeat\" \"200 20\"\nEndSection\n```\n\n## Contact\n\nPlease join our matrix room: `#sfttech:matrix.org`!\n\nFor bug reports and patches, please create issues and pull requests at https://github.com/SFTtech/xautocfg\n\n\n## License\n\nLicensed under [GPLv3](LICENSE) or later.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfttech%2Fxautocfg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsfttech%2Fxautocfg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfttech%2Fxautocfg/lists"}