From 05059758bae813fec76673cd1c6810eff1394d3b Mon Sep 17 00:00:00 2001 From: fhchl Date: Tue, 7 Jan 2020 11:36:33 +0100 Subject: [PATCH] make compatible with i3ipc>=2.0 --- new_workspace.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/new_workspace.py b/new_workspace.py index cae75a1..854ac7d 100755 --- a/new_workspace.py +++ b/new_workspace.py @@ -15,9 +15,9 @@ def find_next_ws_num_on_monitor(i3): focused_monitor = focused_workspace(i3).output logging.info('focused monitor: %s' % focused_monitor) - ws_on_monitor = filter(lambda ws: ws['output'] == focused_monitor, + ws_on_monitor = filter(lambda ws: ws.output == focused_monitor, i3.get_workspaces()) - nums = [ws['num'] for ws in ws_on_monitor] + nums = [ws.num for ws in ws_on_monitor] maxnum = max(nums) logging.info('max workspace on monitor: %s' % str(maxnum))