Merge pull request #34 from theupriser/bugfix/theme-off-single-launcher

fix: theme off no longer brings back single user's launcher restriction
This commit is contained in:
theupriser authored and GitHub committed 2026-09-28 10:53:19 +02:00
commit 9ae1388f88
3 files changed
+25 -2

No files matched your search

+2 -1
View File
@@ -15,7 +15,8 @@ one per merged pull request.
- `bee18b7` **docs: the agent merges feature/bugfix branches into the release branch; the release into main stays the user's** - `bee18b7` **docs: the agent merges feature/bugfix branches into the release branch; the release into main stays the user's**
- `501c0ba` **docs: gh or git for merging into the release branch** - `501c0ba` **docs: gh or git for merging into the release branch**
- `b1adacb` **docs: gh is required for the release-branch pull requests; ask the user to install it** - `b1adacb` **docs: gh is required for the release-branch pull requests; ask the user to install it**
- **chore: the v2 app preview is gone (it is the released app): no preview pre-release step in CI, no mention in steamify-app.sh** - `ced4a45` **chore: the v2 app preview is gone (it is the released app): no preview pre-release step in CI, no mention in steamify-app.sh**
- **fix: turning the theme off no longer brings back single user's launcher restriction when single user was turned off in between**
## 2.6.0 - 2026-09-27 ## 2.6.0 - 2026-09-27
+18
View File
@@ -101,6 +101,24 @@ single_launcher() {
done done
} }
single_launcher_drop() {
# The theme's layout backup is taken when it's turned on: with single
# user on then, it holds single's launcher keys, and restoring it after
# single was turned off brings them back. Drop exactly single's values
# (a launcher set up differently by the user is left alone).
local applet
local -a kick_args
for applet in $(plasma_applets org.kde.plasma.kickoff); do
kick_args=(--file plasma-org.kde.plasma.desktop-appletsrc --group Containments --group "${applet%%:*}"
--group Applets --group "${applet#*:}" --group Configuration --group General)
[[ "$(kreadconfig6 "${kick_args[@]}" --key primaryActions)" == 3 ]] &&
kwriteconfig6 "${kick_args[@]}" --key primaryActions --delete
[[ "$(kreadconfig6 "${kick_args[@]}" --key systemFavorites)" == 'suspend,reboot,shutdown' ]] &&
kwriteconfig6 "${kick_args[@]}" --key systemFavorites --delete
done
return 0
}
single_enable() { single_enable() {
info "Turning off the lock screen, user switching and logging out..." info "Turning off the lock screen, user switching and logging out..."
stop_plasmashell_for_edit stop_plasmashell_for_edit
+5 -1
View File
@@ -134,7 +134,11 @@ theme_disable() {
fi fi
# After the tools above, so keys that weren't set before are removed again. # After the tools above, so keys that weren't set before are removed again.
krevert theme krevert theme
single_status && single_launcher if single_status; then
single_launcher
else
single_launcher_drop
fi
restart_plasmashell_if_stopped restart_plasmashell_if_stopped
qdbus6 org.kde.KWin /KWin org.kde.KWin.reconfigure >/dev/null 2>&1 || true qdbus6 org.kde.KWin /KWin org.kde.KWin.reconfigure >/dev/null 2>&1 || true