altdesktop / i3ipc-python

🐍 An improved Python library to control i3wm and sway.
http://i3ipc-python.readthedocs.io
BSD 3-Clause "New" or "Revised" License
851 stars 109 forks source link

Problem with workspace focus when the name starts with space #146

Closed ashish-yadav11 closed 4 years ago

ashish-yadav11 commented 4 years ago

I have my workspace names in i3 set to start with space (for example " 1: "). workspace_name = " 1: \uf015" i3.command(f'workspace {workspace_name}') The above code in python3, with i3 as the connection object, takes me to workspace "1: " instead of " 1: ".

acrisci commented 4 years ago

Try quoting your workspace name.

i3.command(f'workspace "{workspace_name}"')
ashish-yadav11 commented 4 years ago

It worked. Thanks