fuhsjr00 / bug.n

Tiling Window Manager for Windows
GNU General Public License v3.0
3.35k stars 212 forks source link

Use WinExists and WinActivate across tags #171

Open johannesgerer opened 6 years ago

johannesgerer commented 6 years ago

The WinExists/WinActivate combination has been a real productivity boost for me when using AutoHotkey.

How can I have bug.n switch to the view that contains rhe window with a certain Id?

johannesgerer commented 6 years ago

Ok, I managed to implement something myself after having read Manager_OnShellMessage.

joten commented 6 years ago

For future reference:

With the default configuration setting Config_onActiveHiddenWnds=view bug.n should switch to the view, if the view is not active, i.e. all windows of that view are hidden, and one of those windows is activated. Therefor it should be possible to even switch the view from within another script as long as the releated window id is known.

Currently, the function Monitor_activateView(i, d = 0) does not allow a window id as a parameter; one would have to loop through all monitors and views, looking for the window id in View_#<monitor index>_#<view index>_wndIds and first activating the monitor and than the view using the indices previously found.