Added a function for forcing a window to be managed.
This commit is contained in:
parent
bb29655701
commit
7e190a0076
10 changed files with 47 additions and 18 deletions
|
@ -25,6 +25,7 @@ called with the window ID as a paramater, when applying the rule.
|
|||
10. `~` Removed the function `Main_reload` and reassigned the hotkey.
|
||||
11. `+` Added the possibility to minimize windows, making them floating and thereby excluded from tiling.
|
||||
12. `+` Added configuration variables for customizing the date and time format shown in the status bar.
|
||||
13. `+` Added a function to force the active window to be managed despite any rule in `Config.ini`.
|
||||
|
||||
| # | `-` or `~` Configuration Variables or <br/> `-` Hotkey Functions | `+` Configuration Variables or <br/> `+` Hotkey Functions |
|
||||
| ---:| ---------------------------------------------------------------- | --------------------------------------------------------- |
|
||||
|
@ -87,6 +88,7 @@ called with the window ID as a paramater, when applying the rule.
|
|||
| 11. | | `#^m::Manager_minimizeWindow()` |
|
||||
| 12. | | `Config_readinDateFormat` |
|
||||
| | | `Config_readinTimeFormat` |
|
||||
| 13. | | `#^+m::Manager_forceManaged()` |
|
||||
|
||||
### 8.4.0
|
||||
|
||||
|
|
|
@ -32,6 +32,9 @@ _Minimize_ the active window.
|
|||
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>m</kbd>
|
||||
_Move_ the active window _by key_.
|
||||
|
||||
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>m</kbd>
|
||||
_Force_ the active window to be _managed_.
|
||||
|
||||
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>s</kbd>
|
||||
_Resize_ the active window _by key_.
|
||||
|
||||
|
@ -84,7 +87,7 @@ Increment the debug log level.
|
|||
### Layout management
|
||||
|
||||
#### <kbd>Win</kbd><kbd>Tab</kbd>
|
||||
Set the _previous_ly set _layout_.
|
||||
Set the _previous_-ly set _layout_.
|
||||
|
||||
#### <kbd>Win</kbd><kbd>f</kbd>
|
||||
Set the _floating layout_.
|
||||
|
|
|
@ -54,6 +54,10 @@
|
|||
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>m</kbd></h4>
|
||||
<p><em>Move</em> the active window <em>by key</em>.</p>
|
||||
</div>
|
||||
<div id="winctrlshiftm" class="section level4">
|
||||
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>m</kbd></h4>
|
||||
<p><em>Force</em> the active window to be <em>managed</em>.</p>
|
||||
</div>
|
||||
<div id="winshifts" class="section level4">
|
||||
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>s</kbd></h4>
|
||||
<p><em>Resize</em> the active window <em>by key</em>.</p>
|
||||
|
@ -122,7 +126,7 @@
|
|||
<h3>Layout management</h3>
|
||||
<div id="wintab" class="section level4">
|
||||
<h4><kbd>Win</kbd><kbd>Tab</kbd></h4>
|
||||
<p>Set the <em>previous</em>ly set <em>layout</em>.</p>
|
||||
<p>Set the <em>previous</em>-ly set <em>layout</em>.</p>
|
||||
</div>
|
||||
<div id="winf" class="section level4">
|
||||
<h4><kbd>Win</kbd><kbd>f</kbd></h4>
|
||||
|
|
Binary file not shown.
|
@ -59,6 +59,19 @@ This implicitly sets the window to be floating.
|
|||
|
||||
This implicitly sets the window to be floating.
|
||||
|
||||
`Config_hotkey=#^+m::Manager_forceManaged()`
|
||||
> _Force_ the active window to be _managed_.
|
||||
|
||||
This function is EXPERIMENTAL, which does not mean that it is in an
|
||||
alpha-development stage, but you should know what you do, if using this hotkey.
|
||||
|
||||
It forces the flag "is managed" to be true (1) despite any rule in
|
||||
`Config.ini`. If set improperly, a window, which is not a regular application
|
||||
window, may only be reset by logging out from and back in to Windows.
|
||||
|
||||
You may also want to use `#+f::View_toggleFloatingWindow()` to see the full
|
||||
effect.
|
||||
|
||||
`Config_hotkey=#+s::Manager_sizeWindow()`
|
||||
> _Resize_ the active window _by key_.
|
||||
|
||||
|
@ -151,7 +164,7 @@ level to an absolute value by using the first parameter.
|
|||
### Layout management
|
||||
|
||||
`Config_hotkey=#Tab::View_setLayout(-1)`
|
||||
> Set the _previous_ly set _layout_.
|
||||
> Set the _previous_-ly set _layout_.
|
||||
|
||||
You may also use `View_setLayout(0, +1)` for setting the next or
|
||||
`View_setLayout(0, -1)` for setting the previous layout in the layout array.
|
||||
|
|
|
@ -31,7 +31,7 @@ There are not many special character keys, which are on both keyboards, US and D
|
|||
| f | x | x | | | | |
|
||||
| h | | | x | | | |
|
||||
| i | x | x | x | x | | |
|
||||
| m | x | x | x | | | |
|
||||
| m | x | x | x | x | | |
|
||||
| n | | x | | | | |
|
||||
| q | | | x | | | |
|
||||
| r | | | x | | | |
|
||||
|
|
|
@ -406,6 +406,7 @@ Config_UI_saveSession() {
|
|||
#+f::View_toggleFloatingWindow()
|
||||
#+m::Manager_moveWindow()
|
||||
#^m::Manager_minimizeWindow()
|
||||
#^+m::Manager_forceManaged()
|
||||
#+s::Manager_sizeWindow()
|
||||
#+x::Manager_maximizeWindow()
|
||||
#i::Manager_getWindowInfo()
|
||||
|
|
|
@ -191,6 +191,16 @@ Manager_doMaintenance:
|
|||
Manager_saveState()
|
||||
Return
|
||||
|
||||
Manager_forceManaged() {
|
||||
Local aWndId
|
||||
|
||||
WinGet, aWndId, ID, A
|
||||
Manager_manage(Manager_aMonitor, Monitor_#%Manager_aMonitor%_aView_#1, aWndId, True)
|
||||
If Config_dynamicTiling
|
||||
View_arrange(Manager_aMonitor, Monitor_#%Manager_aMonitor%_aView_#1)
|
||||
Bar_updateView(Manager_aMonitor, Monitor_#%Manager_aMonitor%_aView_#1)
|
||||
}
|
||||
|
||||
Manager_getWindowInfo()
|
||||
{
|
||||
Local aWndClass, aWndHeight, aWndId, aWndMinMax, aWndPId, aWndPName, aWndStyle, aWndTitle, aWndWidth, aWndX, aWndY, rule, text, v
|
||||
|
@ -319,22 +329,19 @@ Manager__setWinProperties(wndId, isManaged, m, tags, isDecorated, isFloating, hi
|
|||
|
||||
;; Accept a window to be added to the system for management.
|
||||
;; Provide a monitor and view preference, but don't override the config.
|
||||
Manager_manage(preferredMonitor, preferredView, wndId)
|
||||
{
|
||||
Manager_manage(preferredMonitor, preferredView, wndId, force = False) {
|
||||
Local a, action, c0, hideTitle, i, isDecorated, isFloating, isManaged, l, m, n, replace, search, tags, body
|
||||
Local wndControlList0, wndId0, wndIds, wndX, wndY, wndWidth, wndHeight
|
||||
|
||||
;; Manage any window only once.
|
||||
If InStr(Manager_allWndIds, wndId ";")
|
||||
If InStr(Manager_allWndIds, wndId ";") And Not force
|
||||
Return
|
||||
|
||||
body := 0
|
||||
If Window_isGhost(wndId)
|
||||
{
|
||||
If Window_isGhost(wndId) {
|
||||
Debug_logMessage("DEBUG[2] A window has given up the ghost (Ghost wndId: " . wndId . ")", 2)
|
||||
body := Window_findHung(wndId)
|
||||
If body
|
||||
{
|
||||
If body {
|
||||
isManaged := InStr(Manager_managedWndIds, body ";")
|
||||
m := Window_#%body%_monitor
|
||||
tags := Window_#%body%_tags
|
||||
|
@ -342,17 +349,14 @@ Manager_manage(preferredMonitor, preferredView, wndId)
|
|||
isFloating := Window_#%body%_isFloating
|
||||
hideTitle := InStr(Bar_hideTitleWndIds, body ";")
|
||||
action := ""
|
||||
}
|
||||
Else
|
||||
{
|
||||
} Else
|
||||
Debug_logMessage("DEBUG[1] No body could be found for ghost wndId: " . wndId, 1)
|
||||
}
|
||||
}
|
||||
|
||||
;; Apply rules if the window is either a normal window or a ghost without a body.
|
||||
If (body = 0)
|
||||
{
|
||||
If (body = 0) {
|
||||
Manager_applyRules(wndId, isManaged, m, tags, isFloating, isDecorated, hideTitle, action)
|
||||
isManaged := isManaged Or force
|
||||
If (m = 0)
|
||||
m := preferredMonitor
|
||||
If (m < 0)
|
||||
|
@ -363,7 +367,7 @@ Manager_manage(preferredMonitor, preferredView, wndId)
|
|||
tags := 1 << (preferredView - 1)
|
||||
}
|
||||
|
||||
a := Manager__setWinProperties( wndId, isManaged, m, tags, isDecorated, isFloating, hideTitle, action)
|
||||
a := Manager__setWinProperties(wndId, isManaged, m, tags, isDecorated, isFloating, hideTitle, action)
|
||||
|
||||
; Do view placement.
|
||||
If isManaged {
|
||||
|
|
|
@ -101,6 +101,7 @@
|
|||
;Config_hotkey=#+d::Window_toggleDecor()
|
||||
;Config_hotkey=#+f::View_toggleFloatingWindow()
|
||||
;Config_hotkey=#+m::Manager_moveWindow()
|
||||
;Config_hotkey=#^+m::Manager_forceManaged()
|
||||
;Config_hotkey=#+s::Manager_sizeWindow()
|
||||
;Config_hotkey=#+x::Manager_maximizeWindow()
|
||||
;Config_hotkey=#i::Manager_getWindowInfo()
|
||||
|
|
|
@ -109,6 +109,7 @@ Config_hotkey=#k::Manager_closeWindow()
|
|||
;Config_hotkey=#+d::Window_toggleDecor()
|
||||
;Config_hotkey=#+f::View_toggleFloatingWindow()
|
||||
;Config_hotkey=#+m::Manager_moveWindow()
|
||||
;Config_hotkey=#^+m::Manager_forceManaged()
|
||||
;Config_hotkey=#+s::Manager_sizeWindow()
|
||||
;Config_hotkey=#+x::Manager_maximizeWindow()
|
||||
Config_hotkey=#i::
|
||||
|
|
Loading…
Reference in a new issue