Closed furgerf closed 2 years ago
Forgot to link issue #2
Hi @dflock would you mind having look at this when you have a moment? :)
I'm very sorry for leaving this for so long!
Thank you for your patch - I'm now working on this.
Does running this command correctly produce a list of workspace names for you?:
$ wmctrl -d | awk -F' ' '{print $NF}'
I think this should work in both cases - geometry or not. Only edge case would be where the user has two spaces in a workspace name.
OK, so I think this fixes that edge case:
$ wmctrl -d | sed -n -E -e 's/^.*WA: (N\/A|.,. [[:digit:]]+x[[:digit:]]+) //p'
Awesome! That's neat, and also good that it doesn't rely on not having two spaces in a WS name.
I used your sed
script with the original code and that indeed works for me as well.
Thank you very much for your help in fixing this issue - and for your patience!
The workspace information contains one column fewer when the workspace geometry is unavailable, which previously broke the retrieval of the workspace name.
The name should now be retrieved correctly in both cases and with an arbitrary number of spaces between the columns of
wmctrl -d
.