Reset the text in Default_hotkeys

This is a test showing if the file can be used as source for a cheat
sheet.
This commit is contained in:
joten 2015-07-09 21:59:52 +02:00
parent cecc57791d
commit 685a523c0b
3 changed files with 120 additions and 76 deletions

View File

@ -25,6 +25,7 @@ summarizes these sources (of ideas or code):
#### Code snippets #### Code snippets
* flashkid: [Send SetWorkArea to second Monitor](http://www.autohotkey.com/board/topic/42564-send-setworkarea-to-second-monitor/)
* [franckspike](https://github.com/franckspike): * [franckspike](https://github.com/franckspike):
+ [More general loop function](https://github.com/franckspike/bug.n/commit/e4e615512b363e8c342bf02cf9067cfeb4cc5d57#diff-e42236c27dedd9350fa8c9b9654fd485) + [More general loop function](https://github.com/franckspike/bug.n/commit/e4e615512b363e8c342bf02cf9067cfeb4cc5d57#diff-e42236c27dedd9350fa8c9b9654fd485)
+ [Remote control](https://github.com/franckspike/bug.n/commit/2beacc71aef4d4c46021f97b52ab857efabc871c) + [Remote control](https://github.com/franckspike/bug.n/commit/2beacc71aef4d4c46021f97b52ab857efabc871c)

View File

@ -33,6 +33,7 @@ left 'Windows key' and the 'Control key' and the 'Q key'
`Config_hotkey=#+Enter::View_shuffleWindow(1)` `Config_hotkey=#+Enter::View_shuffleWindow(1)`
> Move the active window to the first position in the window list of the view. > Move the active window to the first position in the window list of the view.
You may also move the active window to any other absolute position in the You may also move the active window to any other absolute position in the
window list by using the first parameter. window list by using the first parameter.
@ -43,11 +44,15 @@ window list by using the first parameter.
> Show / Hide the title bar of the active window. > Show / Hide the title bar of the active window.
`Config_hotkey=#+f::View_toggleFloatingWindow()` `Config_hotkey=#+f::View_toggleFloatingWindow()`
> Toggle the floating status of the active window (i. e. dis- / regard it when > Toggle the floating status of the active window.
tiling).
The floating status effects the tiling of the active window (i. e. dis- /
regard it).
`Config_hotkey=#^m::Manager_minimizeWindow()` `Config_hotkey=#^m::Manager_minimizeWindow()`
> Minimize the active window; this implicitly makes the window floating. > Minimize the active window.
This implicitly makes the window floating.
`Config_hotkey=#+m::Manager_moveWindow()` `Config_hotkey=#+m::Manager_moveWindow()`
> Move the active window by key (only floating windows). > Move the active window by key (only floating windows).
@ -60,11 +65,15 @@ tiling).
windows). windows).
`Config_hotkey=#i::Manager_getWindowInfo()` `Config_hotkey=#i::Manager_getWindowInfo()`
> Get information for the active window (id, title, class, process name, style, > Get information for the active window.
geometry, tags and floating state).
The information being id, title, class, process name, style, geometry, tags and
floating state.
`Config_hotkey=#+i::Manager_getWindowList()` `Config_hotkey=#+i::Manager_getWindowList()`
> Get a window list for the active view (id, title and class). > Get a window list for the active view.
The list contains information about the window id, title and class.
`Config_hotkey=!Down::View_moveWindow(0, +1)` `Config_hotkey=!Down::View_moveWindow(0, +1)`
> Manually move the active window to the next area in the layout. > Manually move the active window to the next area in the layout.
@ -85,8 +94,9 @@ the layout (n = 1..9).
the layout. the layout.
`Config_hotkey=!BackSpace::View_toggleStackArea()` `Config_hotkey=!BackSpace::View_toggleStackArea()`
> Toggle the stack area of the layout. If the stack area is disabled, the > Toggle the stack area of the layout.
master area takes up the whole view.
If the stack area is disabled, the master area takes up the whole view.
### Window debugging ### Window debugging
@ -94,56 +104,63 @@ master area takes up the whole view.
> Dump window information on the windows of the active view to the log. > Dump window information on the windows of the active view to the log.
`Config_hotkey=#+^i::Debug_logManagedWindowList()` `Config_hotkey=#+^i::Debug_logManagedWindowList()`
> Dump window information on the contents of the managed window list (floating > Dump window information on the contents of the managed window list to the log.
and tiled windows of all views) to the log.
The list contains the floating and tiled windows of all views.
`Config_hotkey=#^h::Debug_logHelp()` `Config_hotkey=#^h::Debug_logHelp()`
> Print a description of the formatting (column headings) used in the previous > Print a description of the formatting (column headings) used in the previous
two log messages (`Manager_logViewWindowList` and two log messages to the log.
`Manager_logManagedWindowList`) to the log.
The previous two hotkeys being `Manager_logViewWindowList` and
`Manager_logManagedWindowList`.
`Config_hotkey=#^d::Debug_setLogLevel(0, -1)` `Config_hotkey=#^d::Debug_setLogLevel(0, -1)`
> Decrement the debug log level. Show fewer debug messages. You may also set > Decrement the debug log level.
the debug log level to an absolute value by using the first parameter.
This results in showing fewer debug messages. You may also set the debug log
level to an absolute value by using the first parameter.
`Config_hotkey=#^+d::Debug_setLogLevel(0, +1)` `Config_hotkey=#^+d::Debug_setLogLevel(0, +1)`
> Increment the debug log level. Show more debug messages. You may also set > Increment the debug log level.
the debug log level to an absolute value by using the first parameter.
This results in showing more debug messages. You may also set the debug log
level to an absolute value by using the first parameter.
### Layout management ### Layout management
`Config_hotkey=#Tab::View_setLayout(-1)` `Config_hotkey=#Tab::View_setLayout(-1)`
> Set the previously set layout. You may also use `View_setLayout(0, +1)` for > Set the previously set layout.
setting the next or `View_setLayout(0, -1)` for setting the previous layout in
the layout array. 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.
`Config_hotkey=#f::View_setLayout(3)` `Config_hotkey=#f::View_setLayout(3)`
> Set the 3<sup><small>rd</small></sup> defined layout (i. e. floating layout > Set the floating layout.
in the default configuration).
`Config_hotkey=#m::View_setLayout(2)` `Config_hotkey=#m::View_setLayout(2)`
> Set the 2<sup><small>nd</small></sup> defined layout (i. e. monocle layout in > Set the monocle layout.
the default configuration).
`Config_hotkey=#t::View_setLayout(1)` `Config_hotkey=#t::View_setLayout(1)`
> Set the 1<sup><small>st</small></sup> defined layout (i. e. tile layout in > Set the tile layout.
the default configuration).
`Config_hotkey=#Left::View_setLayoutProperty(MFactor, 0, -0.05)` `Config_hotkey=#Left::View_setLayoutProperty(MFactor, 0, -0.05)`
> Reduce the size of the master area in the active view (only for the "tile" > Reduce the size of the master area in the active view (only for the "tile"
layout). You may also set an additional parameter for accelerating the third layout).
one. E. g. with
`Config_hotkey=#Left::View_setLayoutProperty(MFactor, 0, -0.05, 2)` the first You may also set an additional parameter for accelerating the third one. E. g.
step, by which the master area is reduced, is -0.0016% and will be doubled with with `Config_hotkey=#Left::View_setLayoutProperty(MFactor, 0, -0.05, 2)` the
consecutive calls until it reaches -0.05%. first step, by which the master area is reduced, is -0.0016% and will be
doubled with consecutive calls until it reaches -0.05%.
With the second parameter you may set an absolute value, e. g. With the second parameter you may set an absolute value, e. g.
`View_setLayoutProperty(MFactor, 0.5, 0)` splits the view in half. `View_setLayoutProperty(MFactor, 0.5, 0)` splits the view in half.
`Config_hotkey=#Right::View_setLayoutProperty(MFactor, 0, +0.05)` `Config_hotkey=#Right::View_setLayoutProperty(MFactor, 0, +0.05)`
> Enlarge the size of the master area in the active view (only for the "tile" > Enlarge the size of the master area in the active view (only for the "tile"
layout). You may also set a additional parameter for accelerating the third layout).
one. E. g. with
`Config_hotkey=#Right::View_setLayoutProperty(MFactor, 0, +0.05, 0.5)` the You may also set a additional parameter for accelerating the third one. E. g.
with `Config_hotkey=#Right::View_setLayoutProperty(MFactor, 0, +0.05, 0.5)` the
first step, by which the master area is reduced, is 0.05%, but with consecutive first step, by which the master area is reduced, is 0.05%, but with consecutive
calls it will be halved until it reaches 0.0016%. calls it will be halved until it reaches 0.0016%.
With the second parameter you may set an absolute value, e. g. With the second parameter you may set an absolute value, e. g.
@ -151,42 +168,58 @@ With the second parameter you may set an absolute value, e. g.
and the stacking area one third the size of the view. and the stacking area one third the size of the view.
`Config_hotkey=#^t::View_setLayoutProperty(Axis, 0, +1, 1)` `Config_hotkey=#^t::View_setLayoutProperty(Axis, 0, +1, 1)`
> Rotate the layout axis (i. e. 2 -> 1 = vertical layout, 1 -> 2 = horizontal > Rotate the layout axis (only for the "tile" layout).
layout, only for the "tile" layout).
I. e. 2 -> 1 = vertical layout, 1 -> 2 = horizontal layout.
`Config_hotkey=#^Enter::View_setLayoutProperty(Axis, 0, +2, 1)` `Config_hotkey=#^Enter::View_setLayoutProperty(Axis, 0, +2, 1)`
> Mirror the layout axis (i. e. -1 -> 1 / 1 -> -1 = master on the left / right > Mirror the layout axis (only for the "tile" layout).
side, -2 -> 2 / 2 -> -2 = master at top / bottom, only for the "tile" layout).
I. e. -1 -> 1 / 1 -> -1 = master on the left / right side,
-2 -> 2 / 2 -> -2 = master at top / bottom.
`Config_hotkey=#^Tab::View_setLayoutProperty(Axis, 0, +1, 2)` `Config_hotkey=#^Tab::View_setLayoutProperty(Axis, 0, +1, 2)`
> Rotate the master axis (i. e. 3 -> 1 = x-axis = horizontal stack, 1 -> 2 = > Rotate the master axis (only for the "tile" layout).
y-axis = vertical stack, 2 -> 3 = z-axis = monocle, only for the "tile" layout).
I. e. 3 -> 1 = x-axis = horizontal stack, 1 -> 2 = y-axis = vertical stack,
2 -> 3 = z-axis = monocle.
`Config_hotkey=#^+Tab::View_setLayoutProperty(Axis, 0, +1, 3)` `Config_hotkey=#^+Tab::View_setLayoutProperty(Axis, 0, +1, 3)`
> Rotate the stack axis (i. e. 3 -> 1 = x-axis = horizontal stack, 1 -> 2 = > Rotate the stack axis (only for the "tile" layout).
y-axis = vertical stack, 2 -> 3 = z-axis = monocle, only for the "tile" layout).
I. e. 3 -> 1 = x-axis = horizontal stack, 1 -> 2 = y-axis = vertical stack,
2 -> 3 = z-axis = monocle.
`Config_hotkey=#^Up::View_setLayoutProperty(MY, 0, +1)` `Config_hotkey=#^Up::View_setLayoutProperty(MY, 0, +1)`
> Increase the master Y dimension by 1, i.e. increase the number of windows in > Increase the master Y dimension by 1 (only for the "tile" layout).
the master area by X. Maximum of 9 (only for the "tile" layout).
This results in an increased number of windows in the master area by X.
Maximum of 9.
`Config_hotkey=#^Down::View_setLayoutProperty(MY, 0, -1)` `Config_hotkey=#^Down::View_setLayoutProperty(MY, 0, -1)`
> Decrease the master Y dimension by 1, i.e. decrease the number of windows in > Decrease the master Y dimension by 1 (only for the "tile" layout).
the master area by X. Minimum of 1 (only for the "tile" layout).
This results in a decreased number of windows in the master area by X.
Minimum of 1.
`Config_hotkey=#^Right::View_setLayoutProperty(MX, 0, +1)` `Config_hotkey=#^Right::View_setLayoutProperty(MX, 0, +1)`
> Increase the master X dimension by 1, i. e. increase the number of windows in > Increase the master X dimension by 1 (only for the "tile" layout).
the master area by Y. Maximum of 9 (only for the "tile" layout).
This results in an increased number of windows in the master area by Y.
Maximum of 9.
`Config_hotkey=#^Left::View_setLayoutProperty(MX, 0, +1)` `Config_hotkey=#^Left::View_setLayoutProperty(MX, 0, +1)`
> Decrease the master X dimension by 1, i. e. decrease the number of windows in > Decrease the master X dimension by 1 (only for the "tile" layout).
the master area by Y. Minimum of 1 (only for the "tile" layout).
This results in a decreased number of windows in the master area by Y.
Minimum of 1.
`Config_hotkey=#+Left::View_setLayoutProperty(GapWidth, 0, -2)` `Config_hotkey=#+Left::View_setLayoutProperty(GapWidth, 0, -2)`
> Decrease the gap between windows in "monocle" and "tile" layout. You may also > Decrease the gap between windows in "monocle" and "tile" layout.
set an absolute value for the gap width by using the first parameter, e. g.
`View_setLayoutProperty(GapWidth, 0, 0)` will eliminate the gap and You may also set an absolute value for the gap width by using the first
`View_setLayoutProperty(GapWidth, 20, 0)` will set it to 20px. parameter, e. g. `View_setLayoutProperty(GapWidth, 0, 0)` will eliminate the
gap and `View_setLayoutProperty(GapWidth, 20, 0)` will set it to 20px.
`Config_hotkey=#+Right::View_setLayoutProperty(GapWidth, 0, +2)` `Config_hotkey=#+Right::View_setLayoutProperty(GapWidth, 0, +2)`
> Increase the gap between windows in "monocle" and "tile" layout. > Increase the gap between windows in "monocle" and "tile" layout.
@ -194,18 +227,21 @@ set an absolute value for the gap width by using the first parameter, e. g.
### View / Tag management ### View / Tag management
`Config_hotkey=#+n::View_toggleMargins()` `Config_hotkey=#+n::View_toggleMargins()`
> Toggle the view margins, which are set by the configuration variable > Toggle the view margins.
`Config_viewMargins`.
These are set by the configuration variable `Config_viewMargins`.
`Config_hotkey=#BackSpace::Monitor_activateView(-1)` `Config_hotkey=#BackSpace::Monitor_activateView(-1)`
> Activate the previously activated view. You may also use > Activate the previously activated view.
`Monitor_activateView(0, -1)` or `Monitor_activateView(0, +1)` for activating
the previous or next adjacent view. You may also use `Monitor_activateView(0, -1)` or `Monitor_activateView(0, +1)`
for activating the previous or next adjacent view.
`Config_hotkey=#+0::Monitor_setWindowTag(10)` `Config_hotkey=#+0::Monitor_setWindowTag(10)`
> Tag the active window with all tags (n = 1..`Config_viewCount`). You may also > Tag the active window with all tags (n = 1..`Config_viewCount`).
use `Monitor_setWindowTag(0, -1)` or `Monitor_setWindowTag(0, +1)` for setting
the tag of the previous or next adjacent to the current view. You may also use `Monitor_setWindowTag(0, -1)` or `Monitor_setWindowTag(0, +1)`
for setting the tag of the previous or next adjacent to the current view.
`Config_hotkey=#<n>::Monitor_activateView(<n>)` `Config_hotkey=#<n>::Monitor_activateView(<n>)`
> Activate the n<sup><small>th</small></sup> view (n = 1..`Config_viewCount`). > Activate the n<sup><small>th</small></sup> view (n = 1..`Config_viewCount`).
@ -221,8 +257,9 @@ for the active window, if it is not / is already set.
### Monitor management ### Monitor management
`Config_hotkey=#.::Manager_activateMonitor(0, +1)` `Config_hotkey=#.::Manager_activateMonitor(0, +1)`
> Activate the next monitor in a multi-monitor environment. You may also > Activate the next monitor in a multi-monitor environment.
activate a specific monitor by using the first parameter, e. g.
You may also activate a specific monitor by using the first parameter, e. g.
`Manager_activateMonitor(1)` will activate the first monitor. `Manager_activateMonitor(1)` will activate the first monitor.
`Config_hotkey=#,::Manager_activateMonitor(0, -1)` `Config_hotkey=#,::Manager_activateMonitor(0, -1)`
@ -230,9 +267,11 @@ activate a specific monitor by using the first parameter, e. g.
`Config_hotkey=#+.::Manager_setWindowMonitor(0, +1)` `Config_hotkey=#+.::Manager_setWindowMonitor(0, +1)`
> Set the active window's view to the active view on the next monitor in a > Set the active window's view to the active view on the next monitor in a
multi-monitor environment. You may also set the active window on a specific multi-monitor environment.
monitor by using the first parameter, e. g. `Manager_setWindowMonitor(1)` will
set the active window on the first monitor. You may also set the active window on a specific monitor by using the first
parameter, e. g. `Manager_setWindowMonitor(1)` will set the active window on
the first monitor.
`Config_hotkey=#+,::Manager_setWindowMonitor(0, -1)` `Config_hotkey=#+,::Manager_setWindowMonitor(0, -1)`
> 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
@ -240,10 +279,11 @@ multi-monitor environment.
`Config_hotkey=#^+.::Manager_setViewMonitor(0, +1)` `Config_hotkey=#^+.::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. You may also set all windows of the active view on a multi-monitor environment.
a specific monitor by using the first parameter, e. g.
`Manager_setViewMonitor(1)` will set all windows of the active view on the You may also set all windows of the active view on a specific monitor by using
first monitor. the first parameter, e. g. `Manager_setViewMonitor(1)` will set all windows of
the active view on the first monitor.
`Config_hotkey=#^+,::Manager_setViewMonitor(0, -1)` `Config_hotkey=#^+,::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
@ -269,17 +309,19 @@ in a multi-monitor environment.
### Administration ### Administration
`Config_hotkey=#^e::Run, edit <Config_filePath>` `Config_hotkey=#^e::Run, edit <Config_filePath>`
> Open the configuration file in the standard text editor. If you want to set > Open the configuration file in the standard text editor.
this hotkey in `Config.ini`, you have to replace `<Config_filePath>` with an
explicit file path. If you want to set this hotkey in `Config.ini`, you have to replace
`<Config_filePath>` with an explicit file path.
`Config_hotkey=#^s::Config_UI_saveSession()` `Config_hotkey=#^s::Config_UI_saveSession()`
> Save the current state of monitors, views, layouts to the configuration file. > Save the current state of monitors, views, layouts to the configuration file.
`Config_hotkey=#^r::Reload` `Config_hotkey=#^r::Reload`
> Reload bug.n (i. e. the whole script), which resets i. a. the configuration > Reload bug.n (i. e. the whole script).
and internal variables of bug.n, including the window lists. It is like
Quitting and restarting bug.n. This resets i. a. the configuration and internal variables of bug.n, including
the window lists. It is like Quitting and restarting bug.n.
If `Config_autoSaveSession` is not set to `off`, the window lists can be If `Config_autoSaveSession` is not set to `off`, the window lists can be
restored and windows are put to their associated monitor and views. restored and windows are put to their associated monitor and views.

View File

@ -259,6 +259,7 @@ Monitor_setWorkArea(left, top, right, bottom) {
NumPut(bottom, area, 12) NumPut(bottom, area, 12)
DllCall("SystemParametersInfo", UInt, 0x2F, UInt, 0, UInt, &area, UInt, 0) ; 0x2F = SPI_SETWORKAREA DllCall("SystemParametersInfo", UInt, 0x2F, UInt, 0, UInt, &area, UInt, 0) ; 0x2F = SPI_SETWORKAREA
} }
;; flashkid: Send SetWorkArea to second Monitor (http://www.autohotkey.com/board/topic/42564-send-setworkarea-to-second-monitor/)
Monitor_toggleBar() Monitor_toggleBar()
{ {