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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file kcfg-0.1.1.tar.gz.

File metadata

  • Download URL: kcfg-0.1.1.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for kcfg-0.1.1.tar.gz
Algorithm Hash digest
SHA256 47090dca9ede9f1a70cf8d9a20f8cde88b76f6c9e1f018b6ba861195e85505c7
MD5 a1b7f207ac15ec2aae02975b6c784acb
BLAKE2b-256 6160c8257b59c2e5a79eec98926280b919c2ca500cc15f726e85b0740182f164

See more details on using hashes here.

File details

Details for the file kcfg-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: kcfg-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for kcfg-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 129c4a597287e431c983e80889d265f482ef62a66d1b1ef5ba7327dab2662823
MD5 e67f1a68267ba3a0024b7a496295acee
BLAKE2b-256 665d725649d6578343695e77b7f41405999a9486c0110b52cea3a50116ba9e13

See more details on using hashes here.

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