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

Id not available in WorkspaceReply object even when it is in the ipc_data #180

Open Tumetsu opened 3 years ago

Tumetsu commented 3 years ago

Not sure if this a bug or feature but I noticed that when I needed to get the id from WorkspaceReply, I noticed that it is not in the WorkspaceReply object:

    _members = [
        ('num', int),
        ('name', str),
        ('visible', bool),
        ('focused', bool),
        ('urgent', bool),
        ('rect', Rect),
        ('output', str),
    ]

However, during coding I noticed that the property is indeed available via ipc_data object of the WorkspaceReply.

While my script works fine by using the ipc_data I was confused at first how to code the feature I wanted until I found by debugger that the id is available in ipc_data which led me to wonder if this an error with the i3ipc-python.

For whatever it's worth, I'm using i3ipc-python 2.2.1 and i3 version i3 version 4.19 (2020-11-15)

acrisci commented 3 years ago

We can go ahead and add that property.