diff --git a/bugn.exe b/bugn.exe new file mode 100644 index 0000000..054e44f Binary files /dev/null and b/bugn.exe differ diff --git a/doc/CHANGES.md b/doc/CHANGES.md index f890c64..6b8284d 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -9,10 +9,13 @@ ### 9.0.2 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
`-` Hotkey Functions | `+` Configuration Variables or
`+` Hotkey Functions | | --:| ---------------------------------------------------------------- | --------------------------------------------------------- | | 1. | | `#^Backspace::View_resetTileLayout()` | +| 3. | `Config_monitorDisplayChangeMessages` | | ### 9.0.1 diff --git a/doc/Cheat_sheet/cheat_sheet.html b/doc/Cheat_sheet/cheat_sheet.html new file mode 100644 index 0000000..497644b --- /dev/null +++ b/doc/Cheat_sheet/cheat_sheet.html @@ -0,0 +1,294 @@ + + + + + + + cheat_sheet + + + + + + +
+

bug.n 9.0.2 default hotkeys

+
+

Window management

+
+

WinDown

+

Activate the next window in the active view.

+
+
+

WinUp

+

Activate the previous window in the active view.

+
+
+

WinShiftDown

+

Move the active window to the next position in the window list of the view.

+
+
+

WinShiftUp

+

Move the active window to the previous position in the window list of the view.

+
+
+

WinShiftEnter

+

Move the active window to the first position in the window list of the view.

+
+
+

Winc

+

Close the active window.

+
+
+

WinShiftd

+

Show / Hide the title bar of the active window.

+
+
+

WinShiftf

+

Toggle the floating status of the active window.

+
+
+

WinCtrlm

+

Minimize the active window.

+
+
+

WinShiftm

+

Move the active window by key.

+
+
+

WinShifts

+

Resize the active window by key.

+
+
+

WinShiftx

+

Move and resize the active window to the size of the work area.

+
+
+

Wini

+

Get information for the active window.

+
+
+

WinShifti

+

Get a window list for the active view.

+
+
+

AltDown

+

Manually move the active window to the next area in the layout.

+
+
+

AltUp

+

Manually move the active window to the previous area in the layout.

+
+
+

AltShiftEnter

+

Move and resize the active window to the size of the work area.

+
+
+

Alt<n>

+

Manually move the active window to the nth area in the layout.

+
+
+

AltBackSpace

+

Toggle the stack area of the layout.

+
+
+
+

Window debugging

+
+

WinCtrli

+

Dump window information on the windows of the active view to the log.

+
+
+

WinCtrlShifti

+

Dump window information on the managed windows to the log.

+
+
+

WinCtrlh

+

Print column headings to the log.

+
+
+

WinCtrld

+

Decrement the debug log level.

+
+
+

WinCtrlShiftd

+

Increment the debug log level.

+
+
+
+

Layout management

+
+

WinTab

+

Set the previous-ly set layout.

+
+
+

Winf

+

Set the floating layout.

+
+
+

Winm

+

Set the monocle layout.

+
+
+

Wint

+

Set the tile layout.

+
+
+

WinLeft

+

Reduce the size of the master area in the active view.

+
+
+

WinRight

+

Enlarge the size of the master area in the active view.

+
+
+

WinCtrlt

+

Rotate the layout axis.

+
+
+

WinCtrlEnter

+

Mirror the layout axis.

+
+
+

WinCtrlTab

+

Rotate the master axis.

+
+
+

WinCtrlShiftTab

+

Rotate the stack axis.

+
+
+

WinCtrlUp

+

Increase the master Y dimension.

+
+
+

WinCtrlDown

+

Decrease the master Y dimension.

+
+
+

WinCtrlRight

+

Increase the master X dimension.

+
+
+

WinCtrlLeft

+

Decrease the master X dimension.

+
+
+

WinShiftLeft

+

Decrease the gap between windows in “monocle” and “tile” layout.

+
+
+

WinShiftRight

+

Increase the gap between windows in “monocle” and “tile” layout.

+
+
+

WinCtrlBackspace

+

Reset the tile layout.

+
+
+
+

View / Tag management

+
+

WinShiftn

+

Toggle the view margins.

+
+
+

WinBackSpace

+

Activate the previously activated view.

+
+
+

WinShift0

+

Tag the active window with all tags.

+
+
+

Win<n>

+

Activate the nth view.

+
+
+

WinShift<n>

+

Tag the active window with the nth tag.

+
+
+

WinCtrl<n>

+

Add / Remove the nth tag for the active window, if it is not / is already set.

+
+
+
+

Monitor management

+
+

Win.

+

Activate the next monitor in a multi-monitor environment.

+
+
+

Win,

+

Activate the previous monitor in a multi-monitor environment.

+
+
+

WinShift.

+

Set the active window’s view to the active view on the next monitor in a multi-monitor environment.

+
+
+

WinShift,

+

Set the active window’s view to the active view on the previous monitor in a multi-monitor environment.

+
+
+

WinCtrlShift.

+

Set all windows of the active view on the active view of the next monitor in a multi-monitor environment.

+
+
+

WinCtrlShift,

+

Set all windows of the active view on the active view of the previous monitor in a multi-monitor environment.

+
+
+
+

GUI management

+
+

WinShiftSpace

+

Hide / Show the bar (bug.n status bar) on the active monitor.

+
+
+

WinSpace

+

Hide / Show the task bar.

+
+
+

Winy

+

Open the command GUI for executing programmes or bug.n functions.

+
+
+

WinShifty

+

Toggle the overflow window of the ‘notify icons’.

+
+
+

AltShifty

+

Indicate the areas of the “tile” layout.

+
+
+
+

Administration

+
+

WinCtrle

+

Open the configuration file in the standard text editor.

+
+
+

WinCtrls

+

Save the current state of monitors, views, layouts to the configuration file.

+
+
+

WinCtrlr

+

Reload bug.n (i.e. the whole script).

+
+
+

WinCtrlq

+

Quit bug.n, restore the default Windows UI and show all windows.

+
+
+
+ + diff --git a/doc/Cheat_sheet/cheat_sheet.md b/doc/Cheat_sheet/cheat_sheet.md new file mode 100644 index 0000000..99d27cf --- /dev/null +++ b/doc/Cheat_sheet/cheat_sheet.md @@ -0,0 +1,209 @@ +## bug.n 9.0.2 default hotkeys + +### Window management + +#### WinDown +_Activate_ the _next_ window in the active view. + +#### WinUp +_Activate_ the _previous_ window in the active view. + +#### WinShiftDown +_Move_ the active window _to the next position_ in the window list of the view. + +#### WinShiftUp +_Move_ the active window _to the previous position_ in the window list of the +view. + +#### WinShiftEnter +_Move_ the active window _to the first position_ in the window list of the +view. + +#### Winc +_Close_ the active window. + +#### WinShiftd +_Show / Hide the title bar_ of the active window. + +#### WinShiftf +_Toggle_ the _floating status_ of the active window. + +#### WinCtrlm +_Minimize_ the active window. + +#### WinShiftm +_Move_ the active window _by key_. + +#### WinShifts +_Resize_ the active window _by key_. + +#### WinShiftx +_Move and resize_ the active window _to_ the size of the _work area_. + +#### Wini +Get information for the active window. + +#### WinShifti +_Get a window list_ for the active view. + +#### AltDown +Manually _move_ the active window _to the next area_ in the layout. + +#### AltUp +Manually _move_ the active window _to the previous area_ in the layout. + +#### AltShiftEnter +_Move and resize_ the active window _to_ the size of the _work area_. + +#### Alt<n> +Manually _move_ the active window _to the nth area_ +in the layout. + +#### AltBackSpace +Toggle the stack area of the layout. + +### Window debugging + +#### WinCtrli +_Dump_ window information on the _windows of the active view_ to the log. + +#### WinCtrlShifti +_Dump_ window information on the _managed windows_ to the log. + +#### WinCtrlh +_Print column headings_ to the log. + +#### WinCtrld +Decrement the debug log level. + +#### WinCtrlShiftd +Increment the debug log level. + +### Layout management + +#### WinTab +Set the _previous_-ly set _layout_. + +#### Winf +Set the _floating layout_. + +#### Winm +Set the _monocle layout_. + +#### Wint +Set the _tile layout_. + +#### WinLeft +_Reduce_ the size of _the master area_ in the active view. + +#### WinRight +_Enlarge_ the size of _the master area_ in the active view. + +#### WinCtrlt +Rotate the layout axis. + +#### WinCtrlEnter +Mirror the layout axis. + +#### WinCtrlTab +Rotate the master axis. + +#### WinCtrlShiftTab +Rotate the stack axis. + +#### WinCtrlUp +Increase the master Y dimension. + +#### WinCtrlDown +Decrease the master Y dimension. + +#### WinCtrlRight +Increase the master X dimension. + +#### WinCtrlLeft +Decrease the master X dimension. + +#### WinShiftLeft +_Decrease the gap between windows_ in "monocle" and "tile" layout. + +#### WinShiftRight +_Increase the gap between windows_ in "monocle" and "tile" layout. + +#### WinCtrlBackspace +_Reset the tile layout_. + +### View / Tag management + +#### WinShiftn +Toggle the view margins. + +#### WinBackSpace +Activate the previously activated view. + +#### WinShift0 +Tag the active window with all tags. + +#### Win<n> +Activate the nth view. + +#### WinShift<n> +Tag the active window with the nth tag. + +#### WinCtrl<n> +Add / Remove the nth tag for the active window, if it +is not / is already set. + +### Monitor management + +#### Win. +Activate the _next monitor_ in a multi-monitor environment. + +#### Win, +Activate the _previous monitor_ in a multi-monitor environment. + +#### WinShift. +_Set_ the active window's view _to_ the active view on _the next monitor_ in a +multi-monitor environment. + +#### WinShift, +_Set_ the active window's view _to_ the active view on _the previous monitor_ +in a multi-monitor environment. + +#### WinCtrlShift. +_Set all windows_ of the active view _on_ the active view of _the next monitor_ +in a multi-monitor environment. + +#### WinCtrlShift, +_Set all windows_ of the active view _on_ the active view of +_the previous monitor_ in a multi-monitor environment. + +### GUI management + +#### WinShiftSpace +_Hide / Show the bar_ (bug.n status bar) on the active monitor. + +#### WinSpace +Hide / Show the task bar. + +#### Winy +_Open the command GUI_ for executing programmes or bug.n functions. + +#### WinShifty +Toggle the overflow window of the 'notify icons'. + +#### AltShifty +Indicate the areas of the "tile" layout. + +### Administration + +#### WinCtrle +Open the configuration file in the standard text editor. + +#### WinCtrls +_Save the current state_ of monitors, views, layouts to the configuration file. + +#### WinCtrlr +_Reload_ bug.n (i.e. the whole script). + +#### WinCtrlq +_Quit_ bug.n, restore the default Windows UI and show all windows. diff --git a/doc/Cheat_sheet/cheat_sheet.pdf b/doc/Cheat_sheet/cheat_sheet.pdf new file mode 100644 index 0000000..550a871 Binary files /dev/null and b/doc/Cheat_sheet/cheat_sheet.pdf differ diff --git a/doc/Default_hotkeys.md b/doc/Default_hotkeys.md index 9a5e159..86ecb0c 100644 --- a/doc/Default_hotkeys.md +++ b/doc/Default_hotkeys.md @@ -23,6 +23,11 @@ left 'Windows key' and the 'Control key' and the 'Q key' _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)` @@ -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)` -_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. ------------------------------------------------------------------------------- `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. > 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. -> 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). ------------------------------------------------------------------------------- @@ -99,7 +104,7 @@ _Move and resize_ the active window _to_ the size of the _work area_. 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. ------------------------------------------------------------------------------- @@ -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. -> This has only an effect, if dynamic tiling is disabled +> This has only an effect, if dynamic tiling is disabled (`Config_dynamicTiling=0`). ------------------------------------------------------------------------------- @@ -134,16 +139,16 @@ _Move and resize_ the active window _to_ the size of the _work area_. ------------------------------------------------------------------------------- `Config_hotkey=!::View_moveWindow()` -Manually _move_ the active window _to the nth area_ +Manually _move_ the active window _to the nth area_ in the layout. -> <n> can be an integer between 1 and 9. This has only an effect, if +> <n> can be an integer between 1 and 9. This has only an effect, if dynamic tiling is disabled (`Config_dynamicTiling=0`). ------------------------------------------------------------------------------- `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 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. -> 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. ------------------------------------------------------------------------------- @@ -175,26 +180,26 @@ two hotkeys being `Manager_logViewWindowList` and `Manager_logManagedWindowList` ------------------------------------------------------------------------------- `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. ------------------------------------------------------------------------------- `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. ### 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 +> 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. ------------------------------------------------------------------------------- @@ -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. -> 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 -first step, by which the master area is reduced, is -0.0016% and will be +> 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 +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. `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. -> 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 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%. @@ -255,7 +260,7 @@ Rotate 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. > This has only an effect, if the tile layout is active. @@ -265,7 +270,7 @@ Mirror the layout 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. > This has only an effect, if the tile layout is active. @@ -275,7 +280,7 @@ Rotate the master 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. > This has only an effect, if the tile layout is active. @@ -285,7 +290,7 @@ Rotate the stack axis. 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. > This has only an effect, if the tile layout is active. @@ -295,7 +300,7 @@ Maximum of 9. 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. > This has only an effect, if the tile layout is active. @@ -305,7 +310,7 @@ Minimum of 1. 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. > This has only an effect, if the tile layout is active. @@ -315,7 +320,7 @@ Maximum of 9. 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. > 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)` -_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 -parameter, e.g. `View_setLayoutProperty(GapWidth, 0, 0)` will eliminate the +> 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 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_. -> 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 / Tag management @@ -353,15 +358,15 @@ Toggle the view margins. ------------------------------------------------------------------------------- `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. ------------------------------------------------------------------------------- `Config_hotkey=#+0::Monitor_setWindowTag(10)` -Tag the active window with all tags. +Tag the active window with all tags. ------------------------------------------------------------------------------- `Config_hotkey=#::Monitor_activateView()` @@ -377,7 +382,7 @@ Tag the active window with the nth tag. > <n> 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. ------------------------------------------------------------------------------- @@ -392,7 +397,7 @@ is not / is already set. `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. `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)` _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 -parameter, e.g. `Manager_setWindowMonitor(1)` will set the active window on +> 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)` -_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. ------------------------------------------------------------------------------- `Config_hotkey=#^+.::Manager_setViewMonitor(0, +1)` _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 -using the first parameter, e.g. `Manager_setViewMonitor(1)` will set all +> 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. ------------------------------------------------------------------------------- `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. ### GUI management @@ -464,9 +469,9 @@ Indicate the areas of the "tile" layout. `Config_hotkey=#^e::Run, edit ` -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 `` 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). -> 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. If `Config_autoSaveSession` is not set to `off`, the window lists can be restored and windows are put to their associated monitor and views. diff --git a/src/Bar.ahk b/src/Bar.ahk index 5251997..5f1591d 100644 --- a/src/Bar.ahk +++ b/src/Bar.ahk @@ -1,6 +1,6 @@ /* 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, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -447,7 +447,7 @@ Bar_updateStatus() { } If Config_readinDate { FormatTime, time, , % Config_readinDateFormat - GuiControl, , Bar_#%m%_date, % time + GuiControl, , Bar_#%m%_date, % time } If Config_readinTime { FormatTime, time, , % Config_readinTimeFormat diff --git a/src/Config.ahk b/src/Config.ahk index ae034da..aa84e67 100644 --- a/src/Config.ahk +++ b/src/Config.ahk @@ -1,6 +1,6 @@ /* 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, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/Debug.ahk b/src/Debug.ahk index 80da25c..295c0fc 100644 --- a/src/Debug.ahk +++ b/src/Debug.ahk @@ -1,6 +1,6 @@ /* 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, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/Main.ahk b/src/Main.ahk index 0ae9fc0..345f560 100644 --- a/src/Main.ahk +++ b/src/Main.ahk @@ -1,6 +1,6 @@ /* 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, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,7 +14,7 @@ */ NAME := "bug.n" -VERSION := "9.0.2-a" +VERSION := "9.0.2" ;; Script settings OnExit, Main_cleanup diff --git a/src/Manager.ahk b/src/Manager.ahk index 18ea0cc..2f7cae8 100644 --- a/src/Manager.ahk +++ b/src/Manager.ahk @@ -1,6 +1,6 @@ /* 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, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/Monitor.ahk b/src/Monitor.ahk index 523692a..9b471b1 100644 --- a/src/Monitor.ahk +++ b/src/Monitor.ahk @@ -1,6 +1,6 @@ /* 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, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/ResourceMonitor.ahk b/src/ResourceMonitor.ahk index 3072311..89ad7aa 100644 --- a/src/ResourceMonitor.ahk +++ b/src/ResourceMonitor.ahk @@ -1,6 +1,6 @@ /* 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, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/Tiler.ahk b/src/Tiler.ahk index 9b8e123..2cc5d70 100644 --- a/src/Tiler.ahk +++ b/src/Tiler.ahk @@ -1,6 +1,6 @@ /* 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, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/View.ahk b/src/View.ahk index 919559c..3f7f3ec 100644 --- a/src/View.ahk +++ b/src/View.ahk @@ -1,6 +1,6 @@ /* 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, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/Window.ahk b/src/Window.ahk index e679f6c..51a21b5 100644 --- a/src/Window.ahk +++ b/src/Window.ahk @@ -1,6 +1,6 @@ /* 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, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/tools/build.ahk b/tools/build.ahk index 4e157af..03f2cbf 100644 --- a/tools/build.ahk +++ b/tools/build.ahk @@ -1,7 +1,7 @@ /* :title: bug.n -- tiling window management :copyright: (c) 2010-2017 by Joshua Fuhs, 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 . 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 M_NAME := "bug.n" - M_VERSION := "9.0.2-a" + M_VERSION := "9.0.2" Progress,,,, Building %M_NAME% 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)) RunWait, %compiler% /in %source% /icon %customIcon% /mpress %useMpress% /out %destination% _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 + 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, 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) If (FileExist(source) && FileExist(destDir) && FileExist(converter)) { FileRead, md, %source% 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 := StrReplace(md, "`r`n-------------------------------------------------------------------------------`r`n", "`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 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) + If (!FileExist(destDir . "\" . filename . ".html")) { + _log.message("**createCheatSheet**: Resulting file ``" . destDir . "\" . filename . ".html`` does not exist.", 2) + } } IntMin(int_1, int_2) { diff --git a/tools/log-build-SILKIE_jn.md b/tools/log-build-SILKIE_jn.md new file mode 100644 index 0000000..3210a41 --- /dev/null +++ b/tools/log-build-SILKIE_jn.md @@ -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