kconfig 0.1

=?UTF-8?Q?thomas_l=FCbking?= baghira-style at gmx.net
Sun Apr 13 12:58:02 UTC 2014


Name: kconfig
Version: 0.1
Type: KDE Improvement
Depend: 
License: GPL
Homepage: 
More Info:
http://kde-apps.org/content/show.php?content=164611

Description:
 A CLI config tool.

It supports reading and writing of config entries.

Features beyond kread/writeconfig:
----------------------------------
- regular expression matching
- key/group deletion
- regexp based (mass) replacement
- regexp based entry listing

Usecases:
---------
a) kconfupdates:
Whenever you\'ve got legacy settings and you need
to update them you end up either writing a cpp
blackbox (to the user) or a complex (\'bash\' !=
\'sh\' ...) and slow script for it (latter
sometimes not even being possible - original
reason to write this ;-)

b) user assistance:
it is much simpler to ask a user to \"kreadconfig
--file kwinrc --group Compositing --key MaxFPS\"
than to explain the clickchain through the config
GUI.
If you need more than one key, regexp driven maybe
grouplisting can be very convenient.

c) key deletion:
right now the tool of choice for that is called
\"kwrite\" ...


Syntax:
-------
kconfig [/[/[...]]] read|write|delete|list|replace
[] []

see \"kconfig help\" for an up-to date list and
command aliases


Examples: (to get you an idea)
---------

Let\'s say you want to show the configured MaxFPS
of the compositor
$ kconfig kwinrc/Compositing read MaxFPS
  MaxFPS: 60 (kwinrc/Compositing)

Unset it:
$ kconfig kwinrc/Compositing delete MaxFPS   
  Removed MaxFPS: 60

Add it:
$ kconfig kwinrc/Compositing write MaxFPS 60
  New MaxFPS: 60

You got a 120Hz screen and want the compositor
tick more?
$ kconfig kwinrc/Compositing write MaxFPS 120
  MaxFPS: 60 -> 120

You forgot the actual key?
$ kconfig kwinrc/Compositing list max
  MaxFPS: 120

Isn\'t there too much output for script
invocation? (No)
$ MAX_FPS=`kconfig kwinrc/Compositing read
MaxFPS`; echo $MAX_FPS
  120

You want to alter a present MaxFPS key to MaxFps?
$ kconfig kwinrc/Compositing replace
\'MaxFPS=(.*)\' \'MaxFps=\\1\'
  MaxFPS: 120 -> MaxFps: 120

List all electric borders - w/o knowing in what
group they are:
$ kconfig \'kwinrc/.*\' list electric





JOB RECOMMENDATION:

more jobs: http://KDE-Apps.org/jobs/




More information about the Kde-announce-apps mailing list