qt6ct icon indicating copy to clipboard operation
qt6ct copied to clipboard

Feature Request: Add command line arguments

Open v4u6h4n opened this issue 9 months ago • 2 comments

Hey everyone :-)

Just wondering if some command line argument functionality could be added so I can control the application with scripting. Specifically I am interesting in scripting some day/night switching with the new KDE theme support introduced in #43. My apologies if there is also this functionality, just haven't been able to find documentation if that is the case.

v4u6h4n avatar May 01 '24 07:05 v4u6h4n

I had a look at this because I would also like to control the appearance of Qt-applications from scripts.

It turns out that this application "only" provides a nice graphical user interface to modify INI files. It would be rather pointless to provide a CLI for that because it's super simple to modify these files using a text editor or a script. All Qt6-applications will change their appearance immediately after the ini file has been modified and saved (given QT_QPA_PLATFORMTHEME is set to qt6ct).

Please see my example python script to set the Appearance/color_scheme_path:

set_qt6ct_scheme.py ~/.config/qt6ct/qt6ct.conf darker

pasbi avatar Jul 24 '24 19:07 pasbi

Hey @pasbi

Thanks for the heads up :-) I ended up arriving at a similar solution myself after some tinkering.

I used this, for anyone out there not familiar with python:

sed -i "s/color_scheme_path=.*/color_scheme_path=\"\/usr\/share\/color-schemes\/BreezeDark.colors\"/" ~/.config/qt6ct/qt6ct.conf

Or, for light:

sed -i "s/color_scheme_path=.*/color_scheme_path=\"\/usr\/share\/color-schemes\/BreezeLight.colors\"/" ~/.config/qt6ct/qt6ct.conf

v4u6h4n avatar Jul 24 '24 20:07 v4u6h4n