From 8362f48750b374ea83120ce97115991539b4a0e5 Mon Sep 17 00:00:00 2001 From: The412Banner Date: Sun, 20 Sep 2026 04:40:23 -0400 Subject: [PATCH] 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/. --- .github/workflows/build.yml | 1 + .../launcher/session/SessionFiles.kt | 1 + tools/linuxfs/desktop/autostart | 7 ++- tools/linuxfs/desktop/panel.conf | 55 +++++++++++++++++++ tools/linuxfs/desktop/rc.xml | 1 + tools/linuxfs/desktop/steamdeck-desktop | 11 +++- 6 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 tools/linuxfs/desktop/panel.conf diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1655338a5..df9eede6f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -95,6 +95,7 @@ jobs: install -Dm644 tools/linuxfs/desktop/steamdeck-desktop "$D/usr/local/bin/steamdeck-desktop" install -Dm644 tools/linuxfs/desktop/autostart "$D/etc/xdg/labwc/autostart" install -Dm644 tools/linuxfs/desktop/rc.xml "$D/etc/xdg/labwc/rc.xml" + install -Dm644 tools/linuxfs/desktop/panel.conf "$D/etc/xdg/lxqt/panel.conf" ls -lR "$D" # Runs whether the preloads were built or restored: readelf reads any ELF whatever the host, diff --git a/app/src/main/java/com/steamdeck/launcher/session/SessionFiles.kt b/app/src/main/java/com/steamdeck/launcher/session/SessionFiles.kt index 7979cdab07..5064067ff5 100644 --- a/app/src/main/java/com/steamdeck/launcher/session/SessionFiles.kt +++ b/app/src/main/java/com/steamdeck/launcher/session/SessionFiles.kt @@ -38,6 +38,7 @@ object SessionFiles { "usr/local/bin/steamdeck-desktop" to "usr/local/bin/steamdeck-desktop", "etc/xdg/labwc/autostart" to "etc/xdg/labwc/autostart", "etc/xdg/labwc/rc.xml" to "etc/xdg/labwc/rc.xml", + "etc/xdg/lxqt/panel.conf" to "etc/xdg/lxqt/panel.conf", ) val all = if (File(root, "usr/bin/labwc").isFile) files + desktop else files for ((asset, relative) in all) { diff --git a/tools/linuxfs/desktop/autostart b/tools/linuxfs/desktop/autostart index b1995228c5..91102f0964 100644 --- a/tools/linuxfs/desktop/autostart +++ b/tools/linuxfs/desktop/autostart @@ -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/.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 diff --git a/tools/linuxfs/desktop/panel.conf b/tools/linuxfs/desktop/panel.conf new file mode 100644 index 0000000000..06c940f749 --- /dev/null +++ b/tools/linuxfs/desktop/panel.conf @@ -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 diff --git a/tools/linuxfs/desktop/rc.xml b/tools/linuxfs/desktop/rc.xml index 6b3916ede6..632c0a109c 100644 --- a/tools/linuxfs/desktop/rc.xml +++ b/tools/linuxfs/desktop/rc.xml @@ -8,6 +8,7 @@ 6 DejaVu Sans11 + center diff --git a/tools/linuxfs/desktop/steamdeck-desktop b/tools/linuxfs/desktop/steamdeck-desktop index 79d115dff5..7772cb0e6a 100644 --- a/tools/linuxfs/desktop/steamdeck-desktop +++ b/tools/linuxfs/desktop/steamdeck-desktop @@ -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