From e03c010435bfd9519fd305d20ed50ee2a9a46104 Mon Sep 17 00:00:00 2001 From: m0gjr <54117655+m0gjr@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:06:19 +0100 Subject: [PATCH] Update __init__.py ignore fullscreen windows and floating windows when setting tiling these changes will allow floating/fullscreen windows to be opened correctly when only a single base window exists --- stacki3/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stacki3/__init__.py b/stacki3/__init__.py index 8019479..b5cecca 100644 --- a/stacki3/__init__.py +++ b/stacki3/__init__.py @@ -22,9 +22,10 @@ async def set_splitting(i3, _, width: int) -> None: if focused is None: return workspace = focused.workspace() - tiled_windows = [leaf for leaf in workspace.leaves() if not is_floating(leaf)] + tiled_windows = [leaf for leaf in workspace.leaves() if not is_floating(leaf) and not leaf.fullscreen_mode] if len(tiled_windows) == 1: - await focused.command("splith") + window = tiled_windows[0] + await window.command("splith") elif len(tiled_windows) == 2: left, right = tiled_windows await left.command("splitv")