allora / awmtools

GNU General Public License v2.0
8 stars 0 forks source link

error when launching taskswitcher #1

Open zeltak opened 8 years ago

zeltak commented 8 years ago

Hi

the project looks very cool. i installed in on arch including dependencies but get this error:

zeltak@zx1voics taskswitcher ↳ ./taskswitcher.py -v -l master │ Traceback (most recent call last): │ File "./taskswitcher.py", line 350, in │ main(sys.argv[1:]) │ File "./taskswitcher.py", line 335, in main │ window = findWindow( direction, window_list, workspace_id, active_window, active_frame, buff, verbose, rotAngle│ s ) │ File "./taskswitcher.py", line 155, in findWindow │ window_workspaceid = ewmh.getWmDesktop(window) │ File "/usr/lib/python3.5/site-packages/ewmh/ewmh.py", line 269, in getWmDesktop │ return self._getProperty('_NET_WM_DESKTOP', win)[0] │ TypeError: 'NoneType' object is not subscriptable │ zeltak@zx1voics taskswitcher ↳ master │ │ ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼

allora commented 8 years ago

zeltak, you'll get this error if your WM doesn't support workspaces/desktops. This is common in tilers such as DWM or awesome (or others that use tags). Or if the WM does not support EWMH compliance like FVWM. I've been looking to add ewmh feature checking. I've also toyed around with a small work around that could possibly allow taskswitcher to work on desktopless but still ewmh supporting WMs. However in DWM it causes the selected window to move to the primary tile locaiton. So its still somewhat a wip :) Check the dev branch to give it a try.

zeltak commented 8 years ago

thx i use i3 which i thought was EWMH compliance but i may be wrong. ill try the dev branch later this week when work isnt pressing :)

thx for your work on this

Z

allora commented 8 years ago

Yeah, in order to be EWMH compliant you actually don't have to implement the whole spec. Most of the features are optional :D So basically i3 probably doesn't use desktops because its a tiler and uses tags instead. FWIW i looked at DWM, and it seems like they respond to setActiveWindow by placing the activated window in the primary tile. Hopefully i3 doesn't do the same thing :D. With the work around in dev, I did manage to get DWM to work .. after modifying dwm :|

Airblader commented 8 years ago

Just FYI, i3 does not implement this part of the EWMH spec because the spec is too restrictive in its concept and cannot be applied to the i3 workspace concept.

A posible solution for "all" window managers is abstracting this layer in the taskswitcher and providing different implementations for getting the information, defaulting to the "EWMH plug". Then you can have a specific "i3 plug" to make it work there.

allora commented 8 years ago

The desktop check is mainly to build a list of all windows you can get to. I cull out windows that aren't on your current desktop. Perhaps a better solution would be to check the windows' visibiility instead. I've been somewhat distracted by implementing my own WM in rust/learning rust, so taskswitcher is kind of on the back burner for a bit :) I do plan on getting back to this to solve this problem soon.