Skip to main content

Tool to read and write KDE INI config files, replaces kwriteconfig5 / kreadconfig5

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kcfg-0.1.1.tar.gz (17.1 kB view hashes)

Uploaded Source

Built Distribution

kcfg-0.1.1-py3-none-any.whl (18.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page