i3a 2.3.0__tar.gz → 2.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: i3a
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: Automatic manager for i3 tiling
5
- Home-page: https://git.goral.net.pl/i3a.git
6
5
  License: GPL-3.0-or-later
7
6
  Author: Michal Goral
8
7
  Author-email: dev@goral.net.pl
@@ -20,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
23
  Classifier: Programming Language :: Python :: 3 :: Only
24
24
  Classifier: Topic :: Utilities
25
25
  Requires-Dist: i3ipc (>=2.2.1,<3.0.0)
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "i3a"
7
- version = "2.3.0"
7
+ version = "2.3.1"
8
8
  description = "Automatic manager for i3 tiling"
9
9
  authors = ["Michal Goral <dev@goral.net.pl>"]
10
10
  license = "GPL-3.0-or-later"
@@ -105,13 +105,19 @@ class Autotiler:
105
105
  master, stack = master_stack(tree, tree.find_focused())
106
106
 
107
107
  if master and not stack:
108
- await self.cmd('[con_id="{}"] split horizontal'.format(master.id))
108
+ # move up: we have only 1 window, which previously could be in a
109
+ # stack, but now we "reinterpret" it as a master. It might still be inside
110
+ # its empty container which was created for the purpose of vertical split.
111
+ # 'move up' breaks free from it.
112
+ await self.cmd('[con_id="{}"] move up, split horizontal'.format(master.id))
109
113
  return
110
114
 
111
115
  if not master and stack:
112
116
  await self.intermove(stack[0], 'move left')
113
117
  if len(stack) > 1: # stack[0] becomes a new master, resize remains
114
118
  await self.cmd('[con_id="{}"] resize set {} ppt 0 ppt'.format(stack[-1].id, self.args.stack_size))
119
+ elif len(stack) == 1:
120
+ await self.cmd('[con_id="{}"] move up'.format(stack[0]))
115
121
 
116
122
  async def _node_added(self, tree, e):
117
123
  master, stack = master_stack(tree, e.container, exclude_node=True)
@@ -124,7 +130,12 @@ class Autotiler:
124
130
  return
125
131
 
126
132
  if not stack:
127
- await self.cmd('[con_id="{}"] split horizontal'.format(master.id))
133
+ # Split master.parent instead of master? Easy explanation: we don't
134
+ # want to split the container for the window to not create artificial empty
135
+ # tree nodes (implementation detail of i3/sway) which clutter the
136
+ # output of get_tree command. They aren't garbaged when we close stack, so
137
+ # long sessions might accumulate quite a lot of them.
138
+ await self.cmd('[con_id="{}"] split horizontal'.format(master.parent.id))
128
139
  await self.make_stack(curr)
129
140
  await self.cmd('[con_id="{}"] resize set {} ppt 0 ppt'.format(curr.id, self.args.stack_size))
130
141
  else:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes