fuhsjr00 / bug.n

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

A way to change from monocle to tiled, and make focused window master? #164

Open ghost opened 6 years ago

ghost commented 6 years ago

Pretty much as the title says. Currently, I have a separate ahk script that looks like this:\

CapsLock & d:: ;enter tiled mode, with the focused window going into the master area
send, #!+{t} ; my personal hotkey to switch to tiled mode
send, #!^{i} ; my personal hotkey to make focused window the master
return

However, when switching from monocle to tiled with my hotkey, if the window I had focused was already the master from previously, then it gets switched over to position 2.

joten commented 6 years ago

Ah, well, it's not a bug, it's a feature ;-) Switching the master. The following may be a workaround, but has to be implemented in bug.n (e.g. Config.ahk) and cannot be used in a separate script:

CapsLock & d::
  View_setLayout(1)
  If (InStr(View_tiledWndIds, WinExist("A") ";") > 1)
    View_shuffleWindow(1)
Return

Though, I did not test it; I am currently not working on Windows.

ghost commented 6 years ago

Thanks joten, it seems to be working like a charm!