aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@fuz.su>2022-11-11 20:25:24 +0000
committerJuraj Lutter <otis@FreeBSD.org>2022-11-11 20:25:24 +0000
commit29ffad78e36c430d4f01dc482a6e5282c92171d8 (patch)
tree9af623a91dca1f300ab89baf75d3efc52fcdaaf6
parent95fe54732a25fcf021f52574bb400a862230f129 (diff)
downloadports-29ffad78e36c430d4f01dc482a6e5282c92171d8.tar.gz
ports-29ffad78e36c430d4f01dc482a6e5282c92171d8.zip
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
-rw-r--r--x11/Makefile1
-rw-r--r--x11/py-autotiling/Makefile20
-rw-r--r--x11/py-autotiling/distinfo3
-rw-r--r--x11/py-autotiling/files/patch-setup.cfg10
-rw-r--r--x11/py-autotiling/pkg-descr16
-rw-r--r--x11/py-autotiling/pkg-message9
6 files changed, 59 insertions, 0 deletions
diff --git a/x11/Makefile b/x11/Makefile
index 146c0967ba70..e92d0a0163b8 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -297,6 +297,7 @@
SUBDIR += pmenu
SUBDIR += polybar
SUBDIR += printscreen
+ SUBDIR += py-autotiling
SUBDIR += py-caffeine-ng
SUBDIR += py-i3-quickterm
SUBDIR += py-i3ipc
diff --git a/x11/py-autotiling/Makefile b/x11/py-autotiling/Makefile
new file mode 100644
index 000000000000..091373535492
--- /dev/null
+++ b/x11/py-autotiling/Makefile
@@ -0,0 +1,20 @@
+PORTNAME= autotiling
+DISTVERSION= 1.7
+CATEGORIES= x11
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= fuz@fuz.su
+COMMENT= Automatically switch the window split orientation in sway and i3
+WWW= https://github.com/nwg-piotr/autotiling
+
+LICENSE= GPLv3+
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}i3ipc>0:x11/py-i3ipc@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent distutils
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/x11/py-autotiling/distinfo b/x11/py-autotiling/distinfo
new file mode 100644
index 000000000000..0a4e0cb4d361
--- /dev/null
+++ b/x11/py-autotiling/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1666995853
+SHA256 (autotiling-1.7.tar.gz) = ecf1d2d400e56bafe88e47b9653222f77e2398de4b46bfa2e3beb785b117b92a
+SIZE (autotiling-1.7.tar.gz) = 16769
diff --git a/x11/py-autotiling/files/patch-setup.cfg b/x11/py-autotiling/files/patch-setup.cfg
new file mode 100644
index 000000000000..9a62ccbb7c17
--- /dev/null
+++ b/x11/py-autotiling/files/patch-setup.cfg
@@ -0,0 +1,10 @@
+--- setup.cfg.orig 2022-10-24 23:56:22 UTC
++++ setup.cfg
+@@ -32,7 +32,6 @@ install_requires =
+ python_requires = >=3.6
+ setup_requires =
+ setuptools>=42
+- wheel
+
+ [options.entry_points]
+ console_scripts =
diff --git a/x11/py-autotiling/pkg-descr b/x11/py-autotiling/pkg-descr
new file mode 100644
index 000000000000..43c61fdf0530
--- /dev/null
+++ b/x11/py-autotiling/pkg-descr
@@ -0,0 +1,16 @@
+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.
+
+For instance, you may configure autotiling to work on odd workspaces,
+but not on even:
+
+### Autostart
+ exec autotiling -w 1 3 5 7 9
diff --git a/x11/py-autotiling/pkg-message b/x11/py-autotiling/pkg-message
new file mode 100644
index 000000000000..0318598dce2c
--- /dev/null
+++ b/x11/py-autotiling/pkg-message
@@ -0,0 +1,9 @@
+To use x11/py-autotiling, add
+
+ exec_always autotiling
+
+or
+
+ exec_always --no-startup-id autotiling
+
+to the ~/.config/sway/config or ~/.config/i3/config file.