Message ID | e3150809a19f9b719c202666d8bd396fc7b03c07.1658572827.git.hako@ultrarare.space |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D639227BBEA; Sat, 23 Jul 2022 11:46:28 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 873A227BBE9 for <patchwork@mira.cbaines.net>; Sat, 23 Jul 2022 11:46:28 +0100 (BST) Received: from localhost ([::1]:50106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>) id 1oFCeR-00035r-La for patchwork@mira.cbaines.net; Sat, 23 Jul 2022 06:46:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oFCe2-00035S-OY for guix-patches@gnu.org; Sat, 23 Jul 2022 06:46:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oFCe2-0003jW-B7 for guix-patches@gnu.org; Sat, 23 Jul 2022 06:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oFCe2-0001qe-7Q for guix-patches@gnu.org; Sat, 23 Jul 2022 06:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56717] [PATCH v2 2/2] gnu: Add i3-autotiling. Resent-From: Hilton Chain <hako@ultrarare.space> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Jul 2022 10:46:02 +0000 Resent-Message-ID: <handler.56717.B56717.16585731096998@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56717 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "(" <paren@disroot.org> Cc: 56717@debbugs.gnu.org Received: via spool by 56717-submit@debbugs.gnu.org id=B56717.16585731096998 (code B ref 56717); Sat, 23 Jul 2022 10:46:02 +0000 Received: (at 56717) by debbugs.gnu.org; 23 Jul 2022 10:45:09 +0000 Received: from localhost ([127.0.0.1]:43631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1oFCdA-0001oo-NV for submit@debbugs.gnu.org; Sat, 23 Jul 2022 06:45:09 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:40548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <hako@ultrarare.space>) id 1oFCd9-0001oL-5u for 56717@debbugs.gnu.org; Sat, 23 Jul 2022 06:45:07 -0400 Message-Id: <e3150809a19f9b719c202666d8bd396fc7b03c07.1658572827.git.hako@ultrarare.space> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1658573101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:in-reply-to:references:references:references; bh=q60+9yCWtZ6KBxRg3axcvlfa5LAHMUEgF6Qkl3FtVQQ=; b=qlTnVbjTc3LFs6Snm0HI5kGsFmCGMRpBuKEC6UNIRMzTIb1ImpKWYjaSrpHS0PuhbKzilr AlP96o4wkQXB+eQWtMs3Tpac7ZzOIeqTxYojy+u0OSrRavPKjIJTdk4aIB3BOOLd4mOjWq 18PkUk4VXE0gSPx7l6bcR1GOQciyVT3zibzeI8wMdVeHLuI2uiNMXNwibuvteIgxfROWay 9l8Km+A3DsK2VAjXq7R6oJX+ee1JYR/5rstkd4Q0oCI0iQ2oMAMhakMCHiC9JrpnyvLHVc RJmQbEFNVZ78+lBH7Y55cnraWsRYVXXfnrC3pgB2NWLvPBzXPCdrM01li/lXRQ== In-Reply-To: <cover.1658572827.git.hako@ultrarare.space> References: <cover.1658572827.git.hako@ultrarare.space> Date: Sat, 23 Jul 2022 18:31:36 +0800 In-Reply-To: <6fa4d8cb7d3d072fff1940fea71ddfa71bfc5d7f.1658572827.git.hako@ultrarare.space> References: <cover.1658572827.git.hako@ultrarare.space> <6fa4d8cb7d3d072fff1940fea71ddfa71bfc5d7f.1658572827.git.hako@ultrarare.space> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spamd-Bar: +++++ Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> Reply-to: Hilton Chain <hako@ultrarare.space> X-ACL-Warn: , Hilton Chain via Guix-patches <guix-patches@gnu.org> From: Hilton Chain via Guix-patches via <guix-patches@gnu.org> X-getmail-retrieved-from-mailbox: Patches |
Series |
gnu: Add python-i3ipc and i3-autotiling.
|
|
Commit Message
Hilton Chain
July 23, 2022, 10:31 a.m. UTC
* 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(+)
--
2.36.1
Comments
On Sat Jul 23, 2022 at 11:31 AM BST, Hilton Chain wrote: > + (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") > + (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.) -- (
On 23-07-2022 12:31, Hilton Chain via Guix-patches via wrote:
> + (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.
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
On 23-07-2022 13:38, Hilton Chain wrote: > 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.
On Sat Jul 23, 2022 at 1:17 PM BST, Maxime Devos wrote: > 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 :) > 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: <https://github.com/altdesktop/i3ipc-python/blob/master/test/ipctest.py#L16> -- (
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
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)))