Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- from wayfire import WayfireSocket
- from wayfire.extra.ipc_utils import WayfireUtils
- import itertools
- sock = WayfireSocket()
- utils = WayfireUtils(sock)
- def go_next_workspace():
- grid_info = utils.get_active_workspace_info()
- current_x, current_y = grid_info['x'], grid_info['y']
- grid_width, grid_height = grid_info['grid_width'], grid_info['grid_height']
- next_ws = None
- if current_x < grid_width - 1:
- next_ws = {'x': current_x + 1, 'y': current_y}
- else:
- next_ws = {'x': 0, 'y': current_y + 1 if current_y < grid_height - 1 else 0}
- if next_ws:
- sock.set_workspace(next_ws)
- go_next_workspace()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement