Desktop: name the panel in panel.conf, size the nested output to the app's surface

The panel was there all along, a bare strip at the top: the first package's
panel.conf described a panel it never named in [General] panels=, so
lxqt-panel built itself a default one with no plugins. panel.conf now travels
with the app like the rest of the desktop's defaults, and the old nameless
file on a device is replaced once. The nested labwc output was 1280x720 -
wlroots' default window - with the desktop upscaled from that; rc.xml now
carries the app's surface size and the autostart sets it again via wlr-randr.
Debug runs keep each program's full output under ~/.cache/steamdeck/.
This commit is contained in:
The412Banner committed 2026-09-20 04:40:23 -04:00
1 parent f10919d4be
commit 8362f48750
6 files changed
+73 -3

No files matched your search

+6 -1
View File
@@ -4,11 +4,16 @@
run() {
local tag=$1; shift
if [ -f "$HOME/.steamdeck-desktop-debug" ]; then
WAYLAND_DEBUG=1 "$@" 2>&1 | awk -v t="[$tag]" 'c<120 && /layer_s|xdg_toplevel|xdg_surface@[0-9]+\.(set_|get_)|fullscreen|wl_output|xdg_output|rror|WARN|configure\(/ {print t, $0; c++}' &
# Everything it says goes to ~/.cache/steamdeck/<tag>.log; the window-related protocol
# traffic also goes into the session log, capped.
mkdir -p "$HOME/.cache/steamdeck"
WAYLAND_DEBUG=1 "$@" 2>&1 | tee "$HOME/.cache/steamdeck/$tag.log" | awk -v t="[$tag]" '!/^\[[0-9:.]+\] +\{/ || (c<120 && /layer_s|xdg_toplevel|fullscreen|wl_output|xdg_output|configure\(/) {print t, $0; c++; fflush()}' &
else
"$@" 2>&1 | sed "s/^/[$tag] /" &
fi
}
# The output at the app's real size, in case rc.xml's mode did not take.
[ -n "${BL_WIDTH:-}" ] && wlr-randr --output WL-1 --custom-mode "${BL_WIDTH}x${BL_HEIGHT}" >/dev/null 2>&1
swaybg -m fill -i /usr/share/backgrounds/steamdeck.png &
# Desktop icons (pcmanfm-qt manages the desktop surface) and the panel with the app menu.
run pcmanfm-qt pcmanfm-qt --desktop --profile lxqt
+55
View File
@@ -0,0 +1,55 @@
[General]
__userfile__=true
iconTheme=Papirus-Dark
panels=panel1
panels=panel1
[panel1]
alignment=-1
animation-duration=0
background-color=@Variant(\0\0\0\x43\x1\xff\xff\x1c\x1c\x1c\x1c\x1c\x1c\0\0)
background-image=
font-color=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\xff\xff\xff\xff\0\0)
hidable=false
iconSize=28
lineCount=1
lockPanel=false
opacity=90
panelSize=40
plugins=mainmenu, quicklaunch, taskbar, spacer, tray, worldclock, showdesktop
position=Bottom
reserve-space=true
show-delay=0
width=100
width-percent=true
[mainmenu]
type=mainmenu
icon=/usr/share/icons/Papirus-Dark/32x32/apps/steam.svg
showText=false
[quicklaunch]
type=quicklaunch
apps\1\desktop=/usr/share/applications/steamdeck-steam.desktop
apps\2\desktop=/usr/share/applications/steamdeck-bigpicture.desktop
apps\3\desktop=/usr/share/applications/pcmanfm-qt.desktop
apps\4\desktop=/usr/share/applications/qterminal.desktop
apps\size=4
[taskbar]
type=taskbar
buttonStyle=IconAndText
groupingEnabled=false
showGroupOnHover=true
[spacer]
type=spacer
[tray]
type=tray
[worldclock]
type=worldclock
[showdesktop]
type=showdesktop
+1
View File
@@ -8,6 +8,7 @@
<cornerRadius>6</cornerRadius>
<font place="ActiveWindow"><name>DejaVu Sans</name><size>11</size></font>
</theme>
<output name="WL-1" mode="@MODE@"/>
<placement><policy>center</policy></placement>
<windowSwitcher><osd show="yes" preview="yes"/></windowSwitcher>
<keyboard>
+9 -2
View File
@@ -15,9 +15,16 @@ export WLR_BACKENDS=wayland
mkdir -p "$HOME/.config/labwc" "$HOME/.config/lxqt"
# Our defaults for labwc and the panel, refreshed every session. What a user changes in the
# panel's own settings lands in panel.conf and is kept; only rc.xml and autostart are ours.
cp -f /etc/xdg/labwc/rc.xml "$HOME/.config/labwc/rc.xml"
# The nested output takes the app's surface size; left alone, wlroots' Wayland backend opens
# a 1280x720 window and the whole desktop is upscaled from that.
sed "s/@MODE@/${BL_WIDTH:-1280}x${BL_HEIGHT:-720}/" /etc/xdg/labwc/rc.xml > "$HOME/.config/labwc/rc.xml"
cp -f /etc/xdg/labwc/autostart "$HOME/.config/labwc/autostart"
[ -f "$HOME/.config/lxqt/panel.conf" ] || cp /etc/xdg/lxqt/panel.conf "$HOME/.config/lxqt/panel.conf"
# panel.conf is the user's once the panel has written it, except the one our first package
# shipped: it never named its panel ([General] panels=), so lxqt-panel built an empty default
# one. That file is replaced; one that names its panels is kept.
if ! grep -q '^panels=' "$HOME/.config/lxqt/panel.conf" 2>/dev/null; then
cp -f /etc/xdg/lxqt/panel.conf "$HOME/.config/lxqt/panel.conf"
fi
[ -f "$HOME/.config/lxqt/lxqt.conf" ] || cp /etc/xdg/lxqt/lxqt.conf "$HOME/.config/lxqt/lxqt.conf"
# pcmanfm-qt paints the desktop; left unconfigured it paints it black, over swaybg's wallpaper.
if [ ! -f "$HOME/.config/pcmanfm-qt/lxqt/settings.conf" ]; then