Open bluebyt opened 7 months ago
I fixed sock.go_next_workspace() but this function will just go to the next workspace, if you want go only for workspaces with views then you need sock.go_next_workspace_with_views()
update the module:
git clone https://github.com/killown/waypy
cd waypy
python3 -m pip install .
I updated but I get another error.
Traceback (most recent call last):
File "/home/bluebyt/.config/ipc-scripts/./workspace2.py", line 4, in
"vswitch/set-workspace"
you need the plugin vswitch enabled
can you update the module again, I added list_methods
you can check every method and respective plugin using print(sock.list_methods())
Yes I have the plugin vswitch enabled. Wayfire.ini plugins = ipc ipc-rules stipc alpha animate autostart command cube expo fast-switcher fisheye grid foreign-toplevel gtk-shell idle move place resize switcher vswitch window-rules wm-actions wobbly wrot zoom scale wf-info background-view wsets
I am not sure how to use the command print(sock.list_methods())
I added this in my script:
Error:
Traceback (most recent call last):
File "/home/bluebyt/.config/ipc-scripts/./workspace2.py", line 11, in
Yes I have the plugin vswitch enabled. Wayfire.ini plugins = ipc ipc-rules stipc alpha animate autostart command cube expo fast-switcher fisheye grid foreign-toplevel gtk-shell idle move place resize switcher vswitch window-rules wm-actions wobbly wrot zoom scale wf-info background-view wsets
I am not sure how to use the command print(sock.list_methods())
I added this in my script:
Error: Traceback (most recent call last): File "/home/bluebyt/.config/ipc-scripts/./workspace2.py", line 11, in sock.go_next_workspace() File "/home/bluebyt/.local/lib/python3.11/site-packages/wayfire.py", line 589, in go_next_workspace workspaces = list(self.total_workspaces().values()) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/bluebyt/.local/lib/python3.11/site-packages/wayfire.py", line 881, in total_workspaces winfo = self.get_active_workspace_info() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/bluebyt/.local/lib/python3.11/site-packages/wayfire.py", line 499, in get_active_workspace_info focused_output = self.get_focused_output() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/bluebyt/.local/lib/python3.11/site-packages/wayfire.py", line 472, in get_focused_output return self.send_json(message)["info"] ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/bluebyt/.local/lib/python3.11/site-packages/wayfire.py", line 100, in send_json return self.read_message() ^^^^^^^^^^^^^^^^^^^ File "/home/bluebyt/.local/lib/python3.11/site-packages/wayfire.py", line 81, in read_message raise Exception(response["error"]) Exception: No such method found!
list_methods will return a list of methods, just to check the available methods you can use, you can ignore it, not useful in your script!
about the focused_output, you need to install the latest wayfire-git
I retried the script since it has been updated, now the next workspace sock.go_next_workspace()
command works, but not the previous workspace
sock.go_previous_workspace()
`Traceback (most recent call last):
File "/home/bluebyt/.config/ipc-scripts/workspace2.py", line 11, in
TypeError: 'int' object is not subscriptable`
This command is working: sock.set_workspace({"x":2, "y":2})
But this command give me an error: sock.go_next_workspace()
Traceback (most recent call last): File "/home/bluebyt/.config/ipc-scripts/./workspace2.py", line 8, in
sock.go_next_workspace()
File "/home/bluebyt/.local/lib/python3.11/site-packages/wayfire.py", line 411, in go_next_workspace
self.set_workspace(next)
File "/home/bluebyt/.local/lib/python3.11/site-packages/wayfire.py", line 945, in set_workspace
x, y = workspace["x"], workspace["y"]