magiclayout
magiclayout copied to clipboard
Doesnt work with sworkstyle/Manjaro Sway Edition
Hi,
Unfortunately couldn't get magiclayout to work with my system - which uses sworkstyle to set the workspace titles :( Can you think of any workaround?
Heres the traceback...
Workspace 2: not found
Traceback (most recent call last):
File "/home/lachlan/repos/magiclayout/src/magiclayout.py", line 177, in <module>
connection.main()
File "/usr/lib/python3.10/site-packages/i3ipc/connection.py", line 514, in main
raise loop_exception
File "/usr/lib/python3.10/site-packages/i3ipc/connection.py", line 497, in main
while not self._event_socket_poll():
File "/usr/lib/python3.10/site-packages/i3ipc/connection.py", line 477, in _event_socket_poll
raise e
File "/usr/lib/python3.10/site-packages/i3ipc/connection.py", line 474, in _event_socket_poll
self._pubsub.emit(event_name, event)
File "/usr/lib/python3.10/site-packages/i3ipc/_private/pubsub.py", line 28, in emit
s['handler'](self.conn, data)
File "/home/lachlan/repos/magiclayout/src/magiclayout.py", line 140, in on_new_or_closed_window
Layout.from_workspace(connection,
File "/home/lachlan/repos/magiclayout/src/layout.py", line 112, in from_workspace
raise ValueError(f"Workspace {workspace} not found")
ValueError: Workspace 2: not found
Yea it totally assumes right now that workspace names are not changing after they are created. You can create new workspaces with creative names but renaming during execution will not work. I'm not sure if I am going to support this. I'll look into it, it depends on whether there is another stable criterion. Right now mapping layout to workspaces names is core functionality.
The suggested workflow I envisioned is that you would want to have a specific workspace for coding/browsing etc. that may differ in how application are layed out. If you use dynamic workspaces, I would consider including an option to disable separating the layouts based on workspace entirely. That is also the way you could hotfix this for yourself, just assign all layouts to the same WS name.