From 7da0f953287e1d496ae9605a1e8c4d0af64b6481 Mon Sep 17 00:00:00 2001 From: Jacob Komissar <18540209+jirassimok@users.noreply.github.com> Date: Wed, 2 Jul 2025 13:21:04 -0400 Subject: [PATCH] Add sway's variant field to VersionReply This allows telling apart Sway versions and i3 versions. --- i3ipc/replies.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/i3ipc/replies.py b/i3ipc/replies.py index 8a2fa6a..12e0e2a 100644 --- a/i3ipc/replies.py +++ b/i3ipc/replies.py @@ -244,6 +244,9 @@ class VersionReply(_BaseReply): :vartype human_readable: str :ivar loaded_config_file_name: The current config path. :vartype loaded_config_file_name: str + :ivar variant: (sway only) The string "sway," to disambiguate Sway and i3 + versions. + :vartype variant: str from Sway, or :class:`None` from i3 :ivar ipc_data: The raw data from the i3 ipc. :vartype ipc_data: dict """ @@ -253,6 +256,7 @@ class VersionReply(_BaseReply): ('patch', int), ('human_readable', str), ('loaded_config_file_name', str), + ('variant', str), ]