fix: the SteamOS theme drops the blank Discover pin from the taskbar (also on the first login of an ISO install)

This commit is contained in:
theupriser committed 2026-10-02 10:52:04 +02:00
1 parent 97a9b43dd4
commit 033dbf1a67
4 files changed
+30 -13

No files matched your search

+22 -7
View File
@@ -106,17 +106,32 @@ theme_enable() {
# SteamOS panel, launcher icon and wallpaper. It needs plasmashell up.
lookandfeeltool -a "$VAPOR_LOOKANDFEEL" --resetLayout >/dev/null 2>&1 ||
{ err "lookandfeeltool failed."; return 1; }
# The new layout has a new launcher, without single user's settings.
if single_status; then
sleep 3
stop_plasmashell_for_edit
single_launcher
restart_plasmashell_if_stopped
fi
# The new layout has a new launcher, without single user's settings, and the default taskbar pins.
sleep 3
stop_plasmashell_for_edit
taskbar_drop_discover
single_status && single_launcher
restart_plasmashell_if_stopped
extras_enable || warn "SteamOS desktop extras not installed (see above); the theme itself is on."
ok "Vapor theme active."
}
taskbar_drop_discover() {
# Plasma's default taskbar pins Discover, which CachyOS doesn't install: the pin shows as a
# blank icon. Pin what CachyOS's own layout pins (/etc/skel) instead. Not when Discover is
# installed, and only on a taskbar that still has the default pins (no launchers key).
# Edit only while plasmashell is stopped.
[[ -e /usr/share/applications/org.kde.discover.desktop ]] && return 0
local applet grp
for applet in $(plasma_applets org.kde.plasma.icontasks); do
grp="Containments|${applet%%:*}|Applets|${applet#*:}|Configuration|General"
[[ -n "$(kreadconfig6 --file plasma-org.kde.plasma.desktop-appletsrc --group Containments --group "${applet%%:*}" \
--group Applets --group "${applet#*:}" --group Configuration --group General --key launchers)" ]] && continue
kset theme plasma-org.kde.plasma.desktop-appletsrc "$grp" launchers \
'applications:systemsettings.desktop,preferred://filemanager,preferred://browser'
done
}
theme_disable() {
extras_disable
info "Restoring the previous desktop look and layout..."