mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-06 02:00:06 +02:00
Session: bring back a taskbar saved on a screen the desktop doesn't have
Plasma 6.2.5 keeps a panel on a screen number and never moves one whose number is past the screen count, so a taskbar saved on a spare output (#18, lastScreen=8 with three screens) or on a screen a smaller layout dropped stayed hidden. Before Plasma starts, session/fix-panels.py moves such a panel and its tray's containment to screen 0 (the primary), keeping its widgets, unless screen 0 already has a panel on that edge. doctor.sh checks the panels' screens, and report.sh lists them with the live outputs and panels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e0208687b6
commit
d995b815f8
6 files changed
+335
-1
No files matched your search
@@ -36,6 +36,10 @@ check "distrobox" on_frame 'test -x ~/.local/bin/distrobox && ~/.local/bin/distr
|
||||
check "container $FRAME_BOX" on_frame "podman ps -a --filter name=^$FRAME_BOX\$ --format '{{.Image}} {{.Status}}' | grep ."
|
||||
check "repo on the Frame" on_frame 'pwd'
|
||||
check "free space in ~" on_frame "df -h ~ | awk 'NR==2{print \$4\" free\"}'"
|
||||
# A taskbar saved on a screen the desktop doesn't have is hidden; the desktop's next start
|
||||
# moves it to the first screen (session/fix-panels.py).
|
||||
check "taskbar on a screen" on_frame 'set -o pipefail; [ -f session/fix-panels.py ] || { echo "not checked (older checkout)"; exit 0; }
|
||||
python3 session/fix-panels.py --check | paste -sd ";" | sed "s/;/; /g"'
|
||||
|
||||
echo "what Frametop needs from SteamOS:"
|
||||
if [ "$FRAME_LOCAL" = 1 ]; then
|
||||
|
||||
@@ -42,6 +42,25 @@ for i, s in enumerate(d.get("screens", []), 1):
|
||||
print("visibility:", d.get("visibility"))
|
||||
PY
|
||||
|
||||
section "Plasma panels and outputs"
|
||||
python3 "$repo/session/fix-panels.py" --check 2>&1 || true
|
||||
python3 - "$repo" <<'PY' 2>&1 || true
|
||||
import json, subprocess, sys
|
||||
sys.path.insert(0, sys.argv[1] + "/layout")
|
||||
import ft_layout
|
||||
env = ft_layout.nested_env()
|
||||
if not env:
|
||||
sys.exit(print("desktop not running: no live outputs or panels"))
|
||||
outs = json.loads(subprocess.run(["kscreen-doctor", "-j"], capture_output=True, text=True, env=env, timeout=10).stdout or "{}")
|
||||
for o in outs.get("outputs", []):
|
||||
size = o.get("size") or {}
|
||||
print(f"output {o.get('name')}: enabled={o.get('enabled')} priority={o.get('priority')} {size.get('width')}x{size.get('height')}")
|
||||
js = "print(JSON.stringify(panels().map(p => ({id: p.id, screen: p.screen, location: p.location}))))"
|
||||
r = subprocess.run(["qdbus6", "org.kde.plasmashell", "/PlasmaShell", "org.kde.PlasmaShell.evaluateScript", js],
|
||||
capture_output=True, text=True, env=env, timeout=10)
|
||||
print("live panels:", (r.stdout or r.stderr).strip())
|
||||
PY
|
||||
|
||||
section "Input relay (last 60 lines)"
|
||||
journalctl --user -u frametop-input-relay -n 60 --no-pager -o short 2>/dev/null
|
||||
section "Pointer helper (last 60 lines)"
|
||||
|
||||
Reference in new issue
Block a user