This commit is contained in:
joten 2019-04-07 21:13:09 +02:00
commit 03b1348214
18 changed files with 599 additions and 62 deletions

BIN
bugn.exe Normal file

Binary file not shown.

View file

@ -9,10 +9,13 @@
### 9.0.2 ### 9.0.2
1. `+` Added a function and corresponding hotkey to reset the tile layout of the current view. 1. `+` Added a function and corresponding hotkey to reset the tile layout of the current view.
2. `~` Enhanced the function `View_activateWindow` with the possibility to use absolute values.
3. `~` Added more options for the configuration variable `Config_monitorDisplayChangeMessages`.
| # | `-` or `~` Configuration Variables or <br/> `-` Hotkey Functions | `+` Configuration Variables or <br/> `+` Hotkey Functions | | # | `-` or `~` Configuration Variables or <br/> `-` Hotkey Functions | `+` Configuration Variables or <br/> `+` Hotkey Functions |
| --:| ---------------------------------------------------------------- | --------------------------------------------------------- | | --:| ---------------------------------------------------------------- | --------------------------------------------------------- |
| 1. | | `#^Backspace::View_resetTileLayout()` | | 1. | | `#^Backspace::View_resetTileLayout()` |
| 3. | `Config_monitorDisplayChangeMessages` | |
### 9.0.1 ### 9.0.1

View file

@ -0,0 +1,294 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>cheat_sheet</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<link rel="stylesheet" href="reset.css" />
<link rel="stylesheet" href="cheat_sheet.css" />
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<section id="bug.n-9.0.2-default-hotkeys" class="level2">
<h2>bug.n 9.0.2 default hotkeys</h2>
<section id="window-management" class="level3">
<h3>Window management</h3>
<section id="windown" class="level4">
<h4><kbd>Win</kbd><kbd>Down</kbd></h4>
<p><em>Activate</em> the <em>next</em> window in the active view.</p>
</section>
<section id="winup" class="level4">
<h4><kbd>Win</kbd><kbd>Up</kbd></h4>
<p><em>Activate</em> the <em>previous</em> window in the active view.</p>
</section>
<section id="winshiftdown" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>Down</kbd></h4>
<p><em>Move</em> the active window <em>to the next position</em> in the window list of the view.</p>
</section>
<section id="winshiftup" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>Up</kbd></h4>
<p><em>Move</em> the active window <em>to the previous position</em> in the window list of the view.</p>
</section>
<section id="winshiftenter" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>Enter</kbd></h4>
<p><em>Move</em> the active window <em>to the first position</em> in the window list of the view.</p>
</section>
<section id="winc" class="level4">
<h4><kbd>Win</kbd><kbd>c</kbd></h4>
<p><em>Close</em> the active window.</p>
</section>
<section id="winshiftd" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>d</kbd></h4>
<p><em>Show / Hide the title bar</em> of the active window.</p>
</section>
<section id="winshiftf" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>f</kbd></h4>
<p><em>Toggle</em> the <em>floating status</em> of the active window.</p>
</section>
<section id="winctrlm" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>m</kbd></h4>
<p><em>Minimize</em> the active window.</p>
</section>
<section id="winshiftm" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>m</kbd></h4>
<p><em>Move</em> the active window <em>by key</em>.</p>
</section>
<section id="winshifts" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>s</kbd></h4>
<p><em>Resize</em> the active window <em>by key</em>.</p>
</section>
<section id="winshiftx" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>x</kbd></h4>
<p><em>Move and resize</em> the active window <em>to</em> the size of the <em>work area</em>.</p>
</section>
<section id="wini" class="level4">
<h4><kbd>Win</kbd><kbd>i</kbd></h4>
<p>Get information for the active window.</p>
</section>
<section id="winshifti" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>i</kbd></h4>
<p><em>Get a window list</em> for the active view.</p>
</section>
<section id="altdown" class="level4">
<h4><kbd>Alt</kbd><kbd>Down</kbd></h4>
<p>Manually <em>move</em> the active window <em>to the next area</em> in the layout.</p>
</section>
<section id="altup" class="level4">
<h4><kbd>Alt</kbd><kbd>Up</kbd></h4>
<p>Manually <em>move</em> the active window <em>to the previous area</em> in the layout.</p>
</section>
<section id="altshiftenter" class="level4">
<h4><kbd>Alt</kbd><kbd>Shift</kbd><kbd>Enter</kbd></h4>
<p><em>Move and resize</em> the active window <em>to</em> the size of the <em>work area</em>.</p>
</section>
<section id="altn" class="level4">
<h4><kbd>Alt</kbd><kbd>&lt;n&gt;</kbd></h4>
<p>Manually <em>move</em> the active window <em>to the n<sup><small>th</small></sup> area</em> in the layout.</p>
</section>
<section id="altbackspace" class="level4">
<h4><kbd>Alt</kbd><kbd>BackSpace</kbd></h4>
<p>Toggle the stack area of the layout.</p>
</section>
</section>
<section id="window-debugging" class="level3">
<h3>Window debugging</h3>
<section id="winctrli" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>i</kbd></h4>
<p><em>Dump</em> window information on the <em>windows of the active view</em> to the log.</p>
</section>
<section id="winctrlshifti" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>i</kbd></h4>
<p><em>Dump</em> window information on the <em>managed windows</em> to the log.</p>
</section>
<section id="winctrlh" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>h</kbd></h4>
<p><em>Print column headings</em> to the log.</p>
</section>
<section id="winctrld" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>d</kbd></h4>
<p>Decrement the debug log level.</p>
</section>
<section id="winctrlshiftd" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>d</kbd></h4>
<p>Increment the debug log level.</p>
</section>
</section>
<section id="layout-management" class="level3">
<h3>Layout management</h3>
<section id="wintab" class="level4">
<h4><kbd>Win</kbd><kbd>Tab</kbd></h4>
<p>Set the <em>previous</em>-ly set <em>layout</em>.</p>
</section>
<section id="winf" class="level4">
<h4><kbd>Win</kbd><kbd>f</kbd></h4>
<p>Set the <em>floating layout</em>.</p>
</section>
<section id="winm" class="level4">
<h4><kbd>Win</kbd><kbd>m</kbd></h4>
<p>Set the <em>monocle layout</em>.</p>
</section>
<section id="wint" class="level4">
<h4><kbd>Win</kbd><kbd>t</kbd></h4>
<p>Set the <em>tile layout</em>.</p>
</section>
<section id="winleft" class="level4">
<h4><kbd>Win</kbd><kbd>Left</kbd></h4>
<p><em>Reduce</em> the size of <em>the master area</em> in the active view.</p>
</section>
<section id="winright" class="level4">
<h4><kbd>Win</kbd><kbd>Right</kbd></h4>
<p><em>Enlarge</em> the size of <em>the master area</em> in the active view.</p>
</section>
<section id="winctrlt" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>t</kbd></h4>
<p>Rotate the layout axis.</p>
</section>
<section id="winctrlenter" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Enter</kbd></h4>
<p>Mirror the layout axis.</p>
</section>
<section id="winctrltab" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Tab</kbd></h4>
<p>Rotate the master axis.</p>
</section>
<section id="winctrlshifttab" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>Tab</kbd></h4>
<p>Rotate the stack axis.</p>
</section>
<section id="winctrlup" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Up</kbd></h4>
<p>Increase the master Y dimension.</p>
</section>
<section id="winctrldown" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Down</kbd></h4>
<p>Decrease the master Y dimension.</p>
</section>
<section id="winctrlright" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Right</kbd></h4>
<p>Increase the master X dimension.</p>
</section>
<section id="winctrlleft" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Left</kbd></h4>
<p>Decrease the master X dimension.</p>
</section>
<section id="winshiftleft" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>Left</kbd></h4>
<p><em>Decrease the gap between windows</em> in “monocle” and “tile” layout.</p>
</section>
<section id="winshiftright" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>Right</kbd></h4>
<p><em>Increase the gap between windows</em> in “monocle” and “tile” layout.</p>
</section>
<section id="winctrlbackspace" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Backspace</kbd></h4>
<p><em>Reset the tile layout</em>.</p>
</section>
</section>
<section id="view-tag-management" class="level3">
<h3>View / Tag management</h3>
<section id="winshiftn" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>n</kbd></h4>
<p>Toggle the view margins.</p>
</section>
<section id="winbackspace" class="level4">
<h4><kbd>Win</kbd><kbd>BackSpace</kbd></h4>
<p>Activate the previously activated view.</p>
</section>
<section id="winshift0" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>0</kbd></h4>
<p>Tag the active window with all tags.</p>
</section>
<section id="winn" class="level4">
<h4><kbd>Win</kbd><kbd>&lt;n&gt;</kbd></h4>
<p>Activate the n<sup><small>th</small></sup> view.</p>
</section>
<section id="winshiftn-1" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>&lt;n&gt;</kbd></h4>
<p>Tag the active window with the n<sup><small>th</small></sup> tag.</p>
</section>
<section id="winctrln" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>&lt;n&gt;</kbd></h4>
<p>Add / Remove the n<sup><small>th</small></sup> tag for the active window, if it is not / is already set.</p>
</section>
</section>
<section id="monitor-management" class="level3">
<h3>Monitor management</h3>
<section id="win." class="level4">
<h4><kbd>Win</kbd><kbd>.</kbd></h4>
<p>Activate the <em>next monitor</em> in a multi-monitor environment.</p>
</section>
<section id="win" class="level4">
<h4><kbd>Win</kbd><kbd>,</kbd></h4>
<p>Activate the <em>previous monitor</em> in a multi-monitor environment.</p>
</section>
<section id="winshift." class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>.</kbd></h4>
<p><em>Set</em> the active windows view <em>to</em> the active view on <em>the next monitor</em> in a multi-monitor environment.</p>
</section>
<section id="winshift" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>,</kbd></h4>
<p><em>Set</em> the active windows view <em>to</em> the active view on <em>the previous monitor</em> in a multi-monitor environment.</p>
</section>
<section id="winctrlshift." class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>.</kbd></h4>
<p><em>Set all windows</em> of the active view <em>on</em> the active view of <em>the next monitor</em> in a multi-monitor environment.</p>
</section>
<section id="winctrlshift" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>,</kbd></h4>
<p><em>Set all windows</em> of the active view <em>on</em> the active view of <em>the previous monitor</em> in a multi-monitor environment.</p>
</section>
</section>
<section id="gui-management" class="level3">
<h3>GUI management</h3>
<section id="winshiftspace" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>Space</kbd></h4>
<p><em>Hide / Show the bar</em> (bug.n status bar) on the active monitor.</p>
</section>
<section id="winspace" class="level4">
<h4><kbd>Win</kbd><kbd>Space</kbd></h4>
<p>Hide / Show the task bar.</p>
</section>
<section id="winy" class="level4">
<h4><kbd>Win</kbd><kbd>y</kbd></h4>
<p><em>Open the command GUI</em> for executing programmes or bug.n functions.</p>
</section>
<section id="winshifty" class="level4">
<h4><kbd>Win</kbd><kbd>Shift</kbd><kbd>y</kbd></h4>
<p>Toggle the overflow window of the notify icons.</p>
</section>
<section id="altshifty" class="level4">
<h4><kbd>Alt</kbd><kbd>Shift</kbd><kbd>y</kbd></h4>
<p>Indicate the areas of the “tile” layout.</p>
</section>
</section>
<section id="administration" class="level3">
<h3>Administration</h3>
<section id="winctrle" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>e</kbd></h4>
<p>Open the configuration file in the standard text editor.</p>
</section>
<section id="winctrls" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>s</kbd></h4>
<p><em>Save the current state</em> of monitors, views, layouts to the configuration file.</p>
</section>
<section id="winctrlr" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>r</kbd></h4>
<p><em>Reload</em> bug.n (i.e. the whole script).</p>
</section>
<section id="winctrlq" class="level4">
<h4><kbd>Win</kbd><kbd>Ctrl</kbd><kbd>q</kbd></h4>
<p><em>Quit</em> bug.n, restore the default Windows UI and show all windows.</p>
</section>
</section>
</section>
</body>
</html>

View file

@ -0,0 +1,209 @@
## bug.n 9.0.2 default hotkeys
### Window management
#### <kbd>Win</kbd><kbd>Down</kbd>
_Activate_ the _next_ window in the active view.
#### <kbd>Win</kbd><kbd>Up</kbd>
_Activate_ the _previous_ window in the active view.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>Down</kbd>
_Move_ the active window _to the next position_ in the window list of the view.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>Up</kbd>
_Move_ the active window _to the previous position_ in the window list of the
view.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>Enter</kbd>
_Move_ the active window _to the first position_ in the window list of the
view.
#### <kbd>Win</kbd><kbd>c</kbd>
_Close_ the active window.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>d</kbd>
_Show / Hide the title bar_ of the active window.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>f</kbd>
_Toggle_ the _floating status_ of the active window.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>m</kbd>
_Minimize_ the active window.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>m</kbd>
_Move_ the active window _by key_.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>s</kbd>
_Resize_ the active window _by key_.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>x</kbd>
_Move and resize_ the active window _to_ the size of the _work area_.
#### <kbd>Win</kbd><kbd>i</kbd>
Get information for the active window.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>i</kbd>
_Get a window list_ for the active view.
#### <kbd>Alt</kbd><kbd>Down</kbd>
Manually _move_ the active window _to the next area_ in the layout.
#### <kbd>Alt</kbd><kbd>Up</kbd>
Manually _move_ the active window _to the previous area_ in the layout.
#### <kbd>Alt</kbd><kbd>Shift</kbd><kbd>Enter</kbd>
_Move and resize_ the active window _to_ the size of the _work area_.
#### <kbd>Alt</kbd><kbd>&lt;n&gt;</kbd>
Manually _move_ the active window _to the n<sup><small>th</small></sup> area_
in the layout.
#### <kbd>Alt</kbd><kbd>BackSpace</kbd>
Toggle the stack area of the layout.
### Window debugging
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>i</kbd>
_Dump_ window information on the _windows of the active view_ to the log.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>i</kbd>
_Dump_ window information on the _managed windows_ to the log.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>h</kbd>
_Print column headings_ to the log.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>d</kbd>
Decrement the debug log level.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>d</kbd>
Increment the debug log level.
### Layout management
#### <kbd>Win</kbd><kbd>Tab</kbd>
Set the _previous_-ly set _layout_.
#### <kbd>Win</kbd><kbd>f</kbd>
Set the _floating layout_.
#### <kbd>Win</kbd><kbd>m</kbd>
Set the _monocle layout_.
#### <kbd>Win</kbd><kbd>t</kbd>
Set the _tile layout_.
#### <kbd>Win</kbd><kbd>Left</kbd>
_Reduce_ the size of _the master area_ in the active view.
#### <kbd>Win</kbd><kbd>Right</kbd>
_Enlarge_ the size of _the master area_ in the active view.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>t</kbd>
Rotate the layout axis.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Enter</kbd>
Mirror the layout axis.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Tab</kbd>
Rotate the master axis.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>Tab</kbd>
Rotate the stack axis.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Up</kbd>
Increase the master Y dimension.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Down</kbd>
Decrease the master Y dimension.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Right</kbd>
Increase the master X dimension.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Left</kbd>
Decrease the master X dimension.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>Left</kbd>
_Decrease the gap between windows_ in "monocle" and "tile" layout.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>Right</kbd>
_Increase the gap between windows_ in "monocle" and "tile" layout.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Backspace</kbd>
_Reset the tile layout_.
### View / Tag management
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>n</kbd>
Toggle the view margins.
#### <kbd>Win</kbd><kbd>BackSpace</kbd>
Activate the previously activated view.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>0</kbd>
Tag the active window with all tags.
#### <kbd>Win</kbd><kbd>&lt;n&gt;</kbd>
Activate the n<sup><small>th</small></sup> view.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>&lt;n&gt;</kbd>
Tag the active window with the n<sup><small>th</small></sup> tag.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>&lt;n&gt;</kbd>
Add / Remove the n<sup><small>th</small></sup> tag for the active window, if it
is not / is already set.
### Monitor management
#### <kbd>Win</kbd><kbd>.</kbd>
Activate the _next monitor_ in a multi-monitor environment.
#### <kbd>Win</kbd><kbd>,</kbd>
Activate the _previous monitor_ in a multi-monitor environment.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>.</kbd>
_Set_ the active window's view _to_ the active view on _the next monitor_ in a
multi-monitor environment.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>,</kbd>
_Set_ the active window's view _to_ the active view on _the previous monitor_
in a multi-monitor environment.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>.</kbd>
_Set all windows_ of the active view _on_ the active view of _the next monitor_
in a multi-monitor environment.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>,</kbd>
_Set all windows_ of the active view _on_ the active view of
_the previous monitor_ in a multi-monitor environment.
### GUI management
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>Space</kbd>
_Hide / Show the bar_ (bug.n status bar) on the active monitor.
#### <kbd>Win</kbd><kbd>Space</kbd>
Hide / Show the task bar.
#### <kbd>Win</kbd><kbd>y</kbd>
_Open the command GUI_ for executing programmes or bug.n functions.
#### <kbd>Win</kbd><kbd>Shift</kbd><kbd>y</kbd>
Toggle the overflow window of the 'notify icons'.
#### <kbd>Alt</kbd><kbd>Shift</kbd><kbd>y</kbd>
Indicate the areas of the "tile" layout.
### Administration
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>e</kbd>
Open the configuration file in the standard text editor.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>s</kbd>
_Save the current state_ of monitors, views, layouts to the configuration file.
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>r</kbd>
_Reload_ bug.n (i.e. the whole script).
#### <kbd>Win</kbd><kbd>Ctrl</kbd><kbd>q</kbd>
_Quit_ bug.n, restore the default Windows UI and show all windows.

Binary file not shown.

View file

@ -23,6 +23,11 @@ left 'Windows key' and the 'Control key' and the 'Q key'
_Activate_ the _next_ window in the active view. _Activate_ the _next_ window in the active view.
> You may also activate a window on an absolute position in the window list by
using the first parameter; e.g `View_activateWindow(1)` activates the first
window, which is the window in the master area, if you are using the default
settings for the tile layout.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
`Config_hotkey=#Up::View_activateWindow(0, -1)` `Config_hotkey=#Up::View_activateWindow(0, -1)`
@ -36,13 +41,13 @@ _Move_ the active window _to the next position_ in the window list of the view.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
`Config_hotkey=#+Up::View_shuffleWindow(0, -1)` `Config_hotkey=#+Up::View_shuffleWindow(0, -1)`
_Move_ the active window _to the previous position_ in the window list of the _Move_ the active window _to the previous position_ in the window list of the
view. view.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
`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 _Move_ the active window _to the first position_ in the window list of the
view. 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
@ -63,7 +68,7 @@ _Show / Hide the title bar_ of the active window.
_Toggle_ the _floating status_ of the active window. _Toggle_ the _floating status_ of the active window.
> The floating status effects the tiling of the active window (i.e. dis- / > The floating status effects the tiling of the active window (i.e. dis- /
regard it). regard it).
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -99,7 +104,7 @@ _Move and resize_ the active window _to_ the size of the _work area_.
Get information for the active window. Get information for the active window.
> The information being id, title, class, process name, style, geometry, tags > The information being id, title, class, process name, style, geometry, tags
and floating state. and floating state.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -121,7 +126,7 @@ Manually _move_ the active window _to the next area_ in the layout.
Manually _move_ the active window _to the previous area_ in the layout. Manually _move_ the active window _to the previous area_ in the layout.
> This has only an effect, if dynamic tiling is disabled > This has only an effect, if dynamic tiling is disabled
(`Config_dynamicTiling=0`). (`Config_dynamicTiling=0`).
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -134,16 +139,16 @@ _Move and resize_ the active window _to_ the size of the _work area_.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
`Config_hotkey=!<n>::View_moveWindow(<n>)` `Config_hotkey=!<n>::View_moveWindow(<n>)`
Manually _move_ the active window _to the n<sup><small>th</small></sup> area_ Manually _move_ the active window _to the n<sup><small>th</small></sup> area_
in the layout. in the layout.
> &lt;n&gt; can be an integer between 1 and 9. This has only an effect, if > &lt;n&gt; can be an integer between 1 and 9. This has only an effect, if
dynamic tiling is disabled (`Config_dynamicTiling=0`). dynamic tiling is disabled (`Config_dynamicTiling=0`).
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
`Config_hotkey=!BackSpace::View_toggleStackArea()` `Config_hotkey=!BackSpace::View_toggleStackArea()`
Toggle the stack area of the layout. Toggle the stack area of the layout.
> If the stack area is toggled off, the master area takes up the whole view and > If the stack area is toggled off, the master area takes up the whole view and
the stack area cannot be used to position windows. the stack area cannot be used to position windows.
@ -161,7 +166,7 @@ _Dump_ window information on the _windows of the active view_ to the log.
_Dump_ window information on the _managed windows_ to the log. _Dump_ window information on the _managed windows_ to the log.
> The list of managed windows contains the floating and tiled windows of all > The list of managed windows contains the floating and tiled windows of all
views. views.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -175,26 +180,26 @@ 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. Decrement the debug log level.
> This results in showing fewer debug messages. You may also set the debug log > This results in showing fewer debug messages. You may also set the debug log
level to an absolute value by using the first parameter. 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. Increment the debug log level.
> This results in showing more debug messages. You may also set the debug log > This results in showing more debug messages. You may also set the debug log
level to an absolute value by using the first parameter. 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 _previous_-ly set _layout_. Set the _previous_-ly set _layout_.
> You may also use `View_setLayout(0, +1)` for setting the next or > 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. `View_setLayout(0, -1)` for setting the previous layout in the layout array.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -219,9 +224,9 @@ _Reduce_ the size of _the master area_ in the active view.
> This has only an effect, if the tile layout is active. > This has only an effect, if the tile layout is active.
> You may also set an additional parameter for accelerating the third one. E.g. > You may also set an additional parameter for accelerating the third one. E.g.
with `Config_hotkey=#Left::View_setLayoutProperty(MFactor, 0, -0.05, 2)` the with `Config_hotkey=#Left::View_setLayoutProperty(MFactor, 0, -0.05, 2)` the
first step, by which the master area is reduced, is -0.0016% and will be first step, by which the master area is reduced, is -0.0016% and will be
doubled with consecutive calls until it reaches -0.05%. 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.
@ -233,7 +238,7 @@ _Enlarge_ the size of _the master area_ in the active view.
> This has only an effect, if the tile layout is active. > This has only an effect, if the tile layout is active.
> You may also set a additional parameter for accelerating the third one. E.g. > 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 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%.
@ -255,7 +260,7 @@ Rotate the layout axis.
Mirror the layout axis. Mirror the layout axis.
> I.e. -1 -> 1 / 1 -> -1 = master on the left / right side, > I.e. -1 -> 1 / 1 -> -1 = master on the left / right side,
-2 -> 2 / 2 -> -2 = master at top / bottom. -2 -> 2 / 2 -> -2 = master at top / bottom.
> This has only an effect, if the tile layout is active. > This has only an effect, if the tile layout is active.
@ -265,7 +270,7 @@ Mirror the layout axis.
Rotate the master axis. Rotate the master axis.
> I.e. 3 -> 1 = x-axis = horizontal stack, 1 -> 2 = y-axis = vertical stack, > I.e. 3 -> 1 = x-axis = horizontal stack, 1 -> 2 = y-axis = vertical stack,
2 -> 3 = z-axis = monocle. 2 -> 3 = z-axis = monocle.
> This has only an effect, if the tile layout is active. > This has only an effect, if the tile layout is active.
@ -275,7 +280,7 @@ Rotate the master axis.
Rotate the stack axis. Rotate the stack axis.
> I.e. 3 -> 1 = x-axis = horizontal stack, 1 -> 2 = y-axis = vertical stack, > I.e. 3 -> 1 = x-axis = horizontal stack, 1 -> 2 = y-axis = vertical stack,
2 -> 3 = z-axis = monocle. 2 -> 3 = z-axis = monocle.
> This has only an effect, if the tile layout is active. > This has only an effect, if the tile layout is active.
@ -285,7 +290,7 @@ Rotate the stack axis.
Increase the master Y dimension. Increase the master Y dimension.
> This results in an increased number of windows in the master area by X. > This results in an increased number of windows in the master area by X.
Maximum of 9. Maximum of 9.
> This has only an effect, if the tile layout is active. > This has only an effect, if the tile layout is active.
@ -295,7 +300,7 @@ Maximum of 9.
Decrease the master Y dimension. Decrease the master Y dimension.
> This results in a decreased number of windows in the master area by X. > This results in a decreased number of windows in the master area by X.
Minimum of 1. Minimum of 1.
> This has only an effect, if the tile layout is active. > This has only an effect, if the tile layout is active.
@ -305,7 +310,7 @@ Minimum of 1.
Increase the master X dimension. Increase the master X dimension.
> This results in an increased number of windows in the master area by Y. > This results in an increased number of windows in the master area by Y.
Maximum of 9. Maximum of 9.
> This has only an effect, if the tile layout is active. > This has only an effect, if the tile layout is active.
@ -315,7 +320,7 @@ Maximum of 9.
Decrease the master X dimension. Decrease the master X dimension.
> This results in a decreased number of windows in the master area by Y. > This results in a decreased number of windows in the master area by Y.
Minimum of 1. Minimum of 1.
> This has only an effect, if the tile layout is active. > This has only an effect, if the tile layout is active.
@ -323,10 +328,10 @@ 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. _Decrease the gap between windows_ in "monocle" and "tile" layout.
> You may also set an absolute value for the gap width by using the first > You may also set an absolute value for the gap width by using the first
parameter, e.g. `View_setLayoutProperty(GapWidth, 0, 0)` will eliminate the parameter, e.g. `View_setLayoutProperty(GapWidth, 0, 0)` will eliminate the
gap and `View_setLayoutProperty(GapWidth, 20, 0)` will set it to 20px. gap and `View_setLayoutProperty(GapWidth, 20, 0)` will set it to 20px.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -339,7 +344,7 @@ _Increase the gap between windows_ in "monocle" and "tile" layout.
_Reset the tile layout_. _Reset the tile layout_.
> This resets the layout and tile layout properties of the currently active > This resets the layout and tile layout properties of the currently active
view to the initial (default) values. view to the initial (default) values.
### View / Tag management ### View / Tag management
@ -353,15 +358,15 @@ Toggle the view margins.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
`Config_hotkey=#BackSpace::Monitor_activateView(-1)` `Config_hotkey=#BackSpace::Monitor_activateView(-1)`
Activate the previously activated view. Activate the previously activated view.
> You may also use `Monitor_activateView(0, -1)` or `Monitor_activateView(0, +1)` > You may also use `Monitor_activateView(0, -1)` or `Monitor_activateView(0, +1)`
for activating the previous or next adjacent view. 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. Tag the active window with all tags.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
`Config_hotkey=#<n>::Monitor_activateView(<n>)` `Config_hotkey=#<n>::Monitor_activateView(<n>)`
@ -377,7 +382,7 @@ Tag the active window with the n<sup><small>th</small></sup> tag.
> &lt;n&gt; can be an integer between 1 and `Config_viewCount`. > &lt;n&gt; can be an integer between 1 and `Config_viewCount`.
> You may also use `Monitor_setWindowTag(0, -1)` or `Monitor_setWindowTag(0, +1)` > 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. for setting the tag of the previous or next adjacent to the current view.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -392,7 +397,7 @@ is not / is already set.
`Config_hotkey=#.::Manager_activateMonitor(0, +1)` `Config_hotkey=#.::Manager_activateMonitor(0, +1)`
Activate the _next monitor_ in a multi-monitor environment. Activate the _next monitor_ in a multi-monitor environment.
> You may also 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.
@ -406,32 +411,32 @@ Activate the _previous monitor_ in a multi-monitor environment.
`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. multi-monitor environment.
> You may also set the active window on a specific monitor by using the first > 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 parameter, e.g. `Manager_setWindowMonitor(1)` will set the active window on
the first monitor. 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_ _Set_ the active window's view _to_ the active view on _the previous monitor_
in a multi-monitor environment. in a 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_ _Set all windows_ of the active view _on_ the active view of _the next monitor_
in a multi-monitor environment. in a multi-monitor environment.
> You may also set all windows of the active view on a specific monitor by > 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 using the first parameter, e.g. `Manager_setViewMonitor(1)` will set all
windows of the active view on the first monitor. 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 _Set all windows_ of the active view _on_ the active view of
_the previous monitor_ in a multi-monitor environment. _the previous monitor_ in a multi-monitor environment.
### GUI management ### GUI management
@ -464,9 +469,9 @@ Indicate the areas of the "tile" layout.
`Config_hotkey=#^e::Run, edit <Config_filePath>` `Config_hotkey=#^e::Run, edit <Config_filePath>`
Open the configuration file in the standard text editor. Open the configuration file in the standard text editor.
> If you want to set this hotkey in `Config.ini`, you have to replace > If you want to set this hotkey in `Config.ini`, you have to replace
`<Config_filePath>` with an explicit file path. `<Config_filePath>` with an explicit file path.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -479,7 +484,7 @@ _Save the current state_ of monitors, views, layouts to the configuration file.
_Reload_ bug.n (i.e. the whole script). _Reload_ bug.n (i.e. the whole script).
> This resets i.a. the configuration and internal variables of 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. 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

@ -1,6 +1,6 @@
/* /*
bug.n -- tiling window management bug.n -- tiling window management
Copyright (c) 2010-2018 Joshua Fuhs, joten Copyright (c) 2010-2019 Joshua Fuhs, joten
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -447,7 +447,7 @@ Bar_updateStatus() {
} }
If Config_readinDate { If Config_readinDate {
FormatTime, time, , % Config_readinDateFormat FormatTime, time, , % Config_readinDateFormat
GuiControl, , Bar_#%m%_date, % time GuiControl, , Bar_#%m%_date, % time
} }
If Config_readinTime { If Config_readinTime {
FormatTime, time, , % Config_readinTimeFormat FormatTime, time, , % Config_readinTimeFormat

View file

@ -1,6 +1,6 @@
/* /*
bug.n -- tiling window management bug.n -- tiling window management
Copyright (c) 2010-2018 Joshua Fuhs, joten Copyright (c) 2010-2019 Joshua Fuhs, joten
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of

View file

@ -1,6 +1,6 @@
/* /*
bug.n -- tiling window management bug.n -- tiling window management
Copyright (c) 2010-2018 Joshua Fuhs, joten Copyright (c) 2010-2019 Joshua Fuhs, joten
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of

View file

@ -1,6 +1,6 @@
/* /*
bug.n -- tiling window management bug.n -- tiling window management
Copyright (c) 2010-2018 Joshua Fuhs, joten Copyright (c) 2010-2019 Joshua Fuhs, joten
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -14,7 +14,7 @@
*/ */
NAME := "bug.n" NAME := "bug.n"
VERSION := "9.0.2-a" VERSION := "9.0.2"
;; Script settings ;; Script settings
OnExit, Main_cleanup OnExit, Main_cleanup

View file

@ -1,6 +1,6 @@
/* /*
bug.n -- tiling window management bug.n -- tiling window management
Copyright (c) 2010-2018 Joshua Fuhs, joten Copyright (c) 2010-2019 Joshua Fuhs, joten
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of

View file

@ -1,6 +1,6 @@
/* /*
bug.n -- tiling window management bug.n -- tiling window management
Copyright (c) 2010-2018 Joshua Fuhs, joten Copyright (c) 2010-2019 Joshua Fuhs, joten
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of

View file

@ -1,6 +1,6 @@
/* /*
bug.n -- tiling window management bug.n -- tiling window management
Copyright (c) 2010-2018 Joshua Fuhs, joten Copyright (c) 2010-2019 Joshua Fuhs, joten
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of

View file

@ -1,6 +1,6 @@
/* /*
bug.n -- tiling window management bug.n -- tiling window management
Copyright (c) 2010-2018 Joshua Fuhs, joten Copyright (c) 2010-2019 Joshua Fuhs, joten
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of

View file

@ -1,6 +1,6 @@
/* /*
bug.n -- tiling window management bug.n -- tiling window management
Copyright (c) 2010-2018 Joshua Fuhs, joten Copyright (c) 2010-2019 Joshua Fuhs, joten
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of

View file

@ -1,6 +1,6 @@
/* /*
bug.n -- tiling window management bug.n -- tiling window management
Copyright (c) 2010-2018 Joshua Fuhs, joten Copyright (c) 2010-2019 Joshua Fuhs, joten
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of

View file

@ -1,7 +1,7 @@
/* /*
:title: bug.n -- tiling window management :title: bug.n -- tiling window management
:copyright: (c) 2010-2017 by Joshua Fuhs, joten <https://github.com/joten> :copyright: (c) 2010-2017 by Joshua Fuhs, joten <https://github.com/joten>
:license: GNU General Public License version 3; for more details: :license: GNU General Public License version 3; for more details:
../LICENSE.md or at <http://www.gnu.org/licenses/>. ../LICENSE.md or at <http://www.gnu.org/licenses/>.
This program is distributed in the hope that it will be useful, but WITHOUT ANY This program is distributed in the hope that it will be useful, but WITHOUT ANY
@ -22,7 +22,7 @@ SetWorkingDir %A_ScriptDir% ;; Ensures a consistent starting directory.
;; pseudo main function ;; pseudo main function
M_NAME := "bug.n" M_NAME := "bug.n"
M_VERSION := "9.0.2-a" M_VERSION := "9.0.2"
Progress,,,, Building %M_NAME% Progress,,,, Building %M_NAME%
M_logLevel := 5 ;; higher values mean more logging, type = int, choices = [0, 1, 2, 3, 4, 5, 6], default = 5 M_logLevel := 5 ;; higher values mean more logging, type = int, choices = [0, 1, 2, 3, 4, 5, 6], default = 5
@ -91,17 +91,22 @@ compile(source, destination, customIcon, compiler := "C:\Program Files\AutoHotke
If (FileExist(source) && FileExist(compiler)) If (FileExist(source) && FileExist(compiler))
RunWait, %compiler% /in %source% /icon %customIcon% /mpress %useMpress% /out %destination% RunWait, %compiler% /in %source% /icon %customIcon% /mpress %useMpress% /out %destination%
_log.message("Compiling the script to an executable finished.", 4) _log.message("Compiling the script to an executable finished.", 4)
If (!FileExist(destination)) {
_log.message("**compile**: Resulting file ``" . destination . "`` does not exist.", 2)
}
} }
createCheatSheet(source, destDir, filename := "cheat_sheet", converter := "C:\Users\joten\AppData\Local\Pandoc\pandoc.exe") { createCheatSheet(source, destDir, filename := "cheat_sheet", converter := "") {
Global _log, M_NAME, M_VERSION Global _log, M_NAME, M_VERSION
converter := converter != "" ? converter : A_AppData . "\..\Local\Pandoc\pandoc.exe"
_log.message("**createCheatSheet**: Variable set, source -> ``" . source . "``, the file does " . (FileExist(source) ? "" : "**not** ") . "exist.", 5) _log.message("**createCheatSheet**: Variable set, source -> ``" . source . "``, the file does " . (FileExist(source) ? "" : "**not** ") . "exist.", 5)
_log.message("**createCheatSheet**: Variable set, destDir -> ``" . destDir . "``, the file does " . (FileExist(destDir) ? "" : "**not** ") . "exist.", 5) _log.message("**createCheatSheet**: Variable set, destDir -> ``" . destDir . "``, the file does " . (FileExist(destDir) ? "" : "**not** ") . "exist.", 5)
_log.message("**createCheatSheet**: Variable set, converter -> ``" . converter . "``, the file does " . (FileExist(converter) ? "" : "**not** ") . "exist.", 5) _log.message("**createCheatSheet**: Variable set, converter -> ``" . converter . "``, the file does " . (FileExist(converter) ? "" : "**not** ") . "exist.", 5)
If (FileExist(source) && FileExist(destDir) && FileExist(converter)) { If (FileExist(source) && FileExist(destDir) && FileExist(converter)) {
FileRead, md, %source% FileRead, md, %source%
If (ErrorLevel = 0) { If (ErrorLevel = 0) {
_log.message("**createCheatSheet**: Converting source ``" . source . "`` to destination ``" . destDir . "\" . filename . ".md``.", 5)
md := RegExReplace(md, "s)^## Default hotkeys\R\R.+\R\### Window management", "## " . M_NAME . " " . M_VERSION . " default hotkeys`r`n`r`n### Window management") md := RegExReplace(md, "s)^## Default hotkeys\R\R.+\R\### Window management", "## " . M_NAME . " " . M_VERSION . " default hotkeys`r`n`r`n### Window management")
md := StrReplace(md, "`r`n-------------------------------------------------------------------------------`r`n", "`r`n") md := StrReplace(md, "`r`n-------------------------------------------------------------------------------`r`n", "`r`n")
md := RegExReplace(md, "s)\R>.+?\R\R", "`r`n") md := RegExReplace(md, "s)\R>.+?\R\R", "`r`n")
@ -116,9 +121,13 @@ createCheatSheet(source, destDir, filename := "cheat_sheet", converter := "C:\Us
FileDelete, %destDir%\%filename%.md FileDelete, %destDir%\%filename%.md
FileAppend, %md%, %destDir%\%filename%.md FileAppend, %md%, %destDir%\%filename%.md
} }
RunWait, % converter . " -o " . destDir . "\" . filename . ".html -S --section-divs -c reset.css -c cheat_sheet.css " . destDir . "\" . filename . ".md" _log.message("**createCheatSheet**: Running command ``" . converter . " -s -o " . destDir . "\" . filename . ".html --section-divs -c reset.css -c cheat_sheet.css " . destDir . "\" . filename . ".md``", 5)
RunWait, % converter . " -s -o " . destDir . "\" . filename . ".html --section-divs -c reset.css -c cheat_sheet.css " . destDir . "\" . filename . ".md"
} }
_log.message("Creating the cheat sheet finished.", 4) _log.message("Creating the cheat sheet finished.", 4)
If (!FileExist(destDir . "\" . filename . ".html")) {
_log.message("**createCheatSheet**: Resulting file ``" . destDir . "\" . filename . ".html`` does not exist.", 2)
}
} }
IntMin(int_1, int_2) { IntMin(int_1, int_2) {

View file

@ -0,0 +1,17 @@
# 2019-04-07
2019-04-07 21:08:41> INFO....: Logging started with log level 5
2019-04-07 21:08:41> INFO....: Building bug.n started
2019-04-07 21:08:41> DEBUG...: **compile**: Variable set, source -> `C:\Users\jn\Downloads\bug.n.git\tools\..\src\Main.ahk`, the file does exist.
2019-04-07 21:08:41> DEBUG...: **compile**: Variable set, destination -> `C:\Users\jn\Downloads\bug.n.git\tools\..\bugn.exe`, the file does **not** exist.
2019-04-07 21:08:41> DEBUG...: **compile**: Variable set, customIcon -> `C:\Users\jn\Downloads\bug.n.git\tools\..\src\logo.ico`, the file does exist.
2019-04-07 21:08:41> DEBUG...: **compile**: Variable set, compiler -> `C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe`, the file does exist.
2019-04-07 21:08:41> DEBUG...: **compile**: Variable set, useMpress -> `0`
2019-04-07 21:08:45> INFO....: Compiling the script to an executable finished.
2019-04-07 21:08:45> DEBUG...: **createCheatSheet**: Variable set, source -> `C:\Users\jn\Downloads\bug.n.git\tools\..\doc\Default_hotkeys.md`, the file does exist.
2019-04-07 21:08:45> DEBUG...: **createCheatSheet**: Variable set, destDir -> `C:\Users\jn\Downloads\bug.n.git\tools\..\doc\Cheat_sheet`, the file does exist.
2019-04-07 21:08:45> DEBUG...: **createCheatSheet**: Variable set, converter -> `C:\Users\jn\AppData\Roaming\..\Local\Pandoc\pandoc.exe`, the file does exist.
2019-04-07 21:08:45> DEBUG...: **createCheatSheet**: Converting source `C:\Users\jn\Downloads\bug.n.git\tools\..\doc\Default_hotkeys.md` to destination `C:\Users\jn\Downloads\bug.n.git\tools\..\doc\Cheat_sheet\cheat_sheet.md`.
2019-04-07 21:08:45> DEBUG...: **createCheatSheet**: Running command `C:\Users\jn\AppData\Roaming\..\Local\Pandoc\pandoc.exe -s -o C:\Users\jn\Downloads\bug.n.git\tools\..\doc\Cheat_sheet\cheat_sheet.html --section-divs -c reset.css -c cheat_sheet.css C:\Users\jn\Downloads\bug.n.git\tools\..\doc\Cheat_sheet\cheat_sheet.md`
2019-04-07 21:08:45> INFO....: Creating the cheat sheet finished.
2019-04-07 21:08:45> ........: Building bug.n finished