mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-06 01:00:06 +02:00
Show floating windows as panels of their own
ft-screens makes a panel for each spare output (frametop.float.N), hidden until ft-floatd floats a window on it. The panel shows only the window's rectangle of the buffer at the density of the screen it came from, its popups and dialogs get small panels over it, pressing its title bar carries it while KWin's pointer stays put, the corner tab resizes the window in pixels, and two more buttons close it and put it back on the desktop. The session adds FLOAT_SLOTS spare outputs to KWin and starts ft-floatd; ft-layout arranges only the screens' outputs, and the pointer helper treats the new panels like screens. Not yet tried in the headset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
87a402c68d
commit
c2e5e861c8
9 files changed
+480
-75
No files matched your search
+6
-1
@@ -684,13 +684,18 @@ def nested_env():
|
||||
|
||||
|
||||
def outputs(env):
|
||||
"""KWin's outputs, in screen order (WL-0, WL-1, ...)."""
|
||||
"""KWin's outputs for the screens, in screen order (WL-0, WL-1, ...)."""
|
||||
try:
|
||||
data = json.loads(subprocess.run(["kscreen-doctor", "-j"], capture_output=True, text=True, env=env,
|
||||
timeout=10).stdout)
|
||||
except (OSError, ValueError, subprocess.TimeoutExpired):
|
||||
return []
|
||||
outs = [o for o in data.get("outputs", []) if o.get("connected")]
|
||||
if backend() == "screens":
|
||||
# Outputs after the screens are spares for floating windows (ft-floatd places them).
|
||||
count = screen_count()
|
||||
outs = [o for o in outs if not re.fullmatch(r"WL-(\d+)", o.get("name", "")) or
|
||||
int(o["name"][3:]) < count]
|
||||
return sorted(outs, key=lambda o: [int(t) if t.isdigit() else t for t in re.split(r"(\d+)", o.get("name", ""))])
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user