Skip to content

Instantly share code, notes, and snippets.

@rodrigopedra
Last active November 11, 2023 22:13
Show Gist options
  • Save rodrigopedra/60ccb4dd38b6b081498705de357524a6 to your computer and use it in GitHub Desktop.
Save rodrigopedra/60ccb4dd38b6b081498705de357524a6 to your computer and use it in GitHub Desktop.
Generate Breeze opaque local Plasma Styles

Generate Breeze opaque local Plasma Styles

Tested on Plasma 5.27

I understand many people like transparency and blur, and many folks I introduced to Plasma, made the switch by features like that.

But for me, it is highly distracting, and a big focus grabber.

I spent countless hours looking for a solution to this, and pushed every knob I could find a reference on the internet.

This was the only solution that ended up making KRunner, tray panels, and Kickoff finally fully opaque.

Installation

  • Create and run the generate-opaque-themes.sh in this gist
    • This will create two local plasma styles, one for light, and other for dark styles
  • Enable the "Background Contrast" desktop effect
    • System Settings > Workspace Behavior > Desktop Effects
  • Choose one of the newly created Opaque Plasma Styles
    • System Settings > Appearance > Plasma Style

How it works?

If you look at the themes' documentation, a plasma style can provide two folders: /solid, and /translucent.

/solid will be used when windows are maximized and should not have any transparency, /translucent is used otherwise.

Copying/symlinking the /solid folder from the default theme, and name it as /translucent on a custom theme is what finally worked out for me.

The "Background Contrast", and "Translucency" Desktop Effects also need to be enabled.

Those SVGs are only used if these effect is enabled (as far as I can tell).

Otherwise, the compositor tries to apply transparency by itself.

Make sure all the sliders on the "Translucency" Desktop Effect's settings are slided to full opaque.

References

Images

Desktop Effects Settings

Translucency Effect Configuration

Screenshot_20231104_232119

#!/bin/sh
echo "Making Breeze Light Opaque"
rm -rf ~/.local/share/plasma/desktoptheme/breeze-light-opaque
mkdir -p ~/.local/share/plasma/desktoptheme/breeze-light-opaque/widgets
cd ~/.local/share/plasma/desktoptheme/breeze-light-opaque
ln -s /usr/share/plasma/desktoptheme/breeze-light/colors colors
ln -s /usr/share/plasma/desktoptheme/breeze-light/plasmarc plasmarc
ln -s /usr/share/plasma/desktoptheme/default/solid/ translucent
ln -s /usr/share/plasma/desktoptheme/default/widgets/* ./widgets/
rm ./widgets/translucentbackground.svgz
ln -s /usr/share/plasma/desktoptheme/default/widgets/background.svgz ./widgets/translucentbackground.svgz
cat << JSON > metadata.json
{
"KPlugin": {
"Category": "",
"Description": "Breeze Light Opaque",
"EnabledByDefault": true,
"Id": "breeze-light-opaque",
"Name": "Breeze Light Opaque"
},
"X-Plasma-API": "5.0"
}
JSON
echo "Making Breeze Dark Opaque"
rm -rf ~/.local/share/plasma/desktoptheme/breeze-dark-opaque
mkdir -p ~/.local/share/plasma/desktoptheme/breeze-dark-opaque/widgets
cd ~/.local/share/plasma/desktoptheme/breeze-dark-opaque
ln -s /usr/share/plasma/desktoptheme/breeze-dark/colors colors
ln -s /usr/share/plasma/desktoptheme/breeze-dark/plasmarc plasmarc
ln -s /usr/share/plasma/desktoptheme/default/solid/ translucent
ln -s /usr/share/plasma/desktoptheme/default/widgets/* ./widgets/
rm ./widgets/translucentbackground.svgz
ln -s /usr/share/plasma/desktoptheme/default/widgets/background.svgz ./widgets/translucentbackground.svgz
cat << JSON > metadata.json
{
"KPlugin": {
"Category": "",
"Description": "Breeze Dark Opaque",
"EnabledByDefault": true,
"Id": "breeze-dark-opaque",
"Name": "Breeze Dark Opaque"
},
"X-Plasma-API": "5.0"
}
JSON
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment