Revised "Manager_setViewMonitor"
... to allow setting absolute and relative values.
This commit is contained in:
parent
0d967e02fe
commit
f7d712d61c
|
@ -13,8 +13,8 @@
|
||||||
3. `~` Migrated the following functions to `View_setLayoutProperty`: `View_setGapWidth`, `View_setMFactor`, `View_setMX`,
|
3. `~` Migrated the following functions to `View_setLayoutProperty`: `View_setGapWidth`, `View_setMFactor`, `View_setMX`,
|
||||||
`View_setMY` and `View_rotateLayoutAxis`
|
`View_setMY` and `View_rotateLayoutAxis`
|
||||||
4. `~` Revised the following functions to allow setting absolute and relative values: `Debug_setLogLevel`,
|
4. `~` Revised the following functions to allow setting absolute and relative values: `Debug_setLogLevel`,
|
||||||
`Manager_activateMonitor`, `Manager_setWindowMonitor`, `Monitor_activateView`, `Monitor_setWindowTag`, `View_setLayout`,
|
`Manager_activateMonitor`, `Manager_setViewMonitor`, `Manager_setWindowMonitor`, `Monitor_activateView`, `Monitor_setWindowTag`,
|
||||||
`View_setMFactor`, `View_shuffleWindow`
|
`View_setLayout`, `View_setMFactor`, `View_shuffleWindow`
|
||||||
5. `~` Revised the interface, i. e. the parameters, of the following functions for setting absolute and relative values -- but did
|
5. `~` Revised the interface, i. e. the parameters, of the following functions for setting absolute and relative values -- but did
|
||||||
not implement the functionality: `Monitor_toggleWindowTag`, `View_activateWindow`
|
not implement the functionality: `Monitor_toggleWindowTag`, `View_activateWindow`
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@ not implement the functionality: `Monitor_toggleWindowTag`, `View_activateWindow
|
||||||
| | | `#,::Manager_activateMonitor(-1)` | `#,::Manager_activateMonitor(0, -1)` |
|
| | | `#,::Manager_activateMonitor(-1)` | `#,::Manager_activateMonitor(0, -1)` |
|
||||||
| | | `#+.::Manager_setWindowMonitor(+1)` | `#+.::Manager_setWindowMonitor(0, +1)` |
|
| | | `#+.::Manager_setWindowMonitor(+1)` | `#+.::Manager_setWindowMonitor(0, +1)` |
|
||||||
| | | `#+,::Manager_setWindowMonitor(-1)` | `#+,::Manager_setWindowMonitor(0, -1)` |
|
| | | `#+,::Manager_setWindowMonitor(-1)` | `#+,::Manager_setWindowMonitor(0, -1)` |
|
||||||
|
| | | `#^+.::Manager_setViewMonitor(+1)` | `#^+.::Manager_setViewMonitor(0, +1)` |
|
||||||
|
| | | `#^+,::Manager_setViewMonitor(-1)` | `#^+,::Manager_setViewMonitor(0, -1)` |
|
||||||
| 5. | | `#Down::View_activateWindow(+1)` | `#Down::View_activateWindow(0, +1)` |
|
| 5. | | `#Down::View_activateWindow(+1)` | `#Down::View_activateWindow(0, +1)` |
|
||||||
| | | `#Up::View_activateWindow(-1)` | `#Up::View_activateWindow(0, -1)` |
|
| | | `#Up::View_activateWindow(-1)` | `#Up::View_activateWindow(0, -1)` |
|
||||||
|
|
||||||
|
|
|
@ -229,11 +229,14 @@ set the active window on the first monitor.
|
||||||
> Set the active window's view to the active view on the previous monitor in a
|
> Set the active window's view to the active view on the previous monitor in a
|
||||||
multi-monitor environment.
|
multi-monitor environment.
|
||||||
|
|
||||||
`#^+.::Manager_setViewMonitor(+1)`
|
`#^+.::Manager_setViewMonitor(0, +1)`
|
||||||
> Set all windows of the active view on the active view of the next monitor in
|
> Set all windows of the active view on the active view of the next monitor in
|
||||||
a multi-monitor environment.
|
a multi-monitor environment. You may also set all windows of the active view on
|
||||||
|
a specific monitor by using the first parameter, e. g.
|
||||||
|
`Manager_setViewMonitor(1)` will set all windows of the active view on the
|
||||||
|
first monitor.
|
||||||
|
|
||||||
`#^+,::Manager_setViewMonitor(-1)`
|
`#^+,::Manager_setViewMonitor(0, -1)`
|
||||||
> Set all windows of the active view on the active view of the previous monitor
|
> Set all windows of the active view on the active view of the previous monitor
|
||||||
in a multi-monitor environment.
|
in a multi-monitor environment.
|
||||||
|
|
||||||
|
|
|
@ -473,8 +473,8 @@ Config_UI_saveSession() {
|
||||||
#,::Manager_activateMonitor(0, -1)
|
#,::Manager_activateMonitor(0, -1)
|
||||||
#+.::Manager_setWindowMonitor(0, +1)
|
#+.::Manager_setWindowMonitor(0, +1)
|
||||||
#+,::Manager_setWindowMonitor(0, -1)
|
#+,::Manager_setWindowMonitor(0, -1)
|
||||||
#^+.::Manager_setViewMonitor(+1)
|
#^+.::Manager_setViewMonitor(0, +1)
|
||||||
#^+,::Manager_setViewMonitor(-1)
|
#^+,::Manager_setViewMonitor(0, -1)
|
||||||
|
|
||||||
;; GUI management
|
;; GUI management
|
||||||
#+Space::Monitor_toggleBar()
|
#+Space::Monitor_toggleBar()
|
||||||
|
|
|
@ -894,44 +894,39 @@ Manager_serCursor(wndId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Manager_setViewMonitor(d)
|
Manager_setViewMonitor(i, d = 0) {
|
||||||
{
|
Local aView, aWndId, v, wndIds
|
||||||
Local aView, aWndId, m, v, wndIds
|
|
||||||
|
|
||||||
If (Manager_monitorCount > 1)
|
aView := Monitor_#%Manager_aMonitor%_aView_#1
|
||||||
{
|
If (Manager_monitorCount > 1) And View_#%Manager_aMonitor%_#%aView%_wndIds {
|
||||||
m := Manager_loop(Manager_aMonitor, d, 1, Manager_monitorCount)
|
If (i = 0)
|
||||||
v := Monitor_#%m%_aView_#1
|
i := Manager_aMonitor
|
||||||
aView := Monitor_#%Manager_aMonitor%_aView_#1
|
i := Manager_loop(i, d, 1, Manager_monitorCount)
|
||||||
If View_#%Manager_aMonitor%_#%aView%_wndIds
|
v := Monitor_#%i%_aView_#1
|
||||||
|
View_#%i%_#%v%_wndIds := View_#%Manager_aMonitor%_#%aView%_wndIds View_#%i%_#%v%_wndIds
|
||||||
|
|
||||||
|
StringTrimRight, wndIds, View_#%Manager_aMonitor%_#%aView%_wndIds, 1
|
||||||
|
Loop, PARSE, wndIds, `;
|
||||||
{
|
{
|
||||||
View_#%m%_#%v%_wndIds := View_#%Manager_aMonitor%_#%aView%_wndIds View_#%m%_#%v%_wndIds
|
Loop, % Config_viewCount {
|
||||||
|
StringReplace, View_#%Manager_aMonitor%_#%A_Index%_wndIds, View_#%Manager_aMonitor%_#%A_Index%_wndIds, %A_LoopField%`;,
|
||||||
StringTrimRight, wndIds, View_#%Manager_aMonitor%_#%aView%_wndIds, 1
|
View_#%Manager_aMonitor%_#%A_Index%_aWndId := 0
|
||||||
Loop, PARSE, wndIds, `;
|
|
||||||
{
|
|
||||||
Loop, % Config_viewCount
|
|
||||||
{
|
|
||||||
StringReplace, View_#%Manager_aMonitor%_#%A_Index%_wndIds, View_#%Manager_aMonitor%_#%A_Index%_wndIds, %A_LoopField%`;,
|
|
||||||
View_#%Manager_aMonitor%_#%A_Index%_aWndId := 0
|
|
||||||
}
|
|
||||||
|
|
||||||
Monitor_moveWindow(m, A_LoopField)
|
|
||||||
Window_#%A_LoopField%_tags := 1 << v - 1
|
|
||||||
}
|
|
||||||
View_arrange(Manager_aMonitor, aView)
|
|
||||||
Loop, % Config_viewCount
|
|
||||||
{
|
|
||||||
Bar_updateView(Manager_aMonitor, A_Index)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
;; Manually set the active monitor.
|
Monitor_moveWindow(i, A_LoopField)
|
||||||
Manager_aMonitor := m
|
Window_#%A_LoopField%_tags := 1 << v - 1
|
||||||
View_arrange(m, v)
|
|
||||||
WinGet, aWndId, ID, A
|
|
||||||
Manager_winActivate(aWndId)
|
|
||||||
Bar_updateView(m, v)
|
|
||||||
}
|
}
|
||||||
|
View_arrange(Manager_aMonitor, aView)
|
||||||
|
Loop, % Config_viewCount {
|
||||||
|
Bar_updateView(Manager_aMonitor, A_Index)
|
||||||
|
}
|
||||||
|
|
||||||
|
;; Manually set the active monitor.
|
||||||
|
Manager_aMonitor := i
|
||||||
|
View_arrange(i, v)
|
||||||
|
WinGet, aWndId, ID, A
|
||||||
|
Manager_winActivate(aWndId)
|
||||||
|
Bar_updateView(i, v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -961,7 +956,7 @@ Manager_setWindowBorders()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Manager_setWindowMonitor(i, d) {
|
Manager_setWindowMonitor(i, d = 0) {
|
||||||
Local aWndId, v
|
Local aWndId, v
|
||||||
|
|
||||||
WinGet, aWndId, ID, A
|
WinGet, aWndId, ID, A
|
||||||
|
|
Loading…
Reference in New Issue