Skip to main content

kcfg

Replacement for the awful kwriteconfig5 (and kreadconfig5)

It has a different syntax but a much improved one, some examples below

kcfg 'kcminputrc/Libinput/1241/41119/E-Signal USB Gaming Mouse/PointerAcceleration' --write -0.200

Diferences

It writes the value verbatim and reads it verbatim, so special things like [$i] [$e] or escapes like \s are just treated as text
This may be implemented in the future or at least show a warning

Installation

The whole logic is inside kcfg.py which is a self contained python script with no dependencies except configparser which is built into python
Package exists to allow easy installation/updates from pip/pipx

pip / pipx

I always recommend to use pipx to install the package, but if you want to use pip substitute pipx with pip

If you need it for only one time for example in setup script but have pipx available then you can use

pipx run kcfg
pipx install kcfg

You can also install from git

pipx install git+https://github.com/sandorex/kcfg

# install specific branch
pipx install git+https://github.com/sandorex/kcfg.git@master

Git

You can clone whole repo and run it directly as a package python3 -m kcfg, you could download it with wget and run it

You can also add the repository as a submodule, like i do in my dotfiles

git submodule add https://github.com/sandorex/kcfg

# to run it
python3 -m kcfg

# or directly
kcfg/kcfg.py

wget / curl

Beware this is the least secure option

wget https://raw.githubusercontent.com/sandorex/kcfg/master/kcfg.py
curl https://raw.githubusercontent.com/sandorex/kcfg/master/kcfg.py

Metadata

Release files for kcfg 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kcfg 0.1.1
File Size Uploaded
kcfg-0.1.1.tar.gz 17.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kcfg 0.1.1
File Interpreter ABI Platform
kcfg-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 35.3 kB

Release files / kcfg-0.1.1.tar.gz

Download URL kcfg-0.1.1.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
47090dca9ede9f1a70cf8d9a20f8cde88b76f6c9e1f018b6ba861195e85505c7
BLAKE2b-256 checksum
How to use checksums
6160c8257b59c2e5a79eec98926280b919c2ca500cc15f726e85b0740182f164
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / kcfg-0.1.1-py3-none-any.whl

Download URL kcfg-0.1.1-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
129c4a597287e431c983e80889d265f482ef62a66d1b1ef5ba7327dab2662823
BLAKE2b-256 checksum
How to use checksums
665d725649d6578343695e77b7f41405999a9486c0110b52cea3a50116ba9e13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page