The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
1

Swapping workspaces script does not work

asked 2014-05-03 18:37:07 +0000

foop gravatar image

updated 2014-05-03 19:10:14 +0000

Adaephon gravatar image

Hello, I tried this script "User-contributed article: Swapping workspaces". Sadly I cannot post the link as my karma is insufficient.

However it does not work. Instead I get the following error

Traceback (most recent call last):
  File "./swap.py", line 11, in <module>
    i3.move__workspace__to__output__right()
  File "/usr/local/lib/python2.7/dist-packages/i3.py", line 412, in function
    raise response
i3.MessageError: Expected one of these tokens: 'window', 'container', 'to', 'workspace', 'output', 'scratchpad', 'left', 'right', 'up', 'down', 'position', 'absolute'

line 11 is:

11 i3.move__workspace__to__output__right(    )

in zsh i3-msg works without a problem as in:

i3-msg move workspace to output right

I'm using 4.7.2 and the latest python bindings (ziberna/i3-py 0.6.4, 2012-04-28)

Kind regards

edit retag flag offensive close merge delete

Comments

i3-py is no longer maintained and has lots of bugs. I recommend using [i3ipc-python](https://github.com/acrisci/i3ipc-python) instead.

TonyC gravatar imageTonyC ( 2014-05-03 19:36:41 +0000 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-05-03 19:17:07 +0000

Adaephon gravatar image

I think that should be

i3.move("workspace", "to", "output", "right")

instead of

i3.move__workspace__to__output__right

In ziberna's i3-py the i3 commands are mapped to functions of the same name, any parameters have to be passed as arguments.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-05-03 18:37:07 +0000

Seen: 143 times

Last updated: May 03 '14