diff --git a/src/Config.ahk b/src/Config.ahk index f5a04d2..658f77c 100644 --- a/src/Config.ahk +++ b/src/Config.ahk @@ -389,6 +389,7 @@ Config_saveSession() { #i::Manager_getWindowInfo() ; Get information for the active window (id, title, class, process name, style, geometry, tags and floating state). #+i::Manager_getWindowList() ; Get a window list for the active view (id, title and class). #^i::Manager_logWindowList() +#^d::Log_toggleDebugEnabled() #Tab::View_setLayout(-1) ; Set the previously set layout. You may also use View_setLayout(">") for setting the next layout in the layout array. #\::View_setLayout(3) ; Set the 3rd defined layout (i. e. floating layout in the default configuration). diff --git a/src/Log.ahk b/src/Log.ahk index 87f3ddb..9e48013 100755 --- a/src/Log.ahk +++ b/src/Log.ahk @@ -18,11 +18,8 @@ * @version 8.3.0 */ -Log_init() { - Global - Log_debug_enabled := 0 -} - + + Log_msg( message ) { FormatTime, CurrentTime, , yyyyMMddHHmmss FileAppend, %CurrentTime% %message%`r`n, bugn_log.txt @@ -34,6 +31,8 @@ Log_bare( message ) { FileAppend, %padded_message% , bugn_log.txt } +Log_debug_enabled := 0 + Log_toggleDebugEnabled() { Global If (Log_debug_enabled = 1) @@ -55,5 +54,5 @@ Log_dbg_msg( message ) { Log_dbg_bare( message ) { Global If (Log_debug_enabled = 1) - Log_msg( "DEBUG: " . message ) + Log_bare( "DEBUG: " . message ) } \ No newline at end of file diff --git a/src/Manager.ahk b/src/Manager.ahk index 1c108bc..ecbeac1 100644 --- a/src/Manager.ahk +++ b/src/Manager.ahk @@ -263,7 +263,7 @@ Manager_logWindowInfo( w ) { WinGet, aWndStyle, Style, ahk_id %w% WinGetPos, aWndX, aWndY, aWndW, aWndH, ahk_id %w% - Log_bare(" " . w . "`t" . aIsBugnActive . " " . aIsFloating . " " . aIsHidden . " " aIsWinFocus . "`t" . aWndX . "`t" . aWndY . "`t" . aWndW . "`t" . aWndH . "`t" . aWndStyle . "`t" . aWndTitle) + Log_bare(w . "`t" . aIsBugnActive . " " . aIsFloating . " " . aIsHidden . " " aIsWinFocus . "`t" . aWndX . "`t" . aWndY . "`t" . aWndW . "`t" . aWndH . "`t" . aWndStyle . "`t" . aWndTitle) } Manager_logWindowList() { @@ -271,7 +271,7 @@ Manager_logWindowList() { v := Monitor_#%Manager_aMonitor%_aView_#1 Log_msg( "Window dump for active view (" . Manager_aMonitor . ", " . v . ")" ) - Log_bare( " ID`t`tA F H W`tX`tY`tW`tH`tStyle`t`tTitle") + Log_bare( "ID`t`tA F H W`tX`tY`tW`tH`tStyle`t`tTitle") StringTrimRight, wndIds, View_#%Manager_aMonitor%_#%v%_wndIds, 1 Loop, PARSE, wndIds, `;