mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-06 04:04:09 +02:00
Session: blur, background contrast and animations off by default
The nested kwinrc had no [Plugins] group, so KWin ran its default blur and background contrast effects, and kdeglobals had no AnimationDurationFactor, so animations ran at full length. KWin renders through zink on Turnip, on the GPU vrcompositor needs, and blur re-renders what's behind every translucent panel and menu; each animation frame is another frame for KWin and ft-screens. Before KWin starts, the session script now writes [Plugins] blurEnabled=false and contrastEnabled=false to $XDG_CONFIG_HOME/kwinrc and [KDE] AnimationDurationFactor=0 to its kdeglobals, each only if the desktop's own file has no value for it. It does this once and records that in $XDG_CONFIG_HOME/frametoprc ([Defaults] effects=1), because System Settings deletes a key put back to its default: without the marker, turning blur back on wouldn't survive a restart. The ids blur and contrast are the built-in effects of KWin 6.2.5 on SteamOS (both enabled by default in its plugin metadata). Tested against a temporary XDG_CONFIG_HOME: fresh config, an existing blurEnabled=true kept, and a deleted key not rewritten. README and docs/reference.md say how to turn them back on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e1ee5ef395
commit
5b6cfcd746
4 files changed
+28
No files matched your search
@@ -234,6 +234,23 @@ elif [ "$(kreadconfig6 --file "$kwinrc" --group org.kde.kdecoration2 --key theme
|
||||
kwriteconfig6 --file "$kwinrc" --group org.kde.kdecoration2 --key theme --delete
|
||||
fi
|
||||
|
||||
# KWin draws through zink on the headset's GPU, which vrcompositor needs, so the blur and
|
||||
# background contrast behind panels and menus and the window animations cost frames for
|
||||
# little. They're off by default in this desktop. Each is written once, before KWin first
|
||||
# reads it, and only if this desktop's config doesn't have it yet; the marker keeps it
|
||||
# from coming back, since System Settings deletes a setting put back to KDE's default.
|
||||
# docs/reference.md says how to turn them on again.
|
||||
default() { # file group key value
|
||||
[ -n "$(kreadconfig6 --file "$1" --group "$2" --key "$3")" ] || kwriteconfig6 --file "$1" --group "$2" --key "$3" "$4"
|
||||
}
|
||||
frametoprc=$XDG_CONFIG_HOME/frametoprc
|
||||
if [ "$(kreadconfig6 --file "$frametoprc" --group Defaults --key effects)" != 1 ]; then
|
||||
default "$kwinrc" Plugins blurEnabled false
|
||||
default "$kwinrc" Plugins contrastEnabled false
|
||||
default "$XDG_CONFIG_HOME/kdeglobals" KDE AnimationDurationFactor 0
|
||||
kwriteconfig6 --file "$frametoprc" --group Defaults --key effects 1
|
||||
fi
|
||||
|
||||
# Profiles reopen apps (docs/profiles.md), so Plasma's own session restore stays off here;
|
||||
# with both, apps would open twice.
|
||||
kwriteconfig6 --file "$XDG_CONFIG_HOME/ksmserverrc" --group General --key loginMode emptySession
|
||||
|
||||
Reference in new issue
Block a user