Bug 267408 - [New Port] x11/py-autotiling: Automatically switch the window split orientation in sway and i3
Summary: [New Port] x11/py-autotiling: Automatically switch the window split orientati...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Juraj Lutter
URL: https://github.com/nwg-piotr/autotiling
Keywords:
Depends on: 267326
Blocks:
  Show dependency treegraph
 
Reported: 2022-10-28 23:14 UTC by Robert Clausecker
Modified: 2022-11-11 20:29 UTC (History)
2 users (show)

See Also:


Attachments
[New Port] x11/py-autotiling: Automatically switch the window split orientation in sway and i3 (4.11 KB, patch)
2022-10-28 23:14 UTC, Robert Clausecker
fuz: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker freebsd_committer freebsd_triage 2022-10-28 23:14:47 UTC
Created attachment 237697 [details]
[New Port] x11/py-autotiling: Automatically switch the window split orientation in sway and i3

This script uses the i3ipc-python library to switch the layout
splith/splitv depending on the currently focused window dimensions.
It works on both sway and i3 window managers.

The script does one thing: it checks the window height / width ratio,
and executes the equivalent of either swaymsg splitv or swaymsg splith.
Nothing less, nothing more.  Yes, it may make stacking and tabbed
layouts behave oddly.  No, nothing can be done about it.  If you like
stacking/tabbed layouts, you may use them on workspaces with autotiling
turned off (--workspaces argument).  Do not submit issues about it.

Tested with Poudriere on armv7 arm64 i386 amd64 FreeBSD 13.1.
Does not build with latest due to dependency affected by bug #267326.
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2022-10-28 23:40:57 UTC
Don't know about the utility of this program.

On i3 we can just use:

# split in horizontal orientation
bindsym Mod1+h split h

# split in vertical orientation
bindsym Mod1+v split v

and any keybinding to open windows with programs (terminals, etc)
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2022-10-28 23:53:07 UTC
(In reply to Nuno Teixeira from comment #1)

The purpose of the program is that it automatically decides whether horizontal or vertical splitting is best in the current situation, so you don't have to decide yourself.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-11-11 20:27:18 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=29ffad78e36c430d4f01dc482a6e5282c92171d8

commit 29ffad78e36c430d4f01dc482a6e5282c92171d8
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-11-11 20:25:24 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2022-11-11 20:25:24 +0000

    x11/py-autotiling: Add new port

    Automatically switch the window split orientation in sway and i3.

    This script uses the i3ipc-python library to switch the layout
    splith/splitv depending on the currently focused window dimensions.  It
    works on both sway and i3 window managers.

    PR:             267408

 x11/Makefile                                  |  1 +
 x11/py-autotiling/Makefile (new)              | 20 ++++++++++++++++++++
 x11/py-autotiling/distinfo (new)              |  3 +++
 x11/py-autotiling/files/patch-setup.cfg (new) | 10 ++++++++++
 x11/py-autotiling/pkg-descr (new)             | 16 ++++++++++++++++
 x11/py-autotiling/pkg-message (new)           |  9 +++++++++
 6 files changed, 59 insertions(+)
Comment 4 Juraj Lutter freebsd_committer freebsd_triage 2022-11-11 20:29:49 UTC
Committed, thanks.