[PATCH 0/2] gnu: Add python-i3ipc and python-autotiling.

DoneSubmitted by Hilton Chain.
Details
4 participants
  • Hilton Chain
  • Ludovic Courtès
  • Maxime Devos
  • (
Owner
unassigned
Severity
normal
H
H
Hilton Chain wrote on 23 Jul 09:00 +0200
(address . guix-patches@gnu.org)
cover.1658559627.git.hako@ultrarare.space
Hi Guix,

These patches add autotiling (a tool to automatically switch the
horizontal/vertical window split orientation in i3 and sway) and its
dependency i3ipc.

Since I do not have a working X environment, their tests are currently
disabled.

Thanks!

Hilton Chain (2):
gnu: Add python-i3ipc
gnu: Add python-autotiling.

gnu/packages/python-xyz.scm | 50 +++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)


base-commit: 32a00363435ac8c1bc93ef1281b2c2afc28a8877
--
2.36.1
H
H
Hilton Chain wrote on 23 Jul 08:31 +0200
[PATCH 1/2] gnu: Add python-i3ipc
(address . 56717@debbugs.gnu.org)
fc72d928e6c377ecadb0fd2a33e51288d96a55fd.1658559627.git.hako@ultrarare.space
* gnu/packages/python-xyz.scm (python-i3ipc): New variable.

Signed-off-by: Hilton Chain <hako@ultrarare.space>
---
gnu/packages/python-xyz.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 11f709f7b5..4bf6b3d965 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -124,6 +124,7 @@
 ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
 ;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
+;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -30203,3 +30204,25 @@ (define-public python-bsdiff4
 binary diff utility.  It also provides two command-line tools, @code{bsdiff4}
 and @code{bspatch4}.")
     (license license:bsd-2)))
+
+(define-public python-i3ipc
+  (package
+    (name "python-i3ipc")
+    (version "2.2.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/altdesktop/i3ipc-python")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "13bzs9dcv27czpnnbgz7a037lm8h991c8gk0qzzk5mq5yak24715"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:tests? #f))
+    (inputs (list python-xlib))
+    (home-page "https://github.com/altdesktop/i3ipc-python")
+    (synopsis "Python library for controlling i3wm and sway")
+    (description "An improved Python library to control i3wm and sway.")
+    (license license:bsd-3)))
-- 
2.36.1
H
H
Hilton Chain wrote on 23 Jul 08:33 +0200
[PATCH 2/2] gnu: Add python-autotiling.
(address . 56717@debbugs.gnu.org)
d98d8429224b48f25db0ca9ba4419f30fd226dc4.1658559627.git.hako@ultrarare.space
* gnu/packages/python-xyz.scm (python-autotiling): New variable.

Signed-off-by: Hilton Chain <hako@ultrarare.space>
---
gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4bf6b3d965..8fd413a683 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30226,3 +30226,30 @@ (define-public python-i3ipc
     (synopsis "Python library for controlling i3wm and sway")
     (description "An improved Python library to control i3wm and sway.")
     (license license:bsd-3)))
+
+(define-public python-autotiling
+  (package
+    (name "autotiling")
+    (version "1.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/nwg-piotr/autotiling")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1hjlvg7095s322gb43r9g7mqlsy3pj13l827jpnbn5x0918rq9rr"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:tests? #f))
+    (inputs (list python-wheel python-xlib))
+    (propagated-inputs (list python-i3ipc))
+    (home-page "https://github.com/nwg-piotr/autotiling")
+    (synopsis
+     "Automatically switch the horizontal/vertical window split orientation in
+ i3 and sway")
+    (description "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.")
+    (license license:gpl3)))
-- 
2.36.1
(
Re: [bug#56717] [PATCH 1/2] gnu: Add python-i3ipc
CLMWO3R5E8II.3UT1GKEYTWQDI@guix-aspire
Hello!

On Sat Jul 23, 2022 at 7:31 AM BST, Hilton Chain via Guix-patches via wrote:
Toggle quote (2 lines)
> + (arguments
> + '(#:tests? #f))
Could you add an explanation of why the test fails in a comment, if
possible? Also, (arguments (list ...)) is now generally preferred to
(arguments '(...)) :)

-- (
(
CLMWQHGF662Z.9XGQ3EBT522V@guix-aspire
On Sat Jul 23, 2022 at 7:31 AM BST, Hilton Chain via Guix-patches via wrote:
Toggle quote (1 lines)
> + (inputs (list python-xlib))
You'll want to propagate this input, as is usually done for Python
libraries.

-- (
(
Re: [bug#56717] [PATCH 2/2] gnu: Add python-autotiling.
CLMWR6CZTJC4.3BY34EAKG35QU@guix-aspire
On Sat Jul 23, 2022 at 7:33 AM BST, Hilton Chain via Guix-patches via wrote:
Toggle quote (1 lines)
> +(define-public python-autotiling
I think this should be changed to `i3-autotiling`, since it's a Python
program, not a library.

Toggle quote (2 lines)
> + (package
> + (name "autotiling")
Same here.

Toggle quote (2 lines)
> + (arguments
> + '(#:tests? #f))
Can you add an explanation and change to (list ...) style here too,
please?

Toggle quote (1 lines)
> + (inputs (list python-wheel python-xlib))
I think python-wheel only needs to be a native-input, and python-xlib
can be removed if you propagate it in python-i3ipc.

-- (
H
H
Hilton Chain wrote on 23 Jul 12:40 +0200
[PATCH v2 0/2] gnu: Add python-i3ipc and i3-autotiling.
(name . ()(address . paren@disroot.org)(address . 56717@debbugs.gnu.org)
cover.1658572827.git.hako@ultrarare.space
v1 -> v2:
* Package name: python-autotiling -> i3-autotiling
* Arguments style: use (list ...) instead of '(...)
* Comments for tests

Thank you, ( !

Hilton Chain (2):
gnu: Add python-i3ipc.
gnu: Add i3-autotiling.

gnu/packages/python-xyz.scm | 48 +++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)


base-commit: 32a00363435ac8c1bc93ef1281b2c2afc28a8877
--
2.36.1
H
H
Hilton Chain wrote on 23 Jul 12:31 +0200
[PATCH v2 1/2] gnu: Add python-i3ipc.
(name . ()(address . paren@disroot.org)(address . 56717@debbugs.gnu.org)
6fa4d8cb7d3d072fff1940fea71ddfa71bfc5d7f.1658572827.git.hako@ultrarare.space
* gnu/packages/python-xyz.scm (python-i3ipc): New variable.

Signed-off-by: Hilton Chain <hako@ultrarare.space>
---
gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 11f709f7b5..2115007a97 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -124,6 +124,7 @@
 ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
 ;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
+;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -30203,3 +30204,24 @@ (define-public python-bsdiff4
 binary diff utility.  It also provides two command-line tools, @code{bsdiff4}
 and @code{bspatch4}.")
     (license license:bsd-2)))
+
+(define-public python-i3ipc
+  (package
+    (name "python-i3ipc")
+    (version "2.2.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/altdesktop/i3ipc-python")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "13bzs9dcv27czpnnbgz7a037lm8h991c8gk0qzzk5mq5yak24715"))))
+    (build-system python-build-system)
+    (arguments (list #:tests? #f)) ;a working X environment is needed to run the tests
+    (propagated-inputs (list python-xlib))
+    (home-page "https://github.com/altdesktop/i3ipc-python")
+    (synopsis "Python library for controlling i3wm and sway")
+    (description "An improved Python library to control i3wm and sway.")
+    (license license:bsd-3)))
--
2.36.1
H
H
Hilton Chain wrote on 23 Jul 12:31 +0200
[PATCH v2 2/2] gnu: Add i3-autotiling.
(name . ()(address . paren@disroot.org)(address . 56717@debbugs.gnu.org)
e3150809a19f9b719c202666d8bd396fc7b03c07.1658572827.git.hako@ultrarare.space
* gnu/packages/python-xyz.scm (i3-autotiling): New variable.

Signed-off-by: Hilton Chain <hako@ultrarare.space>
---
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2115007a97..eeeced71b7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30225,3 +30225,29 @@ (define-public python-i3ipc
     (synopsis "Python library for controlling i3wm and sway")
     (description "An improved Python library to control i3wm and sway.")
     (license license:bsd-3)))
+
+(define-public i3-autotiling
+  (package
+    (name "i3-autotiling")
+    (version "1.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/nwg-piotr/autotiling")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1hjlvg7095s322gb43r9g7mqlsy3pj13l827jpnbn5x0918rq9rr"))))
+    (build-system python-build-system)
+    (arguments (list #:tests? #f)) ;a working X environment is needed to run the tests
+    (native-inputs (list python-wheel))
+    (propagated-inputs (list python-i3ipc))
+    (home-page "https://github.com/nwg-piotr/autotiling")
+    (synopsis
+     "Automatically switch the horizontal/vertical window split orientation in
+ i3 and sway")
+    (description "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.")
+    (license license:gpl3)))
--
2.36.1
(
Re: [PATCH v2 1/2] gnu: Add python-i3ipc.
(name . Hilton Chain)(address . hako@ultrarare.space)(address . 56717@debbugs.gnu.org)
CLMZ6BSBQ3JF.1TSDOPDG6AF3X@guix-aspire
Almost LGTM :)

On Sat Jul 23, 2022 at 11:31 AM BST, Hilton Chain wrote:
Toggle quote (1 lines)
> + (synopsis "Python library for controlling i3wm and sway")
i3wm -> i3 and sway -> Sway maybe?

Toggle quote (1 lines)
> + (description "An improved Python library to control i3wm and sway.")
Maybe better as:

(description
"This package provides a Python library for controlling the i3 and Sway
window managers.")

Also, have you run `guix lint python-i3ipc i3-autotiling`? Make sure to
do that and resolve any issues it raises :)

-- (
(
Re: [PATCH v2 2/2] gnu: Add i3-autotiling.
(name . Hilton Chain)(address . hako@ultrarare.space)(address . 56717@debbugs.gnu.org)
CLMZ9JY9V3MG.AMEOP4SMDT7N@guix-aspire
On Sat Jul 23, 2022 at 11:31 AM BST, Hilton Chain wrote:
Toggle quote (3 lines)
> + (synopsis
> + "Automatically switch the horizontal/vertical window split orientation in
> + i3 and sway")
I think a synopsis that spills onto multiple lines is probably too long.
How about simply:

(synopsis "Automatically tile windows in i3 and Sway")

Toggle quote (3 lines)
> + (description "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.")
Maybe something like:

(description
"This package provides a script that automatically switches the layout
of an i3 or Sway desktop based on the dimensions of the focused window.")

(By the way, that's the standard formatting for a description: the
string is on a new line.)

-- (
M
M
Maxime Devos wrote on 23 Jul 13:01 +0200
Re: [bug#56717] [PATCH v2 2/2] gnu: Add i3-autotiling.
(address . 56717@debbugs.gnu.org)
6b7e06cc-13b6-9aa9-e982-fdb993715fe8@telenet.be
On 23-07-2022 12:31, Hilton Chain via Guix-patches via wrote:
Toggle quote (1 lines)
> + (arguments (list #:tests? #f)) ;a working X environment is needed to run the tests
You can make a working X environment with "xvfb-run -- the-test-command"
or with (IIRC) "Xvfb :1&" + (sleep 1) (preferably the former, as the
latter is racy) -- search with "git grep -F xvfb-run" or "git grep -F
Xvfb" for examples.
Greetings,
Maxime.
Attachment: OpenPGP_signature
H
H
Hilton Chain wrote on 23 Jul 13:38 +0200
(address . 56717@debbugs.gnu.org)
y76czdw3vpl.wl-hako@ultrarare.space
Thanks!

xvfb-run works well, however some "Fontconfig error: No writable cache directories"
occurs. I don't know what to do with this, do you have any ideas?

* Below attaching part of the build log:
---
/gnu/store/65i3nhcwmz0p8rqbg48gaavyky4g4hwk-python-3.9.9/lib/python3.9/selectors.py:469: Failed
---------------------------- Captured stderr setup -----------------------------
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
----------------------------- Captured stderr call -----------------------------
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
------------------------------ Captured log call -------------------------------
ERROR asyncio:base_events.py:1738 Task exception was never retrieved
future: <Task finished name='Task-82' coro=<Connection.command() done, defined at /gnu/store/gwsda4lb70rzazfh0kzx9z3wx5i4z43b-python-i3ipc-2.2.1/lib/python3.9/site-packages/i3ipc/aio/connection.py:503> exception=OSError(107, 'Transport endpoint is not connected')>
Traceback (most recent call last):
File "/gnu/store/gwsda4lb70rzazfh0kzx9z3wx5i4z43b-python-i3ipc-2.2.1/lib/python3.9/site-packages/i3ipc/aio/connection.py", line 514, in command
data = await self._message(MessageType.COMMAND, cmd)
File "/gnu/store/gwsda4lb70rzazfh0kzx9z3wx5i4z43b-python-i3ipc-2.2.1/lib/python3.9/site-packages/i3ipc/aio/connection.py", line 407, in _message
await self._loop.sock_sendall(self._cmd_socket, _pack(message_type, payload))
File "/gnu/store/65i3nhcwmz0p8rqbg48gaavyky4g4hwk-python-3.9.9/lib/python3.9/asyncio/selector_events.py", line 446, in sock_sendall
n = sock.send(data)
OSError: [Errno 107] Transport endpoint is not connected
ERROR asyncio:base_events.py:1738 Future exception was never retrieved
future: <Future finished exception=FileNotFoundError(2, 'No such file or directory')>
Traceback (most recent call last):
File "/gnu/store/gwsda4lb70rzazfh0kzx9z3wx5i4z43b-python-i3ipc-2.2.1/lib/python3.9/site-packages/i3ipc/aio/connection.py", line 383, in do_reconnect
await self.connect()
File "/gnu/store/gwsda4lb70rzazfh0kzx9z3wx5i4z43b-python-i3ipc-2.2.1/lib/python3.9/site-packages/i3ipc/aio/connection.py", line 359, in connect
self._cmd_socket.connect(self.socket_path)
FileNotFoundError: [Errno 2] No such file or directory
M
M
Maxime Devos wrote on 23 Jul 14:17 +0200
(address . 56717@debbugs.gnu.org)
911a81ee-0905-66cf-1e7d-f17478e54d00@telenet.be
On 23-07-2022 13:38, Hilton Chain wrote:
Toggle quote (2 lines)
> xvfb-run works well, however some "Fontconfig error: No writable cache directories"
> occurs. I don't know what to do with this, do you have any ideas?
For these kind of things, creating the relevant directory and setting an
environment variable tends to work. Maybe try (setenv "HOME"
(getcwd)))?  However, IIUC, these fontconfig errors can usually be
ignored (probably because it's just a cache?), likely the "Transport
endpoint is not connected" test failure is independent.
My guess is that it tries to connect to the WM i3, but that WM is not
running in the build environment fails.
You could give starting the WM before running the test a try, but maybe
it's not worth the effort.
Greetings,
Maxime.
Attachment: OpenPGP_signature
(
(address . 56717@debbugs.gnu.org)
CLN15PTEZ6MM.10I5ECF8AOLU6@guix-aspire
On Sat Jul 23, 2022 at 1:17 PM BST, Maxime Devos wrote:
Toggle quote (5 lines)
> For these kind of things, creating the relevant directory and setting an
> environment variable tends to work. Maybe try (setenv "HOME"
> (getcwd)))?  However, IIUC, these fontconfig errors can usually be
> ignored (probably because it's just a cache?), likely the "Transport
> endpoint is not connected" test failure is independent.
We got this working on IRC :)

Toggle quote (5 lines)
> My guess is that it tries to connect to the WM i3, but that WM is not
> running in the build environment fails.
>
> You could give starting the WM before running the test a try, but maybe
> it's not worth the effort.
Looks like the tests do a popen on i3 themselves:



-- (
H
H
Hilton Chain wrote on 23 Jul 14:49 +0200
[PATCH v3 0/2] gnu: Add python-i3ipc and i3-autotiling.
(address . 56717@debbugs.gnu.org)
cover.1658580543.git.hako@ultrarare.space
v2 -> v3: synopsis and description changes suggested by (

Hilton Chain (2):
gnu: Add python-i3ipc.
gnu: Add i3-autotiling.

gnu/packages/python-xyz.scm | 49 +++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)


base-commit: 32a00363435ac8c1bc93ef1281b2c2afc28a8877
--
2.36.1
H
H
Hilton Chain wrote on 23 Jul 14:46 +0200
[PATCH 1/2] gnu: Add python-i3ipc.
(address . 56717@debbugs.gnu.org)
8bf4277efc2ed428bfc3cdbd640790fca97246cc.1658580543.git.hako@ultrarare.space
* gnu/packages/python-xyz.scm (python-i3ipc): New variable.

Signed-off-by: Hilton Chain <hako@ultrarare.space>
---
gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 11f709f7b5..d67b535d40 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -124,6 +124,7 @@
 ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
 ;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
+;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -30203,3 +30204,26 @@ (define-public python-bsdiff4
 binary diff utility.  It also provides two command-line tools, @code{bsdiff4}
 and @code{bspatch4}.")
     (license license:bsd-2)))
+
+(define-public python-i3ipc
+  (package
+    (name "python-i3ipc")
+    (version "2.2.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/altdesktop/i3ipc-python")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "13bzs9dcv27czpnnbgz7a037lm8h991c8gk0qzzk5mq5yak24715"))))
+    (build-system python-build-system)
+    (arguments (list #:tests? #f))      ;FIXME: some tests are unable to run
+    (propagated-inputs (list python-xlib))
+    (home-page "https://github.com/altdesktop/i3ipc-python")
+    (synopsis "Python library for controlling i3 and Sway")
+    (description
+     "This package provides a Python library for controlling the i3 and Sway
+ window managers.")
+    (license license:bsd-3)))
-- 
2.36.1
H
H
Hilton Chain wrote on 23 Jul 14:48 +0200
[PATCH 2/2] gnu: Add i3-autotiling.
(address . 56717@debbugs.gnu.org)
767257c5d3ae679d4638341ddca510c17f574cb1.1658580543.git.hako@ultrarare.space
* gnu/packages/python-xyz.scm (i3-autotiling): New variable.

Signed-off-by: Hilton Chain <hako@ultrarare.space>
---
gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d67b535d40..fc00779b40 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30227,3 +30227,28 @@ (define-public python-i3ipc
      "This package provides a Python library for controlling the i3 and Sway
  window managers.")
     (license license:bsd-3)))
+
+(define-public i3-autotiling
+  (package
+    (name "i3-autotiling")
+    (version "1.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/nwg-piotr/autotiling")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1hjlvg7095s322gb43r9g7mqlsy3pj13l827jpnbn5x0918rq9rr"))))
+    (build-system python-build-system)
+    (arguments (list #:tests? #f))      ;no tests
+    (native-inputs (list python-wheel))
+    (propagated-inputs (list python-i3ipc))
+    (home-page "https://github.com/nwg-piotr/autotiling")
+    (synopsis "Automatically tile windows in i3 and Sway")
+    (description
+     "This script uses the python-i3ipc library to switch the layout
+splith/splitv depending on the currently focused window dimensions.  It works on
+both sway and i3 window managers.")
+    (license license:gpl3)))
-- 
2.36.1
(
(address . 56717@debbugs.gnu.org)
CLN1W1YUDO21.344T6NEL1SD1S@guix-aspire
On Sat Jul 23, 2022 at 1:48 PM BST, Hilton Chain wrote:
Toggle quote (4 lines)
> + (description
> + "This script uses the python-i3ipc library to switch the layout
> +splith/splitv depending on the currently focused window dimensions. It works on
> +both sway and i3 window managers.")
I think you should probably change this one, too. 'splith'/'splitv'
doesn't make much sense as there's no mention of sway or i3 until the
end. Also, sway -> Sway :)

-- (
H
H
Hilton Chain wrote on 23 Jul 15:08 +0200
[PATCH v4 0/2] gnu: Add python-i3ipc and i3-autotiling.
(address . 56717@debbugs.gnu.org)
cover.1658581723.git.hako@ultrarare.space
v3 -> v4: description change for i3-autotiling.

Hilton Chain (2):
gnu: Add python-i3ipc.
gnu: Add i3-autotiling.

gnu/packages/python-xyz.scm | 48 +++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)


base-commit: 32a00363435ac8c1bc93ef1281b2c2afc28a8877
--
2.36.1
H
H
Hilton Chain wrote on 23 Jul 14:46 +0200
[PATCH v4 1/2] gnu: Add python-i3ipc.
(address . 56717@debbugs.gnu.org)
8bf4277efc2ed428bfc3cdbd640790fca97246cc.1658581723.git.hako@ultrarare.space
* gnu/packages/python-xyz.scm (python-i3ipc): New variable.

Signed-off-by: Hilton Chain <hako@ultrarare.space>
---
gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 11f709f7b5..d67b535d40 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -124,6 +124,7 @@
 ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
 ;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
+;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -30203,3 +30204,26 @@ (define-public python-bsdiff4
 binary diff utility.  It also provides two command-line tools, @code{bsdiff4}
 and @code{bspatch4}.")
     (license license:bsd-2)))
+
+(define-public python-i3ipc
+  (package
+    (name "python-i3ipc")
+    (version "2.2.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/altdesktop/i3ipc-python")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "13bzs9dcv27czpnnbgz7a037lm8h991c8gk0qzzk5mq5yak24715"))))
+    (build-system python-build-system)
+    (arguments (list #:tests? #f))      ;FIXME: some tests are unable to run
+    (propagated-inputs (list python-xlib))
+    (home-page "https://github.com/altdesktop/i3ipc-python")
+    (synopsis "Python library for controlling i3 and Sway")
+    (description
+     "This package provides a Python library for controlling the i3 and Sway
+ window managers.")
+    (license license:bsd-3)))
--
2.36.1
H
H
Hilton Chain wrote on 23 Jul 14:48 +0200
[PATCH v4 2/2] gnu: Add i3-autotiling.
(address . 56717@debbugs.gnu.org)
393dcb660e887bcb15d35ee51ea1d92a1e365128.1658581723.git.hako@ultrarare.space
* gnu/packages/python-xyz.scm (i3-autotiling): New variable.

Signed-off-by: Hilton Chain <hako@ultrarare.space>
---
gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d67b535d40..114d7817fe 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30227,3 +30227,27 @@ (define-public python-i3ipc
      "This package provides a Python library for controlling the i3 and Sway
  window managers.")
     (license license:bsd-3)))
+
+(define-public i3-autotiling
+  (package
+    (name "i3-autotiling")
+    (version "1.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/nwg-piotr/autotiling")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1hjlvg7095s322gb43r9g7mqlsy3pj13l827jpnbn5x0918rq9rr"))))
+    (build-system python-build-system)
+    (arguments (list #:tests? #f))      ;no tests
+    (native-inputs (list python-wheel))
+    (propagated-inputs (list python-i3ipc))
+    (home-page "https://github.com/nwg-piotr/autotiling")
+    (synopsis "Automatically tile windows in i3 and Sway")
+    (description
+     "Script for Sway and i3 to automatically switch the horizontal/vertical
+ window split orientation.")
+    (license license:gpl3)))
--
2.36.1
L
L
Ludovic Courtès wrote on 6 Aug 23:14 +0200
Re: bug#56717: [PATCH 0/2] gnu: Add python-i3ipc and python-autotiling.
(name . Hilton Chain)(address . hako@ultrarare.space)
87tu6pcbx9.fsf_-_@gnu.org
Hi,

Hilton Chain <hako@ultrarare.space> skribis:

Toggle quote (3 lines)
> gnu: Add python-i3ipc.
> gnu: Add i3-autotiling.

Applied, thank you, and thanks to the reviewers!

Ludo’.
Closed
(
CLZ998PBOBAF.ZEOJT5CDCZLK@guix-aspire
On Sat Aug 6, 2022 at 10:14 PM BST, Ludovic Courtès wrote:
Toggle quote (2 lines)
> Applied, thank you, and thanks to the reviewers!

Thanks Ludo! :D

-- (
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 56717@debbugs.gnu.org