I often find myself switching between ColorSchemes depending upon dark/bright places. KWin provides nice Invert plug-in, but it simply inverts every colour. Not feasible to work, particularly while browsing or watching videos. As far as I know there is no shortcut way to change colorschemes. Hence I created a small hack (named it kcss) to do that. Works pretty well overall. Its a small command line program. Here’s how to to use it -
$ kcss list # list all available color schemes $ kcss current # Color scheme currently in use $ kcss switch <colorschemename> # change colorscheme $ kcss toggle # toggle between Dark and Light colorscheme
For toggle, it reads a small configuration file called .kcss-profilerc. A sample is given below -
[Dark] ColorScheme=Obsidian Coast [Light] ColorScheme=Oxygen [Default] Profile=Dark
Creating Shortcut - Since we now have a command line interface to switch colorschemes, we can easily create a custom shortcut from System Settings > Shortcuts & Gestures. Set action parameter as “kdss toggle” and key-sequence of your choice.
Source Code -
Next – Next thing that I would like to add is to switch/toggle Konsole colorscheme and try to fix some problems (if possible) where you have to restart applications to let colorschemes take effect properly. I don’t have in-depth knowledge of KDE, so I’m not sure if its doing anything bad yet. So take backup of configuration files before you use it and let me know about bugs/fixes.