A lightweight KWin script that applies transparency to all windows, with user-adjustable opacity.
- Adjusts the overall opacity of windows between 30% and 100%.
- Automatically applies to all existing windows and those opened subsequently.
- Configurable from System Settings → Window Management → KWin Scripts → Configure….
- Supports exclusions by name (comma-separated list with flexible syntax).
You can exclude apps from KDE-Trans using the excludedWindows config key (comma-separated). The script accepts three token styles:
-
Exact match (brackets):
[name]— matches the windowresourceClass/resourceNameexactly (case-insensitive).
Example:[dolphin] -
Contains match (braces):
{substring}— matches when the candidate string containssubstring(case-insensitive).
Example:{steam_app}— useful for many Steam/Proton-launched games which commonly includesteam_appor similar identifiers in the process/launcher name. Use this if the window identifiers contain a predictable substring rather than an exact class. -
Plain exact (no brackets):
name— same as[name], but without brackets.
Example:firefox
- Exclude Dolphin and Firefox exactly:
[dolphin],firefox
- Exclude anything whose identifier contains
steam_app(Proton games), plus VLC exactly:
{steam_app},vlc
KDE-Trans attempts to identify each window by checking these fields in order:
resourceClass— Most reliable and almost always presentresourceName— Used if resourceClass is emptycaption— The window title (may change dynamically)
The first non-empty value becomes the candidate name, then it is lowercased and compared against the exclusion list.
Examples of real window identifiers:
steamsteam_app_123456org.kde.dolphinfirefoxcodevlc
In most cases, applications expose a stable resourceClass, which is the value used by the script.
To inspect the identifiers used by applications (resourceClass, resourceName, caption), enable the option “Show new window names in logs” in the script configuration.
Then run the following command to view only KDE-Trans messages:
journalctl --user -f | grep "\[kde-trans\]"When a new window appears, KDE-Trans prints debug entries such as:
[kde-trans] New window appeared — resourceClass="steam", resourceName="steam_app_123456", caption="Game Title"This helps in determining the correct identifiers to use in the exclusion list.
The easiest way to install kde-trans is through the built-in KWin Script Store:
- Open System Settings.
- Go to Window Management → KWin Scripts.
- Click "Get New Scripts…".
- Search for “kde-trans”.
- Install and enable the script.
- (Optional) Open Configure… to adjust the opacity.
Important: After changing the opacity in the configuration, you need to disable and re-enable the script in KWin Scripts for the changes to take effect without restarting your session.
- code/main.js → Main script logic (window handling and opacity system).
- metadata.desktop → Script metadata recognized by KWin.
- ui/config.ui → User interface for adjusting opacity.
- contents/config/main.xml → Configuration schema exposed to KDE.
https://store.kde.org/p/2330253
GPL-3.0-or-later