From 18b165edc84594020d6639e2d25e34ebe54899e0 Mon Sep 17 00:00:00 2001 From: joten Date: Sun, 1 Feb 2015 21:13:48 +0100 Subject: [PATCH] Revised the default rule set --- doc/CHANGES.md | 10 +++++++++ doc/Configuring_rules.md | 2 +- doc/Default_configuration.md | 43 +++++++++++++++++++++++++----------- src/Config.ahk | 27 ++++++++++++---------- 4 files changed, 56 insertions(+), 26 deletions(-) diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 025588a..0cac258 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -20,6 +20,7 @@ not implement the functionality: `Monitor_toggleWindowTag`, `View_activateWindow 6. `~` Revised the bar color scheme. 7. `~` Revised the rule layout. The third parameter is not compared to the window style anymore, but is a function name, which is called with the window ID as a paramater, when applying the rule. +8. `~` Revised the default rule set. | # | Configuration variables | `-` Hotkey functions | `+` Hotkey functions | | --:| ------------------------- | --------------------------------------- | ----------------------------------------------------- | @@ -65,6 +66,15 @@ called with the window ID as a paramater, when applying the rule. | | `+` `Config_fontColor_#2` | | | | | `+` `Config_fontColor_#3` | | | | 7. | `~` `Config_rule_#2` | | | +| 8. | `~` `Config_rule_#3` | | | +| | `~` `Config_rule_#4` | | | +| | `~` `Config_rule_#7` | | | +| | `~` `Config_rule_#9` | | | +| | `~` `Config_rule_#10` | | | +| | `~` `Config_rule_#11` | | | +| | `~` `Config_rule_#12` | | | +| | `+` `Config_rule_#13` | | | +| | `+` `Config_rule_#14` | | | ### 8.4.0 diff --git a/doc/Configuring_rules.md b/doc/Configuring_rules.md index eb8aa73..2c1ee18 100644 --- a/doc/Configuring_rules.md +++ b/doc/Configuring_rules.md @@ -59,7 +59,7 @@ The following `Config.ini` line replaces rule number 11 in the default configuration, putting windows of 'Mozilla Firefox' on view 5, keeping the title bar visible and maximizing them. -`Config_rule_#11=MozillaWindowClass;.*Mozilla Firefox;;1;0;16;0;1;0;maximize` +`Config_rule_#13=MozillaWindowClass;.*Mozilla Firefox;;1;0;16;0;1;0;maximize` #### Mozilla Thunderbird diff --git a/doc/Default_configuration.md b/doc/Default_configuration.md index 9c9b725..64e92f9 100644 --- a/doc/Default_configuration.md +++ b/doc/Default_configuration.md @@ -276,27 +276,44 @@ the window first is created. > Pop-up windows (style WS_POPUP) will not be managed, are floating and the titles are hidden. -`Config_rule_#3=SWT_Window0;.*;;1;0;0;0;0;0;` -> Windows created by Java (SWT) e. g. Eclipse have the style WS_POPUP, but -should be excluded from the second rule. +`Config_rule_#3=QWidget;.*;;1;0;0;0;0;0;` +> Windows created by QT (QWidget) have the style WS_POPUP, but should be +excluded from the preceding rule. -`Config_rule_#4=QWidget;.*;;1;0;0;0;0;0;` -> Also windows created by QT (QWidget) should be excluded from the second rule -for the same reason as above. +`Config_rule_#4=SWT_Window0;.*;;1;0;0;0;0;0;` +> Also windows created by Java (SWT) e. g. Eclipse should be excluded from the +second rule for the same reason as above. `Config_rule_#5=Xming;.*;;1;0;0;0;0;0;` > Also Xming windows should be excluded from the second rule for the same reason as above. Config_rule_#6=MsiDialog(No)?CloseClass;.*;;1;0;0;1;1;0; - Config_rule_#7=AdobeFlashPlayerInstaller;.*;;1;0;0;1;0;1; - Config_rule_#8=CalcFrame;.*;;1;0;0;1;1;0; - Config_rule_#9=MozillaDialogClass;.*;;1;0;0;1;1;0; - Config_rule_#10=_sp;_sp;;1;0;0;1;0;1; - Config_rule_#11=MozillaWindowClass;.*Mozilla Firefox;;1;0;0;0;1;0;maximize - Config_rule_#12=Chrome_WidgetWin_1;.*;;1;0;0;0;1;0;maximize + Config_rule_#7=AdobeFlashPlayerInstaller;.*;;1;0;0;1;0;0; -`Config_ruleCount=12` +`Config_rule_#8=CalcFrame;.*;;1;0;0;1;1;0;` +> Windows calculator. + +`Config_rule_#9=CabinetWClass;.*;;1;0;0;0;1;0;` +> Windows Explorer. If the window's title bar is hidden, it looks distorted. + +Config_rule_#10=Chrome_WidgetWin_1;.*;;1;0;0;0;1;0; +> Chrome web browser. If the window's title bar is hidden, it looks distorted. + +Config_rule_#11=Chrome_WidgetWin_1;.*;Window_isPopup;0;0;0;1;1;1; +> With the preceding rule overriding #2 Chrome pop-up windows would be treated +as new main windows. + +Config_rule_#12=IEFrame;.*Internet Explorer;;1;0;0;0;1;0; +> Internet Explorer. If the window's title bar is hidden, it looks distorted. + +Config_rule_#13=MozillaWindowClass;.*Mozilla Firefox;;1;0;0;0;1;0; +> Firefox web browser. If the window's title bar is hidden, it looks distorted. + +Config_rule_#14=MozillaDialogClass;.*;;1;0;0;1;1;0; +> These windows are also pop-up windows. + +`Config_ruleCount=14` > This variable will be automatically set to the total number of active rules above. diff --git a/src/Config.ahk b/src/Config.ahk index fef9e7e..eb2cd29 100644 --- a/src/Config.ahk +++ b/src/Config.ahk @@ -79,20 +79,21 @@ Config_init() { Config_viewMargins := "0;0;0;0" ;; Config_rule_# := ';;<function name>;<is managed>;<m>;<tags>;<is floating>;<is decorated>;<hide title>;<action>' - Config_rule_#1 := ".*;.*;;1;0;0;0;0;0;" ;; default rule - Config_rule_#2 := ".*;.*;Window_isPopup;0;0;0;1;1;1;" ;; Pop-up windows (style WS_POPUP) will not be managed, are floating and the titles are hidden. - Config_rule_#3 := "SWT_Window0;.*;;1;0;0;0;0;0;" ;; Windows created by Java (SWT) e. g. Eclipse have the style WS_POPUP, but should be excluded from the second rule. - Config_rule_#4 := "QWidget;.*;;1;0;0;0;0;0;" ;; ... also windows created by QT (QWidget) - Config_rule_#5 := "Xming;.*;;1;0;0;0;0;0;" ;; ... and Xming windows + Config_rule_#1 := ".*;.*;;1;0;0;0;0;0;" + Config_rule_#2 := ".*;.*;Window_isPopup;0;0;0;1;1;1;" + Config_rule_#3 := "QWidget;.*;;1;0;0;0;0;0;" + Config_rule_#4 := "SWT_Window0;.*;;1;0;0;0;0;0;" + Config_rule_#5 := "Xming;.*;;1;0;0;0;0;0;" Config_rule_#6 := "MsiDialog(No)?CloseClass;.*;;1;0;0;1;1;0;" - Config_rule_#7 := "AdobeFlashPlayerInstaller;.*;;1;0;0;1;0;1;" + Config_rule_#7 := "AdobeFlashPlayerInstaller;.*;;1;0;0;1;0;0;" Config_rule_#8 := "CalcFrame;.*;;1;0;0;1;1;0;" - Config_rule_#9 := "MozillaDialogClass;.*;;1;0;0;1;1;0;" - Config_rule_#10 := "_sp;_sp;;1;0;0;1;0;1;" - Config_rule_#11 := "MozillaWindowClass;.*Mozilla Firefox;;1;0;0;0;1;0;maximize" - Config_rule_#12 := "Chrome_WidgetWin_1;.*;;1;0;0;0;1;0;maximize" - ;; @TODO [v9] Config_rule_#13 := "Chrome_WidgetWin_1;.*;0x80000000;0;0;0;1;1;0;" -- else pop-up windows are treated as new main windows, since #12 overrides #2 - Config_ruleCount := 12 ;; This variable has to be set to the total number of active rules above. + Config_rule_#9 := "CabinetWClass;.*;;1;0;0;0;1;0;" + Config_rule_#10 := "Chrome_WidgetWin_1;.*;;1;0;0;0;1;0;" + Config_rule_#11 := "Chrome_WidgetWin_1;.*;Window_isPopup;0;0;0;1;1;1;" + Config_rule_#12 := "IEFrame;.*Internet Explorer;;1;0;0;0;1;0;" + Config_rule_#13 := "MozillaWindowClass;.*Mozilla Firefox;;1;0;0;0;1;0;" + Config_rule_#14 := "MozillaDialogClass;.*;;1;0;0;1;1;0;" + Config_ruleCount := 14 ;; This variable has to be set to the total number of active rules above. ;; Configuration management Config_autoSaveSession := "auto" ;; "off" | "auto" | "ask" @@ -382,6 +383,8 @@ Config_saveSession(original, target) } Config_UI_saveSession() { + Global Config_filePath + Config_saveSession(Config_filePath, Config_filePath) }