K4Oxygen is a variant of KDE4 Oxygen widget theme, released from KDE dependencies and supported both for Qt4, Qt5, and Qt6.
It is based on oxygen-transparent for KDE4 (as of commit aa154d4), but currently has some limitations:
- no window decorations implementation (it'd depend on KDE anyway, and the code would likely be different for KDE4 and KF5)
- no configuration utility
- translucency in Qt5 version is in experimental stage, and unchecked completely in Qt6 version
The theme does read Oxygen and global KDE settings similarly to how oxygen-gtk does it.
You can install it using the following commands
mkdir build
cd build
cmake .. -DQT_VERSION=5
make
sudo make install
Similarly, for Qt4 or Qt6 version replace -DQT_VERSION=5
with -DQT_VERSION=4
or -DQT_VERSION=6
, respectively.
- Qt4: You can choose current theme using
qtconfig
(or, on some distros,qtconfig-qt4
) - Qt5: Qt5 doesn't provide a standard utility to set its theme, but you can either try
qt5ct
utility, or set a global environment variableQT_STYLE_OVERRIDE
tok4oxygen
. - Qt6: Qt6 doesn't provide a standard utility to set its theme, but you can either try
qt6ct
utility, or set a global environment variableQT_STYLE_OVERRIDE
tok4oxygen
.
In a KDE session K4Oxygen should pick the Oxygen and global KDE settings automatically with no user intervention.
In a non-KDE session you can set non-default settings by editing oxygenrc
and kdeglobals
files. These files are searched as follows:
- If
kde4-config --path config
works, its output paths are used - Otherwise, the path is set to
$HOME/.config/k4oxygen
(or$XDG_CONFIG_HOME/k4oxygen
, ifXDG_CONFIG_HOME
is set).
If you've edited oxygenrc
or kdeglobals
, you can force configuration reloading using these commands (TypeOfChange
is a parameter):
dbus-send --type=signal /KGlobalSettings org.kde.KGlobalSettings.notifyChange int32:TypeOfChange int32:0 # for kdeglobals
dbus-send --type=signal /OxygenStyle org.kde.Oxygen.Style.reparseConfiguration # for oxygenrc
Here TypeOfChange
for kdeglobals
is one of the following (the ones supported):
- 0 — means Palette Changed
- 1 — means Font Changed
- 3 — means Settings Changed
These commands simulate the signals sent by KDE's System Settings utility.