Created
November 8, 2025 16:02
-
-
Save spaced/7de3009c18f00c1d66f4018d75f10aca to your computer and use it in GitHub Desktop.
Creates a new plasma style theme with more transparent panels
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| set -euo pipefail | |
| if [ "$#" -ne 2 ];then echo 'Usage: plasma-desktop-theme-custom.sh <name> <opacity>' && exit;fi | |
| THEME_NAME=$1 | |
| OPACITY=$2 | |
| SRC_THEME_DIR="/usr/share/plasma/desktoptheme/default" | |
| TARGET_THEME_DIR="${HOME}/.local/share/plasma/desktoptheme/${THEME_NAME}" | |
| echo "Create plasma style theme ${THEME_NAME}.." | |
| mkdir -p ${TARGET_THEME_DIR} | |
| cp -r ${SRC_THEME_DIR}/* ${TARGET_THEME_DIR}/ | |
| cat > ${TARGET_THEME_DIR}/metadata.json << EOF | |
| { | |
| "KPlugin": { | |
| "Id": "${THEME_NAME}", | |
| "Name": "${THEME_NAME}", | |
| "Version": "1.0.0" | |
| }, | |
| "X-Plasma-API": "5.0" | |
| } | |
| EOF | |
| cat > ${TARGET_THEME_DIR}/plasmarc << EOF | |
| [ContrastEffect] | |
| enabled=false | |
| contrast=0.2 | |
| saturation=10 | |
| [AdaptiveTransparency] | |
| enabled=true | |
| EOF | |
| for i in $(find ${TARGET_THEME_DIR} -name "*background*.svgz");do | |
| echo "Update ${i}.." | |
| mv ${i} ${i}.orig | |
| cat ${i}.orig | \ | |
| gunzip | \ | |
| sed "s/opacity:0.85/opacity:0.${OPACITY}/g" | \ | |
| gzip > ${i} | |
| done | |
| echo "Done." |
Author
spaced
commented
Nov 8, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment