updated version (8.2.0.03)

release 8.2.0
This commit is contained in:
joten 2011-09-02 19:46:07 +02:00
parent aeaa677f95
commit c64ce96ec1
11 changed files with 579 additions and 465 deletions

View file

@ -15,19 +15,19 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
* @version 8.2.0.03 (27.07.2011) * @version 8.2.0.03 (31.08.2011)
*/ */
Bar_init(m) { Bar_init(m) {
Local appBarMsg, GuiN, h1, h2, i, text, trayWndId, w, wndId, wndTitle, wndWidth, x1, x2, y1, y2 Local appBarMsg, GuiN, h1, h2, i, text, titleWidth, trayWndId, w, wndId, wndTitle, wndWidth, x1, x2, y1, y2
If (SubStr(Config_barWidth, 0) = "%") { If (SubStr(Config_barWidth, 0) = "%") {
StringTrimRight, Config_barWidth, Config_barWidth, 1 StringTrimRight, wndWidth, Config_barWidth, 1
wndWidth := Monitor_#%m%_width * Config_barWidth / 100 wndWidth := Monitor_#%m%_width * wndWidth / 100
} Else } Else
wndWidth := Config_barWidth wndWidth := Config_barWidth
Monitor_#%m%_barWidth := wndWidth Monitor_#%m%_barWidth := wndWidth
Bar_titleWidth := wndWidth titleWidth := wndWidth
h1 := Bar_ctrlHeight h1 := Bar_ctrlHeight
x1 := 0 x1 := 0
x2 := wndWidth x2 := wndWidth
@ -41,7 +41,7 @@ Bar_init(m) {
Gui, %GuiN%: Default Gui, %GuiN%: Default
IfWinExist, %wndTitle% IfWinExist, %wndTitle%
Gui, Destroy Gui, Destroy
Gui, +LastFound -Caption +ToolWindow +AlwaysOnTop Gui, +AlwaysOnTop -Caption +LabelBar_Gui +LastFound +ToolWindow
Gui, Color, %Config_normBgColor2% Gui, Color, %Config_normBgColor2%
Gui, Font, c%Config_normFgColor1% s%Config_fontSize%, %Config_fontName% Gui, Font, c%Config_normFgColor1% s%Config_fontSize%, %Config_fontName%
@ -50,12 +50,13 @@ Bar_init(m) {
i := A_Index i := A_Index
text := " " i " " text := " " i " "
w := Bar_getTextWidth(text) w := Bar_getTextWidth(text)
Gui, Add, Text, x%x1% y%y1% w%w% h%h1% BackgroundTrans vBar_#%m%_#%i%_view gBar_GuiClick,
If (w <= h1) If (w <= h1)
Gui, Add, Progress, x%x1% y%y1% w%w% h%h1% Vertical vBar_#%m%_#%i%_progress Gui, Add, Progress, x%x1% y%y1% w%w% h%h1% Vertical vBar_#%m%_#%i%_tagged
Else Else
Gui, Add, Progress, x%x1% y%y1% w%w% h%h1% vBar_#%m%_#%i%_progress Gui, Add, Progress, x%x1% y%y1% w%w% h%h1% vBar_#%m%_#%i%_tagged
Gui, Add, Text, x%x1% y%y2% w%w% h%h2% -Wrap Center BackgroundTrans vBar_#%m%_#%i% gBar_tagGuiClick, %text% Gui, Add, Text, x%x1% y%y2% w%w% h%h2% -Wrap Center BackgroundTrans vBar_#%m%_#%i%, %text%
Bar_titleWidth -= w titleWidth -= w
x1 += w x1 += w
} }
; layout ; layout
@ -63,8 +64,8 @@ Bar_init(m) {
text := " ??? " text := " ??? "
w := Bar_getTextWidth(text) w := Bar_getTextWidth(text)
Gui, Font, c%Config_normFgColor2% Gui, Font, c%Config_normFgColor2%
Gui, Add, Text, x%x1% y%y2% w%w% h%h2% -Wrap Center vBar_#%m%_#%i% gBar_layoutGuiClick, %text% Gui, Add, Text, x%x1% y%y2% w%w% h%h2% -Wrap Center vBar_#%m%_#%i% gBar_GuiClick, %text%
Bar_titleWidth -= w titleWidth -= w
x1 += w x1 += w
; The x-position and width of the sub-windows right of the window title are set from the right. ; The x-position and width of the sub-windows right of the window title are set from the right.
@ -75,12 +76,12 @@ Bar_init(m) {
Gui, -Disabled Gui, -Disabled
w := Bar_getTextWidth(" ?? ") w := Bar_getTextWidth(" ?? ")
x2 -= w x2 -= w
Bar_titleWidth -= w titleWidth -= w
Gui, Add, Text, x%x2% y%y2% w%w% h%h2% Center gBar_toggleCommandGui vBar_#%m%_#%i%, #! Gui, Add, Text, x%x2% y%y2% w%w% h%h2% Center gBar_toggleCommandGui vBar_#%m%_#%i%, #!
} Else If (i = Config_viewCount + 5) And Config_readinTime { ; time } Else If (i = Config_viewCount + 5) And Config_readinTime { ; time
w := Bar_getTextWidth(" ??:?? ") w := Bar_getTextWidth(" ??:?? ")
x2 -= w x2 -= w
Bar_titleWidth -= w titleWidth -= w
If Config_readinAny() Or Config_readinBat { If Config_readinAny() Or Config_readinBat {
Gui, Font, c%Config_normFgColor1% Gui, Font, c%Config_normFgColor1%
Gui, Add, Text, x%x2% y%y1% w%w% h%h1% -Background, Gui, Add, Text, x%x2% y%y1% w%w% h%h1% -Background,
@ -88,45 +89,48 @@ Bar_init(m) {
Gui, Add, Text, x%x2% y%y2% w%w% h%h2% BackgroundTrans Center vBar_#%m%_#%i%, ??:?? Gui, Add, Text, x%x2% y%y2% w%w% h%h2% BackgroundTrans Center vBar_#%m%_#%i%, ??:??
} Else If (i = Config_viewCount + 4) And Config_readinAny() { ; any } Else If (i = Config_viewCount + 4) And Config_readinAny() { ; any
text := Config_readinAny() text := Config_readinAny()
w += Bar_getTextWidth(text) w := Bar_getTextWidth(text)
x2 -= w x2 -= w
Bar_titleWidth -= w titleWidth -= w
Gui, Font, c%Config_normFgColor2% Gui, Font, c%Config_normFgColor2%
Gui, Add, Text, x%x2% y%y2% w%w% h%h2% Center vBar_#%m%_#%i%, %text% Gui, Add, Text, x%x2% y%y2% w%w% h%h2% Center vBar_#%m%_#%i%, %text%
} Else If (i = Config_viewCount + 3) And Config_readinBat { ; battery level } Else If (i = Config_viewCount + 3) And Config_readinBat { ; battery level
w := Bar_getTextWidth(" BAT: ???% ") w := Bar_getTextWidth(" BAT: ???% ")
x2 -= w x2 -= w
Bar_titleWidth -= w titleWidth -= w
Gui, Add, Progress, x%x2% y%y1% w%w% h%h1% Background%Config_normBgColor2% c%Config_normFgColor3% vBar_#%m%_#%i%_progress Gui, Add, Progress, x%x2% y%y1% w%w% h%h1% Background%Config_normBgColor2% c%Config_normFgColor3% vBar_#%m%_#%i%_tagged
Gui, Font, c%Config_normFgColor2% Gui, Font, c%Config_normFgColor2%
Gui, Add, Text, x%x2% y%y2% w%w% h%h2% BackgroundTrans Center vBar_#%m%_#%i%, BAT: ???`% Gui, Add, Text, x%x2% y%y2% w%w% h%h2% BackgroundTrans Center vBar_#%m%_#%i%, BAT: ???`%
} }
} }
; window title (remaining space) ; window title (remaining space)
Gui, Add, Text, x%x1% y%y1% w%Bar_titleWidth% h%h1% -Background, Gui, Add, Text, x%x1% y%y1% w%titleWidth% h%h1% -Background,
If Not Config_singleRowBar { If Not Config_singleRowBar {
Bar_titleWidth := wndWidth titleWidth := wndWidth
x1 := 0 x1 := 0
y1 += h1 y1 += h1
y2 += h1 y2 += h1
} }
i := Config_viewCount + 2 i := Config_viewCount + 2
Gui, Font, c%Config_normFgColor1% Gui, Font, c%Config_normFgColor1%
Gui, Add, Text, x%x1% y%y1% w%Bar_titleWidth% h%h1% -Background, Gui, Add, Text, x%x1% y%y1% w%titleWidth% h%h1% -Background,
Gui, Add, Text, x%x1% y%y2% w%Bar_titleWidth% h%h2% BackgroundTrans Center vBar_#%m%_#%i%, Gui, Add, Text, x%x1% y%y2% w%titleWidth% h%h2% BackgroundTrans Center vBar_#%m%_#%i%,
If (Config_horizontalBarPos = "left") If (Config_horizontalBarPos = "left")
x1 := Monitor_#%m%_x x1 := 0
Else If (Config_horizontalBarPos = "right") Else If (Config_horizontalBarPos = "right")
x1 := Monitor_#%m%_x + Monitor_#%m%_width - wndWidth x1 := Monitor_#%m%_width - wndWidth
Else If (Config_horizontalBarPos = "center") Else If (Config_horizontalBarPos = "center")
x1 := Monitor_#%m%_x + (Monitor_#%m%_width - wndWidth) / 2 x1 := (Monitor_#%m%_width - wndWidth) / 2
Else If (Config_horizontalBarPos => 0) Else If (Config_horizontalBarPos => 0)
x1 := Monitor_#%m%_x + Config_horizontalBarPos x1 := Config_horizontalBarPos
Else If (Config_horizontalBarPos < 0) Else If (Config_horizontalBarPos < 0)
x1 := Monitor_#%m%_x + Monitor_#%m%_width - wndWidth + Config_horizontalBarPos x1 := Monitor_#%m%_width - wndWidth + Config_horizontalBarPos
If Not (Config_verticalBarPos = "tray" And m = Manager_taskBarMonitor)
x1 += Monitor_#%m%_x
Bar_#%m%_titleWidth := titleWidth
Monitor_#%m%_barX := x1 Monitor_#%m%_barX := x1
y1 := Monitor_#%m%_barY y1 := Monitor_#%m%_barY
@ -135,7 +139,7 @@ Bar_init(m) {
Else Else
Gui, Show, +NoActivate Hide x%x1% y%y1% w%wndWidth% h%Bar_height%, %wndTitle% Gui, Show, +NoActivate Hide x%x1% y%y1% w%wndWidth% h%Bar_height%, %wndTitle%
wndId := WinExist(wndTitle) wndId := WinExist(wndTitle)
If (Config_verticalBarPos = "tray") { If (Config_verticalBarPos = "tray" And m = Manager_taskBarMonitor) {
trayWndId := WinExist("ahk_class Shell_TrayWnd") trayWndId := WinExist("ahk_class Shell_TrayWnd")
DllCall("SetParent", "UInt", wndId, "UInt", trayWndId) DllCall("SetParent", "UInt", wndId, "UInt", trayWndId)
} Else { } Else {
@ -454,21 +458,30 @@ Bar_getTextWidth(x, reverse=False) {
Return, textWidth Return, textWidth
} }
Bar_layoutGuiClick: Bar_GuiClick:
Manager_winActivate(Bar_aWndId) Manager_winActivate(Bar_aWndId)
If (A_GuiEvent = "Normal") { If (A_GuiEvent = "Normal") {
If Not (SubStr(A_GuiControl, 5, InStr(A_GuiControl, "][")-5) = Manager_aMonitor) If Not (SubStr(A_GuiControl, 6, InStr(A_GuiControl, "_#", False, 0) - 6) = Manager_aMonitor)
Manager_activateMonitor(SubStr(A_GuiControl, 5, InStr(A_GuiControl, "][")-5) - Manager_aMonitor) Manager_activateMonitor(SubStr(A_GuiControl, 6, InStr(A_GuiControl, "_#", False, 0) - 6) - Manager_aMonitor)
If (SubStr(A_GuiControl, -2) = "_#6")
View_setLayout(-1) View_setLayout(-1)
Else If (SubStr(A_GuiControl, -4) = "_view")
Monitor_activateView(SubStr(A_GuiControl, InStr(A_GuiControl, "_#", False, 0) + 2, 1))
} }
Return Return
Bar_layoutGuiContextMenu: Bar_GuiContextMenu:
Manager_winActivate(Bar_aWndId) Manager_winActivate(Bar_aWndId)
If (A_GuiEvent = "RightClick") { If (A_GuiEvent = "RightClick") {
If Not (SubStr(A_GuiControl, 5, InStr(A_GuiControl, "][")-5) = Manager_aMonitor) If (SubStr(A_GuiControl, -2) = "_#6") {
Manager_activateMonitor(SubStr(A_GuiControl, 5, InStr(A_GuiControl, "][")-5) - Manager_aMonitor) If Not (SubStr(A_GuiControl, 6, InStr(A_GuiControl, "_#", False, 0) - 6) = Manager_aMonitor)
Manager_activateMonitor(SubStr(A_GuiControl, 6, InStr(A_GuiControl, "_#", False, 0) - 6) - Manager_aMonitor)
View_setLayout(">") View_setLayout(">")
} Else If (SubStr(A_GuiControl, -4) = "_view") {
If Not (SubStr(A_GuiControl, 6, InStr(A_GuiControl, "_#", False, 0) - 6) = Manager_aMonitor)
Manager_setWindowMonitor(SubStr(A_GuiControl, 6, InStr(A_GuiControl, "_#", False, 0) - 6) - Manager_aMonitor)
Monitor_setWindowTag(SubStr(A_GuiControl, InStr(A_GuiControl, "_#", False, 0) + 2, 1))
}
} }
Return Return
@ -486,28 +499,10 @@ Bar_move(m) {
WinMove, %wndTitle%, , %x%, %y% WinMove, %wndTitle%, , %x%, %y%
} }
Bar_tagGuiClick:
Manager_winActivate(Bar_aWndId)
If (A_GuiEvent = "Normal") {
If Not (SubStr(A_GuiControl, 5, InStr(A_GuiControl, "][")-5) = Manager_aMonitor)
Manager_activateMonitor(SubStr(A_GuiControl, 5, InStr(A_GuiControl, "][")-5) - Manager_aMonitor)
Monitor_activateView(SubStr(A_GuiControl, InStr(A_GuiControl, "][")+2, 1))
}
Return
Bar_tagGuiContextMenu:
Manager_winActivate(Bar_aWndId)
If (A_GuiEvent = "RightClick") {
If Not (SubStr(A_GuiControl, 5, InStr(A_GuiControl, "][")-5) = Manager_aMonitor)
Manager_setWindowMonitor(SubStr(A_GuiControl, 5, InStr(A_GuiControl, "][")-5) - Manager_aMonitor)
Monitor_setWindowTag(SubStr(A_GuiControl, InStr(A_GuiControl, "][")+2, 1))
}
Return
Bar_toggleCommandGui: Bar_toggleCommandGui:
If Not Bar_cmdGuiIsVisible If Not Bar_cmdGuiIsVisible
If Not (SubStr(A_GuiControl, 5, InStr(A_GuiControl, "][")-5) = Manager_aMonitor) If Not (SubStr(A_GuiControl, 6, InStr(A_GuiControl, "_#", False, 0) - 6) = Manager_aMonitor)
Manager_activateMonitor(SubStr(A_GuiControl, 5, InStr(A_GuiControl, "][")-5) - Manager_aMonitor) Manager_activateMonitor(SubStr(A_GuiControl, 6, InStr(A_GuiControl, "_#", False, 0) - 6) - Manager_aMonitor)
Bar_toggleCommandGui() Bar_toggleCommandGui()
Return Return
@ -522,10 +517,10 @@ Bar_toggleCommandGui() {
} Else { } Else {
Bar_cmdGuiIsVisible := True Bar_cmdGuiIsVisible := True
x := Monitor_#%Manager_aMonitor%_barX + Monitor_#%Manager_aMonitor%_barWidth - Bar_#0_#0W x := Monitor_#%Manager_aMonitor%_barX + Monitor_#%Manager_aMonitor%_barWidth - Bar_#0_#0W
If (Config_verticalBarPos = "top") If (Config_verticalBarPos = "top") Or (Config_verticalBarPos = "tray" And Not Manager_aMonitor = Manager_taskBarMonitor)
y := Monitor_#%Manager_aMonitor%_y y := Monitor_#%Manager_aMonitor%_y
Else Else
y := Monitor_#%Manager_aMonitor%_barY + Bar_#0_#0H y := Monitor_#%Manager_aMonitor%_y + Monitor_#%Manager_aMonitor%_height - Bar_#0_#0H
Gui, Show Gui, Show
WinMove, bug.n_BAR_0, , %x%, %y% WinMove, bug.n_BAR_0, , %x%, %y%
WinGet, wndId, ID, bug.n_BAR_0 WinGet, wndId, ID, bug.n_BAR_0
@ -566,16 +561,16 @@ Bar_updateStatus() {
b3 := SubStr(" " b1, -2) b3 := SubStr(" " b1, -2)
i := Config_viewCount + 3 i := Config_viewCount + 3
If (b1 < 10) And (b2 = "off") { ; change the color, if the battery level is below 10% If (b1 < 10) And (b2 = "off") { ; change the color, if the battery level is below 10%
GuiControl, +Background%Config_normBgColor4% +c%Config_normBgColor2%, Bar_#%m%_#%i%_progress GuiControl, +Background%Config_normBgColor4% +c%Config_normBgColor2%, Bar_#%m%_#%i%_tagged
GuiControl, +c%Config_selFgColor6%, Bar_#%m%_#%i% GuiControl, +c%Config_selFgColor6%, Bar_#%m%_#%i%
} Else If (b2 = "off") { ; change the color, if the pc is not plugged in } Else If (b2 = "off") { ; change the color, if the pc is not plugged in
GuiControl, +Background%Config_normBgColor2% +c%Config_normFgColor5%, Bar_#%m%_#%i%_progress GuiControl, +Background%Config_normBgColor2% +c%Config_normFgColor5%, Bar_#%m%_#%i%_tagged
GuiControl, +c%Config_normFgColor4%, Bar_#%m%_#%i% GuiControl, +c%Config_normFgColor4%, Bar_#%m%_#%i%
} Else { } Else {
GuiControl, +Background%Config_normBgColor3% +c%Config_normFgColor3%, Bar_#%m%_#%i%_progress GuiControl, +Background%Config_normBgColor3% +c%Config_normFgColor3%, Bar_#%m%_#%i%_tagged
GuiControl, +c%Config_normFgColor2%, Bar_#%m%_#%i% GuiControl, +c%Config_normFgColor2%, Bar_#%m%_#%i%
} }
GuiControl, , Bar_#%m%_#%i%_progress, %b3% GuiControl, , Bar_#%m%_#%i%_tagged, %b3%
GuiControl, , Bar_#%m%_#%i%, % " BAT: " b3 "% " GuiControl, , Bar_#%m%_#%i%, % " BAT: " b3 "% "
} }
anyText := Config_readinAny() anyText := Config_readinAny()
@ -583,7 +578,7 @@ Bar_updateStatus() {
i := Config_viewCount + 4 i := Config_viewCount + 4
GuiControlGet, anyContent, , Bar_#%m%_#%i% GuiControlGet, anyContent, , Bar_#%m%_#%i%
If Not (anyText = anyContent) If Not (anyText = anyContent)
GuiControl, Bar_#%m%_#%i%, % anyText GuiControl, , Bar_#%m%_#%i%, % anyText
} }
If Config_readinTime { If Config_readinTime {
i := Config_viewCount + 5 i := Config_viewCount + 5
@ -592,21 +587,25 @@ Bar_updateStatus() {
} }
} }
Bar_updateTitle() { Bar_updateTitle(debugMsg = "") {
Local aWndId, aWndTitle, content, GuiN, i, title Local aWndId, aWndTitle, content, GuiN, i, title
If debugMsg
aWndTitle := debugMsg
Else {
WinGet, aWndId, ID, A WinGet, aWndId, ID, A
WinGetTitle, aWndTitle, ahk_id %aWndId% WinGetTitle, aWndTitle, ahk_id %aWndId%
If InStr(Bar_hideTitleWndIds, aWndId . ";") If InStr(Bar_hideTitleWndIds, aWndId ";") Or (aWndTitle = "bug.n_BAR_0")
aWndTitle := "" aWndTitle := ""
If Manager_#%aWndId%_isFloating If Manager_#%aWndId%_isFloating
aWndTitle := "~ " aWndTitle aWndTitle := "~ " aWndTitle
If (Manager_monitorCount > 1) If (Manager_monitorCount > 1)
aWndTitle := "[" Manager_aMonitor "] " aWndTitle aWndTitle := "[" Manager_aMonitor "] " aWndTitle
}
title := " " . aWndTitle . " " title := " " . aWndTitle . " "
If (Bar_getTextWidth(title) > Bar_titleWidth) { ; shorten the window title if its length exceeds the width of the bar If (Bar_getTextWidth(title) > Bar_#%Manager_aMonitor%_titleWidth) { ; shorten the window title if its length exceeds the width of the bar
i := Bar_getTextWidth(Bar_titleWidth, True) - 6 i := Bar_getTextWidth(Bar_#%Manager_aMonitor%_titleWidth, True) - 6
StringLeft, title, aWndTitle, i StringLeft, title, aWndTitle, i
title := " " . title . " ... " title := " " . title . " ... "
} }
@ -615,11 +614,11 @@ Bar_updateTitle() {
Loop, % Manager_monitorCount { Loop, % Manager_monitorCount {
GuiN := (A_Index - 1) + 1 GuiN := (A_Index - 1) + 1
Gui, %GuiN%: Default Gui, %GuiN%: Default
If (A_Index = Manager_aMonitor) {
GuiControlGet, content, , Bar_#%A_Index%_#%i% GuiControlGet, content, , Bar_#%A_Index%_#%i%
If Not (title = content) If (A_Index = Manager_aMonitor) {
If Not (content = title)
GuiControl, , Bar_#%A_Index%_#%i%, % title GuiControl, , Bar_#%A_Index%_#%i%, % title
} Else } Else If Not (content = "")
GuiControl, , Bar_#%A_Index%_#%i%, GuiControl, , Bar_#%A_Index%_#%i%,
} }
Bar_aWndId := aWndId Bar_aWndId := aWndId
@ -637,16 +636,16 @@ Bar_updateView(m, v) {
StringSplit, wndId, wndIds, `; StringSplit, wndId, wndIds, `;
If (A_Index = v) If (A_Index = v)
If (v = Monitor_#%m%_aView_#1) { If (v = Monitor_#%m%_aView_#1) {
GuiControl, +Background%Config_selBgColor1% +c%Config_selFgColor2%, Bar_#%m%_#%v%_progress GuiControl, +Background%Config_selBgColor1% +c%Config_selFgColor2%, Bar_#%m%_#%v%_tagged
GuiControl, +c%Config_selFgColor1%, Bar_#%m%_#%v% GuiControl, +c%Config_selFgColor1%, Bar_#%m%_#%v%
} Else If wndId0 { } Else If wndId0 {
GuiControl, +Background%Config_normBgColor5% +c%Config_normFgColor8%, Bar_#%m%_#%v%_progress GuiControl, +Background%Config_normBgColor5% +c%Config_normFgColor8%, Bar_#%m%_#%v%_tagged
GuiControl, +c%Config_normFgColor7%, Bar_#%m%_#%v% GuiControl, +c%Config_normFgColor7%, Bar_#%m%_#%v%
} Else { } Else {
GuiControl, +Background%Config_normBgColor1% +c%Config_normFgColor8%, Bar_#%m%_#%v%_progress GuiControl, +Background%Config_normBgColor1% +c%Config_normFgColor8%, Bar_#%m%_#%v%_tagged
GuiControl, +c%Config_normFgColor1%, Bar_#%m%_#%v% GuiControl, +c%Config_normFgColor1%, Bar_#%m%_#%v%
} }
GuiControl, , Bar_#%m%_#%A_Index%_progress, % wndId0 / managedWndId0 * 100 GuiControl, , Bar_#%m%_#%A_Index%_tagged, % wndId0 / managedWndId0 * 100
GuiControl, , Bar_#%m%_#%A_Index%, %A_Index% GuiControl, , Bar_#%m%_#%A_Index%, %A_Index%
} }
} }

View file

@ -15,11 +15,11 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
* @version 8.2.0.03 (27.07.2011) * @version 8.2.0.03 (02.09.2011)
*/ */
Config_init() { Config_init() {
Local i, key, layout0, layout1, layout2, layout_#1, layout_#2, layout_#3 Local i, key, layout0, layout1, layout2
; status bar ; status bar
Config_showBar := True ; If false, the bar is hidden. It can be made visible or hidden by hotkey (see below). Config_showBar := True ; If false, the bar is hidden. It can be made visible or hidden by hotkey (see below).
@ -45,56 +45,52 @@ Config_init() {
; Config_borderWidth, Config_borderPadding and Config_selBorderColor are especially usefull, if you are not allowed to set the design in the system settings. ; Config_borderWidth, Config_borderPadding and Config_selBorderColor are especially usefull, if you are not allowed to set the design in the system settings.
; window arrangement ; window arrangement
Config_viewCount := 9 ; The total number of views. This has effects on the displayed groups in the bar, and should not be exceeded in the hotkeys below. Config_viewCount := 9 ; The total number of views. This has effects on the displayed groups in the bar, and should not be exceeded in the hotkeys below.
layout_#1 := "[]=;tile" ; The layout symbol and arrange function (the first entry is set as the default layout, no layout function means floating behavior) Config_layout_#1 := "[]=;tile" ; The layout symbol and arrange function (the first entry is set as the default layout, no layout function means floating behavior)
layout_#2 := "[M];monocle" Config_layout_#2 := "[M];monocle"
layout_#3 := "><>;" Config_layout_#3 := "><>;"
Config_layoutCount := 3 ; Total number of layouts defined above. Config_layoutCount := 3 ; Total number of layouts defined above.
Config_layoutAxis_#1 := 1 ; The layout axis: 1 = x, 2 = y; negative values mirror the layout, setting the master area to the right / bottom instead of left / top. Config_layoutAxis_#1 := 1 ; The layout axis: 1 = x, 2 = y; negative values mirror the layout, setting the master area to the right / bottom instead of left / top.
Config_layoutAxis_#2 := 2 ; The master axis: 1 = x (from left to right), 2 = y (from top to bottom), 3 = z (monocle). Config_layoutAxis_#2 := 2 ; The master axis: 1 = x (from left to right), 2 = y (from top to bottom), 3 = z (monocle).
Config_layoutAxis_#3 := 2 ; The stack axis: 1 = x (from left to right), 2 = y (from top to bottom), 3 = z (monocle). Config_layoutAxis_#3 := 2 ; The stack axis: 1 = x (from left to right), 2 = y (from top to bottom), 3 = z (monocle).
Config_layoutMFactor := 0.6 ; The factor for the size of the master area, which is multiplied by the monitor size. Config_layoutMFactor := 0.6 ; The factor for the size of the master area, which is multiplied by the monitor size.
Config_monitorFollowsMouse := False ; If true, the active monitor is determined by the position of the mouse pointer, if a window is opened; therefor the newly opened window will be moved there by default.
Config_mouseFollowsFocus := True ; If true, the mouse pointer is set over the focused window, if a window is activated by bug.n. Config_mouseFollowsFocus := True ; If true, the mouse pointer is set over the focused window, if a window is activated by bug.n.
Config_shellMsgDelay := 350 ; The time bug.n waits after a shell message (a window is opened, closed or the focus has been changed); if there are any problems recognizing, when windows are opened or closed, try to increase this number. Config_shellMsgDelay := 350 ; The time bug.n waits after a shell message (a window is opened, closed or the focus has been changed); if there are any problems recognizing, when windows are opened or closed, try to increase this number.
Config_viewFollowsTagged := False ; If true, the view is set to, if a window is tagged with a single tag. Config_syncMonitorViews := 0 ; The number of monitors (2 or more), for which views should be activated, when using the accordant hotkey. If set to 1, the views are actiated for all monitors. If set to 0, views are activated independently (only on the active monitor).
Config_viewFollowsTagged := False ; If true and a window is tagged with a single tag, the view is correspondingly set to the tag.
; Config_rules_#i := "<class (regular expression string)>;<title (regular expression string)>;<window style (hexadecimal number or blank)>;<is managed (1 = True or 0 = False)>;<monitor (0 <= integer <= total number of monitors, 0 means the currently active monitor)>;<tags (binary mask as integer >= 0, e. g. 17 for 1 and 5, 0 means the currently active tag)>;<is floating (1 = True or 0 = False)>;<is decorated (1 = True or 0 = False)>;<hide title (1 = True or 0 = False)>" (";" is not allowed as a character) ; Config_rule_#i := "<class (regular expression string)>;<title (regular expression string)>;<window style (hexadecimal number or blank)>;
Config_rules_#1 := ".*;.*;;1;0;0;0;0;0" ; At first you may set a default rule (.*;.*;) for a default monitor, view and / or showing window title bars. ; <is managed (1 = True or 0 = False)>;
Config_rules_#2 := ".*;.*;0x80000000;0;0;0;1;1;1" ; Pop-up windows (style WS_POPUP=0x80000000) will not be managed, are floating and the titles are hidden. ; <monitor (0 <= integer <= total number of monitors, 0 means the currently active monitor)>;
Config_rules_#3 := "SWT_Window0;.*;;1;0;0;0;0;0" ; Windows created by Java (SWT) e. g. Eclipse have the style WS_POPUP, but should excluded from the above rule. ; <tags (binary mask as integer >= 0, e. g. 17 for 1 and 5, 0 means the currently active tag)>;
Config_rules_#4 := "Xming;.*;;1;0;0;0;0;0" ; Xming windows have the style WS_POPUP, but should be excluded from the above rule. ; <is floating (1 = True or 0 = False)>;<is decorated (1 = True or 0 = False)>;<hide title (1 = True or 0 = False)>"
Config_rules_#5 := "_sp;_sp;;1;0;0;1;0;1" ; (";" is not allowed as a character)
Config_rules_#6 := "MozillaDialogClass;.*;;1;0;0;1;1;0" Config_rule_#1 := ".*;.*;;1;0;0;0;0;0" ; At first you may set a default rule (.*;.*;) for a default monitor, view and / or showing window title bars.
Config_rules_#7 := "MsiDialog(No)?CloseClass;.*;;1;0;0;1;1;0" Config_rule_#2 := ".*;.*;0x80000000;0;0;0;1;1;1" ; Pop-up windows (style WS_POPUP=0x80000000) will not be managed, are floating and the titles are hidden.
Config_rules_#8 := "gdkWindowToplevel;GIMP-Start;;1;0;0;1;1;0" 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 excluded from the above rule.
Config_rules_#9 := "gdkWindowToplevel;GNU Image Manipulation Program;;1;0;0;1;1;0" Config_rule_#4 := "Xming;.*;;1;0;0;0;0;0" ; Xming windows have the style WS_POPUP, but should be excluded from the above rule.
Config_rules_#10 := "gdkWindowToplevel;Werkzeugkasten;;1;0;0;1;1;0" Config_rule_#5 := "MsiDialog(No)?CloseClass;.*;;1;0;0;1;1;0"
Config_rules_#11 := "gdkWindowToplevel;Ebenen, .* - Pinsel, Muster, .*;;1;0;0;1;1;0" Config_rule_#6 := "AdobeFlashPlayerInstaller;.*;;1;0;0;1;0;1"
Config_rules_#12 := "gdkWindowToplevel;Toolbox;;1;0;0;1;1;0" Config_rule_#7 := "CalcFrame;.*;;1;0;0;1;1;0"
Config_rules_#13 := "gdkWindowToplevel;Layers, Channels, Paths, .*;;1;0;0;1;1;0" Config_rule_#8 := "_sp;_sp;;1;0;0;1;0;1"
Config_rules_#14 := "CalcFrame;.*;;1;0;0;1;1;0" Config_rule_#9 := "MozillaDialogClass;.*;;1;0;0;1;1;0"
Config_rulesCount := 14 ; This variable has to be set to the total number of active rules above. Config_rule_#10 := "gdkWindowToplevel;GIMP-Start;;1;0;0;1;1;0"
Config_rule_#11 := "gdkWindowToplevel;GNU Image Manipulation Program;;1;0;0;1;1;0"
Config_rule_#12 := "gdkWindowToplevel;Werkzeugkasten;;1;0;0;1;1;0"
Config_rule_#13 := "gdkWindowToplevel;Ebenen, .* - Pinsel, Muster, .*;;1;0;0;1;1;0"
Config_rule_#14 := "gdkWindowToplevel;Toolbox;;1;0;0;1;1;0"
Config_rule_#15 := "gdkWindowToplevel;Layers, Channels, Paths, .*;;1;0;0;1;1;0"
Config_ruleCount := 15 ; This variable has to be set to the total number of active rules above.
; session management ; configuration management
Config_autoSaveSession := False ; Automatically save the current state of monitors, views, layouts (active view, layout, axes, mfact and msplit) to te session file (set below) when quitting bug.n. Config_autoSaveSession := False ; Automatically save the current state of monitors, views, layouts (active view, layout, axes, mfact and msplit) to the configuration file (set below) when quitting bug.n.
If Not Config_sessionFilePath ; The file path, to which the session is saved. This target directory must be writable by the user (%A_ScriptDir% is the diretory, in which "Main.ahk" or the executable of bug.n is saved). If Not Config_filePath ; The file path, to which the configuration and session is saved. This target directory must be writable by the user (%A_ScriptDir% is the diretory, in which "Main.ahk" or the executable of bug.n is saved).
Config_sessionFilePath := A_ScriptDir "\Session.ini" Config_filePath := A_ScriptDir "\Config.ini"
Session_restore("Config") Config_restore("Config")
Config_getSystemSettings() Config_getSystemSettings()
Config_initColors() Config_initColors()
Loop, % Config_hotkeyCount {
i := InStr(Config_hotkey_#%A_Index%, "::")
Config_hotkey_#%A_index%_key := SubStr(Config_hotkey_#%A_Index%, 1, i - 1)
Config_hotkey_#%A_index%_command := SubStr(Config_hotkey_#%A_Index%, i + 2)
key := Config_hotkey_#%A_index%_key
If Not Config_hotkey_#%A_index%_command
Hotkey, %key%, Off
Else
Hotkey, %key%, Config_hotkeyLabel
}
Loop, % Config_layoutCount { Loop, % Config_layoutCount {
StringSplit, layout, layout_#%A_Index%, `; StringSplit, layout, Config_layout_#%A_Index%, `;
Config_layoutFunction_#%A_Index% := layout2 Config_layoutFunction_#%A_Index% := layout2
Config_layoutSymbol_#%A_Index% := layout1 Config_layoutSymbol_#%A_Index% := layout1
} }
@ -233,6 +229,8 @@ Config_redirectHotkey(key) {
Run, %parameters% Run, %parameters%
} Else If (type = "Send ") } Else If (type = "Send ")
Send % SubStr(Config_hotkey_#%A_index%_command, 6) Send % SubStr(Config_hotkey_#%A_index%_command, 6)
Else If (type = "Reloa")
Reload
Else { Else {
i := InStr(Config_hotkey_#%A_index%_command, "(") i := InStr(Config_hotkey_#%A_index%_command, "(")
j := InStr(Config_hotkey_#%A_index%_command, ")", False, i) j := InStr(Config_hotkey_#%A_index%_command, ")", False, i)
@ -252,13 +250,100 @@ Config_redirectHotkey(key) {
} }
} }
Config_restore(section, m = 0) {
Local cmd, i, key, type, val, var
If FileExist(Config_filePath) {
If (section = "Config") {
Loop, READ, %Config_filePath%
If (SubStr(A_LoopReadLine, 1, 7) = "Config_") {
i := InStr(A_LoopReadLine, "=")
var := SubStr(A_LoopReadLine, 1, i - 1)
val := SubStr(A_LoopReadLine, i + 1)
type := SubStr(var, 1, 13)
If (type = "Config_hotkey") {
i := InStr(val, "::")
key := SubStr(val, 1, i - 1)
cmd := SubStr(val, i + 2)
If Not cmd
Hotkey, %key%, Off
Else {
Config_hotkeyCount += 1
Config_hotkey_#%Config_hotkeyCount%_key := key
Config_hotkey_#%Config_hotkeyCount%_command := cmd
Hotkey, %key%, Config_hotkeyLabel
}
} Else If (type = "Config_rule") {
i := 0
If InStr(var, "Config_rule_#")
i := SubStr(var, 14)
If (i = 0 Or i > Config_ruleCount) {
Config_ruleCount += 1
i := Config_ruleCount
}
var := "Config_rule_#" i
}
%var% := val
}
} Else If (section = "Monitor") {
Loop, READ, %Config_filePath%
If (SubStr(A_LoopReadLine, 1, 10 + StrLen(m)) = "Monitor_#" m "_" Or SubStr(A_LoopReadLine, 1, 8 + StrLen(m)) = "View_#" m "_#") {
i := InStr(A_LoopReadLine, "=")
var := SubStr(A_LoopReadLine, 1, i - 1)
val := SubStr(A_LoopReadLine, i + 1)
%var% := val
}
}
}
}
Config_saveSession() {
Local m, text
text := "; bug.n - tiling window management`n; @version " VERSION " (" A_DD "." A_MM "." A_YYYY ")`n`n"
If FileExist(Config_filePath) {
Loop, READ, %Config_filePath%
If (SubStr(A_LoopReadLine, 1, 7) = "Config_")
text .= A_LoopReadLine "`n"
text .= "`n"
}
FileDelete, %Config_filePath%
Loop, % Manager_monitorCount {
m := A_Index
If Not (Monitor_#%m%_aView_#1 = 1)
text .= "Monitor_#" m "_aView_#1=" Monitor_#%m%_aView_#1 "`n"
If Not (Monitor_#%m%_aView_#2 = 1)
text .= "Monitor_#" m "_aView_#2=" Monitor_#%m%_aView_#2 "`n"
If Not (Monitor_#%m%_showBar = Config_showBar)
text .= "Monitor_#" m "_showBar=" Monitor_#%m%_showBar "`n"
Loop, % Config_viewCount {
If Not (View_#%m%_#%A_Index%_layout_#1 = 1)
text .= "View_#" m "_#" A_Index "_layout_#1=" View_#%m%_#%A_Index%_layout_#1 "`n"
If Not (View_#%m%_#%A_Index%_layout_#2 = 1)
text .= "View_#" m "_#" A_Index "_layout_#2=" View_#%m%_#%A_Index%_layout_#2 "`n"
If Not (View_#%m%_#%A_Index%_layoutAxis_#1 = Config_layoutAxis_#1)
text .= "View_#" m "_#" A_Index "_layoutAxis_#1=" View_#%m%_#%A_Index%_layoutAxis_#1 "`n"
If Not (View_#%m%_#%A_Index%_layoutAxis_#2 = Config_layoutAxis_#2)
text .= "View_#" m "_#" A_Index "_layoutAxis_#2=" View_#%m%_#%A_Index%_layoutAxis_#2 "`n"
If Not (View_#%m%_#%A_Index%_layoutAxis_#3 = Config_layoutAxis_#3)
text .= "View_#" m "_#" A_Index "_layoutAxis_#3=" View_#%m%_#%A_Index%_layoutAxis_#3 "`n"
If Not (View_#%m%_#%A_Index%_layoutMFact = Config_layoutMFactor)
text .= "View_#" m "_#" A_Index "_layoutMFact=" View_#%m%_#%A_Index%_layoutMFact "`n"
If Not (View_#%m%_#%A_Index%_layoutMSplit = 1)
text .= "View_#" m "_#" A_Index "_layoutMSplit=" View_#%m%_#%A_Index%_layoutMSplit "`n"
}
}
FileAppend, %text%, %Config_filePath%
}
/** /**
* key definitions * key definitions
* *
* format: <modifier><key>::<function>(<argument>) * format: <modifier><key>::<function>(<argument>)
* modifier: ! = Alt (Mod1Mask), ^ = Ctrl (ControlMask), + = Shift (ShiftMask), # = LWin (Mod4Mask) * modifier: ! = Alt (Mod1Mask), ^ = Ctrl (ControlMask), + = Shift (ShiftMask), # = LWin (Mod4Mask)
*/ */
#Down::View_activateWindow(+1) ; Activate the next window in the active view. #Down::View_activateWindow(+1) ; Activate the next window in the active view.
#Up::View_activateWindow(-1) ; Activate the previous window in the active view. #Up::View_activateWindow(-1) ; Activate the previous window in the active view.
#+Down::View_shuffleWindow(+1) ; Move the active window to the next position in the window list of the view. #+Down::View_shuffleWindow(+1) ; Move the active window to the next position in the window list of the view.
@ -326,7 +411,6 @@ Config_redirectHotkey(key) {
#+Space::Monitor_toggleBar() ; Hide / Show the bar (bug.n status bar) on the active monitor. #+Space::Monitor_toggleBar() ; Hide / Show the bar (bug.n status bar) on the active monitor.
#Space::Monitor_toggleTaskBar() ; Hide / Show the task bar. #Space::Monitor_toggleTaskBar() ; Hide / Show the task bar.
#y::Bar_toggleCommandGui() ; Open the command GUI for executing programmes or bug.n functions. #y::Bar_toggleCommandGui() ; Open the command GUI for executing programmes or bug.n functions.
#^e::Run, edit, %Config_sessionFilePath% ; Open the session file in the standard text editor. #^e::Run, edit %Config_filePath% ; Open the configuration file in the standard text editor.
#^s::Session_save() ; Save the current state of monitors, views, layouts. #^s::Config_saveSession() ; Save the current state of monitors, views, layouts to the configuration file.
#^r::Reload ; For resetting the confguration, if running bug.n as an Autohotkey script.
#^q::ExitApp ; Quit bug.n, restore the default Windows UI and show all windows. #^q::ExitApp ; Quit bug.n, restore the default Windows UI and show all windows.

View file

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
* @version 8.2.0.01 (16.02.2011) * @version 8.2.0.03 (21.08.2011)
*/ */
NAME := "bug.n" NAME := "bug.n"
@ -33,7 +33,7 @@ SetWinDelay, 10
; pseudo main function ; pseudo main function
If 0 = 1 If 0 = 1
Config_sessionFilePath = %1% Config_filePath = %1%
Config_init() Config_init()
Menu, Tray, Tip, %NAME% %VERSION% Menu, Tray, Tip, %NAME% %VERSION%
@ -53,7 +53,7 @@ Return ; end of the auto-execute section
*/ */
Main_cleanup: ; The labels with "ExitApp" or "Return" at the end and hotkeys have to be after the auto-execute section. Main_cleanup: ; The labels with "ExitApp" or "Return" at the end and hotkeys have to be after the auto-execute section.
If Config_autoSaveSession If Config_autoSaveSession
Session_save() Config_saveSession()
Manager_cleanup() Manager_cleanup()
ExitApp ExitApp
@ -73,5 +73,4 @@ Return
#Include Config.ahk #Include Config.ahk
#Include Manager.ahk #Include Manager.ahk
#Include Monitor.ahk #Include Monitor.ahk
#Include Session.ahk
#Include View.ahk #Include View.ahk

View file

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
* @version 8.2.0.03 (27.07.2011) * @version 8.2.0.03 (02.09.2011)
*/ */
Manager_init() { Manager_init() {
@ -71,16 +71,19 @@ Manager_init() {
} }
Manager_activateMonitor(d) { Manager_activateMonitor(d) {
Local aView, aWndClass, aWndId, v, wndId Local aView, aWndClass, aWndHeight, aWndId, aWndWidth, aWndX, aWndY, v, wndId
If (Manager_monitorCount > 1) { If (Manager_monitorCount > 1) {
aView := Monitor_#%Manager_aMonitor%_aView_#1 aView := Monitor_#%Manager_aMonitor%_aView_#1
WinGet, aWndId, ID, A WinGet, aWndId, ID, A
If WinExist("ahk_id" aWndId) { If WinExist("ahk_id" aWndId) {
WinGetClass, aWndClass, ahk_id %aWndId% WinGetClass, aWndClass, ahk_id %aWndId%
If Not (aWndClass = "Progman") And Not (aWndClass = "AutoHotkeyGui") And Not (aWndClass = "DesktopBackgroundClass") If Not (aWndClass = "Progman") And Not (aWndClass = "AutoHotkeyGui") And Not (aWndClass = "DesktopBackgroundClass") {
WinGetPos, aWndX, aWndY, aWndWidth, aWndHeight, ahk_id %aWndId%
If (Monitor_get(aWndX + aWndWidth / 2, aWndY + aWndHeight / 2) = Manager_aMonitor)
View_#%Manager_aMonitor%_#%aView%_aWndId := aWndId View_#%Manager_aMonitor%_#%aView%_aWndId := aWndId
} }
}
Manager_aMonitor := Manager_loop(Manager_aMonitor, d, 1, Manager_monitorCount) Manager_aMonitor := Manager_loop(Manager_aMonitor, d, 1, Manager_monitorCount)
v := Monitor_#%Manager_aMonitor%_aView_#1 v := Monitor_#%Manager_aMonitor%_aView_#1
@ -111,8 +114,8 @@ Manager_applyRules(wndId, ByRef isManaged, ByRef m, ByRef tags, ByRef isFloating
WinGetPos, wndX, wndY, wndWidth, wndHeight, ahk_id %wndId% WinGetPos, wndX, wndY, wndWidth, wndHeight, ahk_id %wndId%
WinGet, wndStyle, Style, ahk_id %wndId% WinGet, wndStyle, Style, ahk_id %wndId%
If wndClass And wndTitle And Not (wndX < -4999) And Not (wndY < -4999) { If wndClass And wndTitle And Not (wndX < -4999) And Not (wndY < -4999) {
Loop, % Config_rulesCount { Loop, % Config_ruleCount {
StringSplit, rule, Config_rules_#%A_index%, `; StringSplit, rule, Config_rule_#%A_index%, `;
If RegExMatch(wndClass . ";" . wndTitle, rule1 . ";" . rule2) And (rule3 = "" Or wndStyle & rule3) { ; The last matching rule is returned. If RegExMatch(wndClass . ";" . wndTitle, rule1 . ";" . rule2) And (rule3 = "" Or wndStyle & rule3) { ; The last matching rule is returned.
isManaged := rule4 isManaged := rule4
m := rule5 m := rule5
@ -122,13 +125,8 @@ Manager_applyRules(wndId, ByRef isManaged, ByRef m, ByRef tags, ByRef isFloating
hideTitle := rule9 hideTitle := rule9
} }
} }
If (m = 0) { If (m = 0)
If Config_monitorFollowsMouse {
MouseGetPos, mouseX, mouseY
m := Monitor_get(mouseX, mouseY)
} Else
m := Manager_aMonitor m := Manager_aMonitor
}
If (m > Manager_monitorCount) ; If the specified monitor is out of scope, set it to the max. monitor. If (m > Manager_monitorCount) ; If the specified monitor is out of scope, set it to the max. monitor.
m := Manager_monitorCount m := Manager_monitorCount
If (tags = 0) If (tags = 0)
@ -195,7 +193,7 @@ Manager_closeWindow() {
WinGet, aWndId, ID, A WinGet, aWndId, ID, A
WinGetClass, aWndClass, ahk_id %aWndId% WinGetClass, aWndClass, ahk_id %aWndId%
WinGetTitle, aWndTitle, ahk_id %aWndId% WinGetTitle, aWndTitle, ahk_id %aWndId%
If Not (aWndClass = "AutoHotkeyGUI" And RegExMatch(aWndTitle, "BUGN_BAR_[0-9]+_[0-9]+")) If Not (aWndClass = "AutoHotkeyGUI" And RegExMatch(aWndTitle, "bug.n_BAR_[0-9]+"))
WinClose, ahk_id %aWndId% WinClose, ahk_id %aWndId%
} }
@ -330,7 +328,7 @@ Manager_moveWindow() {
} }
Manager_onShellMessage(wParam, lParam) { Manager_onShellMessage(wParam, lParam) {
Local a, aWndHeight, aWndId, aWndWidth, aWndX, aWndY, flag, m, tags, wndClass, wndPName, wndTitle Local a, aWndClass, aWndHeight, aWndId, aWndTitle, aWndWidth, aWndX, aWndY, flag, m, tags, wndClass, wndId, wndPName, wndTitle, x, y
SetFormat, Integer, hex SetFormat, Integer, hex
lParam := lParam+0 lParam := lParam+0
@ -339,21 +337,30 @@ Manager_onShellMessage(wParam, lParam) {
WinGetTitle, wndTitle, ahk_id %lParam% WinGetTitle, wndTitle, ahk_id %lParam%
WinGet, wndPName, ProcessName, ahk_id %lParam% WinGet, wndPName, ProcessName, ahk_id %lParam%
WinGet, aWndId, ID, A
WinGetClass, aWndClass, ahk_id %aWndId%
WinGetTitle, aWndTitle, ahk_id %aWndId%
If ((wParam = 4 Or wParam = 32772) And lParam = 0 And aWndClass = "Progman" And aWndTitle = "Program Manager") {
MouseGetPos, x, y
m := Monitor_get(x, y)
If m
Manager_aMonitor := m
Bar_updateTitle()
}
If (wParam = 1 Or wParam = 2 Or wParam = 4 Or wParam = 6 Or wParam = 32772) And lParam And Not Manager_hideShow And Not Manager_focus { If (wParam = 1 Or wParam = 2 Or wParam = 4 Or wParam = 6 Or wParam = 32772) And lParam And Not Manager_hideShow And Not Manager_focus {
If Not (wParam = 4 Or wParam = 32772) { If Not (wParam = 4 Or wParam = 32772) {
If Not wndClass And Not (wParam = 2) { If Not wndClass And Not (wParam = 2) {
;Loop {
WinGetClass, wndClass, ahk_id %lParam% WinGetClass, wndClass, ahk_id %lParam%
If wndClass { If wndClass {
If (wndClass = "Emacs") If (wndClass = "Emacs")
Sleep, % 12 * Config_shellMsgDelay Sleep, % 12 * Config_shellMsgDelay
; Break
} Else } Else
Sleep, %Config_shellMsgDelay% Sleep, %Config_shellMsgDelay%
} }
} }
If (wParam = 1 Or wParam = 6) And Not InStr(Manager_allWndIds, lParam . ";") If (wParam = 1 Or wParam = 6) And Not InStr(Manager_allWndIds, lParam ";") And Not InStr(Manager_managedWndIds, lParam ";")
a := Manager_manage(lParam) a := Manager_manage(lParam)
Else { Else {
flag := True flag := True
@ -366,15 +373,13 @@ Manager_onShellMessage(wParam, lParam) {
Bar_updateView(Manager_aMonitor, Monitor_#%Manager_aMonitor%_aView_#1) Bar_updateView(Manager_aMonitor, Monitor_#%Manager_aMonitor%_aView_#1)
} }
If flag { If flag
WinGet, aWndId, ID, A
If (Manager_monitorCount > 1) { If (Manager_monitorCount > 1) {
WinGetPos, aWndX, aWndY, aWndWidth, aWndHeight, ahk_id %aWndId% WinGetPos, aWndX, aWndY, aWndWidth, aWndHeight, ahk_id %aWndId%
m := Monitor_get(aWndX + aWndWidth / 2, aWndY + aWndHeight / 2) m := Monitor_get(aWndX + aWndWidth / 2, aWndY + aWndHeight / 2)
If m If m
Manager_aMonitor := m Manager_aMonitor := m
} }
}
If tags If tags
Loop, % Config_viewCount Loop, % Config_viewCount
@ -529,7 +534,7 @@ Manager_unmanage(wndId) {
Manager_#%wndId%_tags := Manager_#%wndId%_tags :=
Manager_#%wndId%_isDecorated := Manager_#%wndId%_isDecorated :=
Manager_#%wndId%_isFloating := Manager_#%wndId%_isFloating :=
StringReplace, Bar_hideTitleWndIds, Bar_hideTitleWndIds, %wndId%`;, , All StringReplace, Bar_hideTitleWndIds, Bar_hideTitleWndIds, %wndId%`;,
StringReplace, Manager_allWndIds, Manager_allWndIds, %wndId%`;, StringReplace, Manager_allWndIds, Manager_allWndIds, %wndId%`;,
StringReplace, Manager_managedWndIds, Manager_managedWndIds, %wndId%`;, , All StringReplace, Manager_managedWndIds, Manager_managedWndIds, %wndId%`;, , All

View file

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
* @version 8.2.0.03 (27.07.2011) * @version 8.2.0.03 (21.08.2011)
*/ */
Monitor_init(m) { Monitor_init(m) {
@ -26,13 +26,13 @@ Monitor_init(m) {
Monitor_#%m%_showBar := Config_showBar Monitor_#%m%_showBar := Config_showBar
Loop, % Config_viewCount Loop, % Config_viewCount
View_init(m, A_Index) View_init(m, A_Index)
Session_restore("Monitor", m) Config_restore("Monitor", m)
Monitor_getWorkArea(m) Monitor_getWorkArea(m)
Bar_init(m) Bar_init(m)
} }
Monitor_activateView(v) { Monitor_activateView(v) {
Local aView, aWndClass, aWndId, wndId, wndIds Local aView, aWndClass, aWndId, m, n, wndId, wndIds
If (v = -1) If (v = -1)
v := Monitor_#%Manager_aMonitor%_aView_#2 v := Monitor_#%Manager_aMonitor%_aView_#2
@ -48,23 +48,36 @@ Monitor_activateView(v) {
If Not (aWndClass = "Progman") And Not (aWndClass = "AutoHotkeyGui") And Not (aWndClass = "DesktopBackgroundClass") If Not (aWndClass = "Progman") And Not (aWndClass = "AutoHotkeyGui") And Not (aWndClass = "DesktopBackgroundClass")
View_#%Manager_aMonitor%_#%aView%_aWndId := aWndId View_#%Manager_aMonitor%_#%aView%_aWndId := aWndId
} }
Monitor_#%Manager_aMonitor%_aView_#2 := aView
Monitor_#%Manager_aMonitor%_aView_#1 := v n := Config_syncMonitorViews
If (n = 1)
n := Manager_monitorCount
Else If (n < 1)
n := 1
Loop, % n {
If (n = 1)
m := Manager_aMonitor
Else
m := A_Index
Monitor_#%m%_aView_#2 := aView
Monitor_#%m%_aView_#1 := v
Manager_hideShow := True Manager_hideShow := True
StringTrimRight, wndIds, View_#%Manager_aMonitor%_#%aView%_wndIds, 1 StringTrimRight, wndIds, View_#%m%_#%aView%_wndIds, 1
Loop, PARSE, wndIds, `; Loop, PARSE, wndIds, `;
If Not (Manager_#%A_LoopField%_tags & (1 << v - 1)) If Not (Manager_#%A_LoopField%_tags & (1 << v - 1))
WinHide, ahk_id %A_LoopField% WinHide, ahk_id %A_LoopField%
StringTrimRight, wndIds, View_#%Manager_aMonitor%_#%v%_wndIds, 1 StringTrimRight, wndIds, View_#%m%_#%v%_wndIds, 1
Loop, PARSE, wndIds, `; Loop, PARSE, wndIds, `;
WinShow, ahk_id %A_LoopField% WinShow, ahk_id %A_LoopField%
Manager_hideShow := False Manager_hideShow := False
Bar_updateView(Manager_aMonitor, aView) Bar_updateView(m, aView)
Bar_updateView(Manager_aMonitor, v) Bar_updateView(m, v)
View_arrange(Manager_aMonitor, v) View_arrange(m, v)
}
wndId := View_#%Manager_aMonitor%_#%v%_aWndId wndId := View_#%Manager_aMonitor%_#%v%_aWndId
If Not (wndId And WinExist("ahk_id" wndId)) { If Not (wndId And WinExist("ahk_id" wndId)) {
@ -132,7 +145,7 @@ Monitor_getWorkArea(m) {
} }
} }
If Monitor_#%m%_showBar { If Monitor_#%m%_showBar {
If (Config_verticalBarPos = "top") { If (Config_verticalBarPos = "top" Or (Config_verticalBarPos = "tray" And Not m = Manager_taskBarMonitor)) {
bTop := monitorTop bTop := monitorTop
monitorTop += Bar_height monitorTop += Bar_height
} Else If (Config_verticalBarPos = "bottom") { } Else If (Config_verticalBarPos = "bottom") {

View file

@ -1,91 +0,0 @@
/**
* bug.n - tiling window management
* Copyright (c) 2010-2011 joten
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @version 8.2.0.03 (24.07.2011)
*/
Session_restore(section, m=0) {
Local i, type, var, var0, var1, var2
If FileExist(Config_sessionFilePath) {
If (section = "Config") {
Loop, READ, %Config_sessionFilePath%
If (SubStr(A_LoopReadLine, 1, 7) = "Config_") {
StringSplit, var, A_LoopReadLine, =
type := SubStr(var1, 1, 13)
If (type = "Config_hotkey")
Config_hotkeyCount += 1
Else If (type = "Config_rules_") {
i := SubStr(var1, 14)
If (i > Config_rulesCount) {
Config_rulesCount += 1
i := Config_rulesCount
var1 := "Config_rules_#" i
}
}
%var1% := var2
}
} Else If (section = "Monitor") {
Loop, READ, %Config_sessionFilePath%
If (SubStr(A_LoopReadLine, 1, 10+StrLen(m)) = "Monitor_#" m "_" Or SubStr(A_LoopReadLine, 1, 8+StrLen(m)) = "View_#" m "_#") {
StringSplit, var, A_LoopReadLine, =
%var1% := var2
}
}
}
}
Session_save() {
Local m, text
text := "; bug.n - tiling window management`n; @version " VERSION " (" A_DD "." A_MM "." A_YYYY ")`n`n"
If FileExist(Config_sessionFilePath) {
Loop, READ, %Config_sessionFilePath%
If (SubStr(A_LoopReadLine, 1, 7) = "Config_")
text .= A_LoopReadLine "`n"
text .= "`n"
}
FileDelete, %Config_sessionFilePath%
Loop, % Manager_monitorCount {
m := A_Index
If Not (Monitor_#%m%_aView_#1 = 1)
text .= "Monitor_#" m "_aView_#1=" Monitor_#%m%_aView_#1 "`n"
If Not (Monitor_#%m%_aView_#2 = 1)
text .= "Monitor_#" m "_aView_#2=" Monitor_#%m%_aView_#2 "`n"
If Not (Monitor_#%m%_showBar = Config_showBar)
text .= "Monitor_#" m "_showBar=" Monitor_#%m%_showBar "`n"
Loop, % Config_viewCount {
If Not (View_#%m%_#%A_Index%_layout_#1 = 1)
text .= "View_#" m "_#" A_Index "_layout_#1=" View_#%m%_#%A_Index%_layout_#1 "`n"
If Not (View_#%m%_#%A_Index%_layout_#2 = 1)
text .= "View_#" m "_#" A_Index "_layout_#2=" View_#%m%_#%A_Index%_layout_#2 "`n"
If Not (View_#%m%_#%A_Index%_layoutAxis_#1 = Config_layoutAxis_#1)
text .= "View_#" m "_#" A_Index "_layoutAxis_#1=" View_#%m%_#%A_Index%_layoutAxis_#1 "`n"
If Not (View_#%m%_#%A_Index%_layoutAxis_#2 = Config_layoutAxis_#2)
text .= "View_#" m "_#" A_Index "_layoutAxis_#2=" View_#%m%_#%A_Index%_layoutAxis_#2 "`n"
If Not (View_#%m%_#%A_Index%_layoutAxis_#3 = Config_layoutAxis_#3)
text .= "View_#" m "_#" A_Index "_layoutAxis_#3=" View_#%m%_#%A_Index%_layoutAxis_#3 "`n"
If Not (View_#%m%_#%A_Index%_layoutMFact = Config_layoutMFactor)
text .= "View_#" m "_#" A_Index "_layoutMFact=" View_#%m%_#%A_Index%_layoutMFact "`n"
If Not (View_#%m%_#%A_Index%_layoutMSplit = 1)
text .= "View_#" m "_#" A_Index "_layoutMSplit=" View_#%m%_#%A_Index%_layoutMSplit "`n"
}
}
FileAppend, %text%, %Config_sessionFilePath%
}

View file

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
* @version 8.2.0.03 (24.07.2011) * @version 8.2.0.03 (11.08.2011)
*/ */
View_init(m, v) { View_init(m, v) {
@ -74,7 +74,7 @@ View_getTiledWndIds(m, v, ByRef tiledWndIds) {
StringTrimRight, wndIds, View_#%m%_#%v%_wndIds, 1 StringTrimRight, wndIds, View_#%m%_#%v%_wndIds, 1
Loop, PARSE, wndIds, `; Loop, PARSE, wndIds, `;
{ {
If Not Manager_#%A_LoopField%_isFloating { If Not Manager_#%A_LoopField%_isFloating And WinExist("ahk_id " A_LoopField) {
n += 1 n += 1
tiledWndIds .= A_LoopField ";" tiledWndIds .= A_LoopField ";"
} }
@ -321,5 +321,6 @@ View_toggleFloating() {
If (Config_layoutFunction_#%l% And InStr(Manager_managedWndIds, aWndId ";")) { If (Config_layoutFunction_#%l% And InStr(Manager_managedWndIds, aWndId ";")) {
Manager_#%aWndId%_isFloating := Not Manager_#%aWndId%_isFloating Manager_#%aWndId%_isFloating := Not Manager_#%aWndId%_isFloating
View_arrange(Manager_aMonitor, v) View_arrange(Manager_aMonitor, v)
Bar_updateTitle()
} }
} }

102
src/docs/changes.t2t Normal file
View file

@ -0,0 +1,102 @@
**Legend**
(-) deleted
(~) changed
(+) added
=8.2.0=
==Configuration==
(-) 'Config_addRunCommands' (the 'Run' item in 'command GUI').
(-) 'Config_sessionFilePath'
(-) 'Config_topBar' (replaced by 'Config_verticalBarPos'.
(~) Brackets are no longer used for array names ('[i]' -> '_#i').
(~) The default values for the color and font size of the status bar
are now retrieved from the system settings.
- 'Config_normBgColor'
- 'Config_normFgColor'
- 'Config_selBgColor'
- 'Config_selFgColor'
- 'Config_fontSize'
(+) Default rules
(+) 'Config_hotkey' (setting hotkeys in 'Config.ini').
(+) 'Config_horizontalBarPos' (The horizontal position of the bar:
'center', 'left' or 'right' side of the monitor or an offset in
pixel (px) from the left (>= 0) or right (< 0).
(+) 'Config_verticalBarPos' (The vertical position of the bar: 'top'
or 'bottom' of the monitor, 'tray' = sub-window of the task bar.
(+) 'Config_barWidth' (The width of the bar in pixel (px) or with a
per cent sign (%) as a percentage.
(+) 'Config_singleRowBar' (If false, the bar will have to rows, one
for the window title and one for all other GUI controls.
(+) 'Config_spaciousBar' (If true, the height of the bar will be set
to a value equal to the height of an edit control, else it will
be set to the text height.
(+) 'Config_syncMonitorViews' (The number of monitors (2 or more),
for which views should be activated, when using the accordant
hotkey. If set to 1, the views are actiated for all monitors. If
set to 0, views are activated independently (only on the active
monitor).
==Hotkeys==
(~) Changed hotkeys
- #s -> #^s::Config_saveSession()
- #+r -> #^r::Reload
- #+q -> #^q::ExitApp
(+) #y::Bar_toggleCommandGui() (Open the command GUI for executing
programmes or bug.n functions.)
(+) #^e::Run, edit, %Config_sessionFilePath% (Open the session file
in the standard text editor.
(+) "<" and ">" as an argument for 'Monitor_activateView'.
(+) "<" and ">" as an argument for 'Monitor_setWindowTag'.
==Debugging==
(~) 'tile' function: resetting msplit
(~) 'Manager_winActivate(wndId)' now does not activate 'Program
Manager', if there is no window on the view, but sets the mouse
pointer to the center of the active monitor.
(~) 'Bar_updateTitle()' now indicates the floating state of a window.
(~) A memory leak in 'Manager_managedWndIds' was removed.
(~) Now mouse-follows-focus does also work in 'View_shuffleWindow(d)'.
(~) The 'anyText' field in the status bar is now updated correctly.
(~) The positioning of the 'command GUI' has been corrected for the
case of a bar at the bottom of the screen.
(~) Empty cells (for not existing, but registered windows) in the
'tile' layout were removed.
(+) AutoHotkey_L compatibility
- (~) Brackets are no longer used for array names ('[i]' -> '_#i').
- (~) Getting system settings (ANSI vs. UTF-8)
(+) 'Manager_maximizeWindow()' to 'command GUI'
(+) 'View_shuffleWindow(d)' does now work in a loop (last <-> first
window).
(+) 'Manager_taskBarMonitor' for allowing the task bar on another
than the first monitor
(+) If the status bar is not put in the task bar, the status bar is
registered as an AppBar and therewith changes the windows
workspace.
==General==
(~) The number of windows on a view is not indicated by different
background colors anymore, but by a progress bar.
(~) The battery status is also indicated with a progress bar.
(~) All bar elements are now put in a single window.
(~) Session.ahk was merged into Config.ahk and Session.ini moved to
Config.ini.
(+) Shell event: 32772
(+) A monitor with no windows on it can now be activated by cklicking
on the desktop and therewith changing the active window.
=8.1.0=
(-) 'Config_showTitleBars'
(~) 'Config_rules' have two more parameters (window style and if the
window is decorated; this replaces 'Config_showTitleBars').
(~) A bug is solved, which occurred when opening a web link from
another application than the web browser itself, e. g. a mail
client.
(+) WIN+SHIFT+X maximizes a window to the bug.n workspace.
(+) You may now use 'Monitor_activateView(">")' for cycling through
the views and 'View_setLayout(">")' for cycling through the
layouts.

View file

@ -1,9 +1,9 @@
%!encoding: iso-8859-1 %!encoding: utf-8
%!options(html): --css-sugar -o configuration.html %!options(html): --css-sugar -o configuration.html
%!style(html): ../styles.css %!style(html): ../styles.css
%!preproc(html): '%%html: ' '' %!preproc(html): '%%html: ' ''
%!postproc(html): '<HEAD>' '<HEAD>\n<TITLE>joten @ AutoHotkey</TITLE>' %!postproc(html): '<HEAD>' '<HEAD>\n<TITLE>bug.n configuration variables</TITLE>'
%!postproc(html): '<HEAD>' '<HEAD>\n<LINK REL="icon" HREF="../images/jn.ico" />' %!postproc(html): '<HEAD>' '<HEAD>\n<LINK REL="icon" HREF="../images/jn.ico" />'
%!postproc(html): '<HEAD>' '<HEAD>\n<META NAME="author" CONTENT="joten" />' %!postproc(html): '<HEAD>' '<HEAD>\n<META NAME="author" CONTENT="joten" />'
%!postproc(html): '<HEAD>' '<HEAD>\n<META NAME="keywords" CONTENT="AutoHotkey, joten, bug.n, tiling, window management" />' %!postproc(html): '<HEAD>' '<HEAD>\n<META NAME="keywords" CONTENT="AutoHotkey, joten, bug.n, tiling, window management" />'
@ -20,67 +20,85 @@
=== bug.n GUI === === bug.n GUI ===
: **Config_showBar**=1 : **Config_showBar**=1
If false (=0), the bar is hidden. It can be made visible or hidden by hotkey. If false (=0), the bar is hidden. It can be made visible or hidden by
hotkey (see below).
: **Config_topBar**=1 : **Config_horizontalBarPos**=left
If false (=0), the bar is at the bottom. The horizontal position of the bar: center, left or right side of the
monitor or an offset in pixel (px) from the left (>= 0) or right (< 0).
: **Config_verticalBarPos**=top
The vertical position of the bar: top or bottom of the monitor,
tray = sub-window of the task bar.
: **Config_barWidth**=100%
The width of the bar in pixel (px) or with a per cent sign (%) as a
percentage.
: **Config_singleRowBar**=1
If false, the bar will have to rows, one for the window title and one
for all other GUI controls.
: **Config_spaciousBar**=0
If true, the height of the bar will be set to a value equal to the
height of an edit control, else it will be set to the text height.
: **Config_fontName**=Lucida Console : **Config_fontName**=Lucida Console
A monospace font is preferable for bug.n to calculate the correct width A monospace font is preferable for bug.n to calculate the correct width
of the bar and its elements (sub-windows). of the bar and its elements (sub-windows).
: **Config_fontSize**= : **Config_fontSize**=<fontsize_captiontext>
Font size in pixel. The default value is retrieved from the "Window Font size in pixel. The default value is retrieved from the "Window
Color and Appearance" settings for the "Active Title Bar". Color and Appearance" settings for the "Active Title Bar".
: **Config_normBgColor**= : **Config_normBgColor**=<COLOR_MENU>;<COLOR_INACTIVECAPTION>;<COLOR_GRADIENTINACTIVECAPTION>;Red;<COLOR_GRADIENTINACTIVECAPTION>
Normal background color of bar elements. The first color is the color The normal background color of bar elements. The first value is the
for views without windows and the title bar (default: COLOR_MENU), the color for views without windows, the title bar and time. The second
second color is the first for the 'window count gradient' (default: value is the color for the layout symbol, the any-text (i. a. date) and
COLOR_INACTIVECAPTION) indicating one window on a view, the third color the button for the command GUI (#!). The third value is the background
is the second for the 'window count gradient' (default: color of the progress bar indicating an inactive view and a charging
COLOR_GRADIENTINACTIVECAPTION) indicating ten or more windows, the color battery, the fourth value is the background color of the progress bar
indicating two to nine windows is calculated by bug.n. Beside defining indicating a discharging battery with a remaining charge of less than
those three colors in the format "RRGGBB;RRGGBB;RRGGBB", you may also ten percent, the fifth value is the background color of the progress
explicitly define all ten colors. The default values are retrieved from bar indicating a charging battery. The default values are retrieved
the "Window Color and Appearance" settings for the "Inactive Title from the "Window Color and Appearance" settings.
Bar".
: **Config_normFgColor**= : **Config_normFgColor**=<COLOR_MENUTEXT>;Default;<COLOR_INACTIVECAPTION>;<COLOR_INACTIVECAPTIONTEXT>;<COLOR_HIGHLIGHT>;White;Default;<COLOR_INACTIVECAPTION>
Normal foreground (i. e. text) color of bar elements as described The normal foreground color of bar elements. The first two values are
above. The default values are retrieved from the "Window Color and the text colors for the first two elements as described above. The
Appearance" settings for the "Inactive Title Bar". third value is the forground color of the progress bar and the fourth
value the text color indicating an inactive view and a charging
battery. The fifth value is the foreground color of a progress bar
indicating a discharging battery. The sixth value is the text color
indicating a dischargin battery with a remaining charge of less than
ten percent. The seventh value is the text color indicating a charging
battery. The eighth value is the foreground color of a progress bar
indicating a chargin battery. The default values are retrieved from the
"Window Color and Appearance" settings.
: **Config_selBgColor**= : **Config_selBgColor**=<COLOR_GRADIENTACTIVECAPTION>
Background colour of 'selected' or highlighted bar elements. The first The background color of a progress bar indicating an active view or
colour is used for the active view (default: COLOR_HIGHLIGHT), the discharging battery status. The default values are retrieved from the
second color is used for the first status information field (default: "Window Color and Appearance" settings.
COLOR_ACTIVECAPTION), the third color is used for the status information
indicating a decreasing battery level, the layout symbol and the command
symbol, which is the last field in the status bar (default:
COLOR_GRADIENTACTIVECAPTION), the fourth color is used for an alarming
battery level (default: inverted COLOR_ACTIVECAPTION). The additional
status information fields get colors from the gradient calculated by
bug.n from the first and last status information field. The default
values are retrieved from the "Window Color and Appearance" settings for
the "Active Title Bar" and "Selected Items".
: **Config_selFgColor**= : **Config_selFgColor**=<COLOR_CAPTIONTEXT>;<COLOR_ACTIVECAPTION>
Foreground colour of 'selected' or highlighted bar elements as described The first color is the text color, the second the foreground color of a
above. The default values are retrieved from the "Window Color and progress bar indicating an active view or discharging battery status.
Appearance" settings for the "Active Title Bar" and "Selected Items". The default values are retrieved from the "Window Color and Appearance"
settings.
: **Config_readinBat**=0 : **Config_readinBat**=0
If true (=1), the system battery status is read in and displayed in If true (=1), the system battery status is read in and displayed in the
the status bar. This only makes sense, if you have a system battery status bar. This only makes sense, if you have a system battery
(notebook). (notebook).
: **Config_readinCpu**=0 : **Config_readinCpu**=0
If true (=1), the current CPU load is read in and displayed in the status bar. If true (=1), the current CPU load is read in and displayed in the
status bar.
: **Config_readinDate**=1 : **Config_readinDate**=1
If true (=1), the current date is read in (format: "WW, DD. MMM. If true (=1), the current date is read in (format: "WW, DD. MMM. YYYY")
YYYY") and displayed in the status bar. and displayed in the status bar.
: **Config_readinTime**=1 : **Config_readinTime**=1
If true (=1), the current time is read in (format: "HH:MM") and If true (=1), the current time is read in (format: "HH:MM") and
@ -94,9 +112,9 @@
: **Config_bbCompatibility**=0 : **Config_bbCompatibility**=0
If true (=1), bug.n looks for BlackBox components (bbLeanBar, bbSlit If true (=1), bug.n looks for BlackBox components (bbLeanBar, bbSlit
and SystemBarEx) when calculating the work area. It is assumed that and SystemBarEx) when calculating the work area. It is assumed that the
the virtual desktop functionality of BlackBox and NOT bug.n is used virtual desktop functionality of BlackBox and NOT bug.n is used
(**=> Hiding and showing windows is detected and acted upon). (=> Hiding and showing windows is detected and acted upon).
: **Config_borderWidth**=0 : **Config_borderWidth**=0
If > 0, the window border width is set to the integer value If > 0, the window border width is set to the integer value
@ -104,38 +122,53 @@
: **Config_borderPadding**=-1 : **Config_borderPadding**=-1
If >= 0, the window border padding is set to the integer value If >= 0, the window border padding is set to the integer value
Config_borderPadding (only for Windows >**= Vista). Config_borderPadding (only for Windows >= Vista).
: **Config_showTaskBar**=0 : **Config_showTaskBar**=0
If false (=0), the task bar is hidden. It can be made visible or If false (=0), the task bar is hidden. It can be made visible or hidden
hidden by hotkey (see below). by hotkey (see below).
: **Config_showBorder**=1 : **Config_showBorder**=1
If false (=0), the window borders are hidden; therefor windows cannot If false (=0), the window borders are hidden; therefor windows cannot
be resized manually by dragging the border, even if using the be resized manually by dragging the border, even if using the according
according hotkey. hotkey.
: **Config_selBorderColor**= : **Config_selBorderColor**=
Border colour of the active window; format: 0x00BBGGRR (e. g. Border colour of the active window; format: 0x00BBGGRR (e. g.
"0x006A240A", if empty, the system's window border colour is not "0x006A240A", if = "", the system's window border colour is not
changed). changed).
Config_borderWidth, Config_borderPadding and Config_selBorderColor are
especially usefull, if you are not allowed to set the design in the system
settings.
=== View / Layout === === View / Layout ===
: **Config_viewCount**=9 : **Config_viewCount**=9
The total number of views. This has effects on the displayed groups in The total number of views. This has effects on the displayed groups in
the bar, and should not be exceeded in the hotkeys below. the bar, and should not be exceeded in the hotkeys below.
: **Config_layoutAxis[1]**=1 : **Config_layout_#1**=[]=;tile
The layout symbol and arrange function (the first entry is set as the
default layout, no layout function means floating behavior)
: **Config_layout_#2**=[M];monocle
: **Config_layout_#3**=><>;
: **Config_layoutCount**=3
Total number of layouts defined above.
: **Config_layoutAxis_#1**=1
The layout axis: 1 = x, 2 = y; negative values mirror the layout, The layout axis: 1 = x, 2 = y; negative values mirror the layout,
setting the master area to the right / bottom instead of left / top. setting the master area to the right / bottom instead of left / top.
: **Config_layoutAxis[2]**=2 : **Config_layoutAxis_#2**=2
The master axis: 1 = x (from left to right), 2 = y (from top to The master axis: 1 = x (from left to right), 2 = y (from top to
bottom), 3 = z (monocle). bottom), 3 = z (monocle).
: **Config_layoutAxis[3]**=2 : **Config_layoutAxis_#3**=2
The stack axis: 1 = x (from left to right), 2 = y (from top to The stack axis: 1 = x (from left to right), 2 = y (from top to
bottom), 3 = z (monocle). bottom), 3 = z (monocle).
@ -155,73 +188,79 @@
or the focus has been changed); if there are any problems recognizing, or the focus has been changed); if there are any problems recognizing,
when windows are opened or closed, try to increase this number. when windows are opened or closed, try to increase this number.
: **Config_syncMonitorViews**=0
The number of monitors (2 or more), for which views should be
activated, when using the accordant hotkey. If set to 1, the views are
actiated for all monitors. If set to 0, views are activated
independently (only on the active monitor).
: **Config_viewFollowsTagged**=0 : **Config_viewFollowsTagged**=0
If true (=1), the view is set to, if a window is tagged with a single If true (=1) and a window is tagged with a single tag, the view is
tag. correspondingly set to the tag.
=== Rules === === Rules ===
: **Config_rules[1]**=.*;.*;;1;0;0;0;0;0 : **Config_rule_#1**=.*;.*;;1;0;0;0;0;0
At first you may set a default rule (.*;.*;) for a default monitor, If you want to replace a default rule, you will have to use the
view and / or showing window title bars. General format: correct variable name, e. g. you may set a rule (.*;.*;) for a default
Config_rules[i]=<class (regular expression string)>;<title (regular monitor, view and / or showing window title bars by setting the first
expression string)>;<window style (hexadecimal number or blank)>;<is rule "Config_rule_#1=..." and therewith replacing the value.
managed (1 = True or 0 = False)>;<monitor (0 <= integer <= total number If you want to add a rule you do not have to use a numbered variable,
of monitors, 0 means the currently active monitor)>;<tags (binary mask but "Config_rule=..." (the numbering will be done automatically in the
as integer >= 0, e. g. 17 for 1 and 5, 0 means the currently active order given in the configuration file). General format:
tag)>;<is floating (1 = True or 0 = False)>;<is decorated (1 = True or Config_rule[_#<i>]=<class (regular expression string)>;<title (regular
0 = False)>;<hide title (1 = True or 0 = False)>" (";" is not allowed expression string)>;<window style (hexadecimal number or blank)>;
as a character). <is managed (1 = True or 0 = False)>;<monitor (0 <= integer <= total
number of monitors, 0 means the currently active monitor)>;<tags
(binary mask as integer >= 0, e. g. 17 for 1 and 5, 0 means the
currently active tag)>;<is floating (1 = True or 0 = False)>;
<is decorated (1 = True or 0 = False)>;<hide title (1 = True or
0 = False)>
(all in one line, ";" is not allowed as a character)
: **Config_rules[2]**=.*;.*;0x80000000;0;0;0;1;1;1 : **Config_rule_#2**=.*;.*;0x80000000;0;0;0;1;1;1
Pop-up windows (style WS_POPUP=0x80000000) will not be managed, are Pop-up windows (style WS_POPUP=0x80000000) will not be managed, are
floating and the titles are hidden. floating and the titles are hidden.
: **Config_rules[3]**=SWT_Window0;.*;;1;0;0;0;0;0 : **Config_rule_#3**=SWT_Window0;.*;;1;0;0;0;0;0
Windows created by Java (SWT) e. g. Eclipse have the style WS_POPUP, Windows created by Java (SWT) e. g. Eclipse have the style WS_POPUP,
but should excluded from the above rule. but should excluded from the above rule.
: **Config_rules[4]**=Xming;.*;;1;0;0;0;0;0 : **Config_rule_#4**=Xming;.*;;1;0;0;0;0;0
Xming windows have the style WS_POPUP, but should be excluded from the Xming windows have the style WS_POPUP, but should be excluded from
above rule. the above rule.
: **Config_rules[5]**=_sp;_sp;;1;0;0;1;0;1 : **Config_rule_#5**=MsiDialog(No)?CloseClass;.*;;1;0;0;1;1;0"
: **Config_rules[6]**=MozillaDialogClass;.*;;1;0;0;1;1;0 : **Config_rule_#6**=AdobeFlashPlayerInstaller;.*;;1;0;0;1;0;1"
: **Config_rules[7]**=MsiDialog(No)?CloseClass;.*;;1;0;0;1;1;0 : **Config_rule_#7**=CalcFrame;.*;;1;0;0;1;1;0"
: **Config_rules[8]**=gdkWindowToplevel;GIMP-Start;;1;0;0;1;1;0 : **Config_rule_#8**=_sp;_sp;;1;0;0;1;0;1"
: **Config_rules[9]**=gdkWindowToplevel;GNU Image Manipulation Program;;1;0;0;1;1;0 : **Config_rule_#9**=MozillaDialogClass;.*;;1;0;0;1;1;0"
: **Config_rules[10]**=gdkWindowToplevel;Werkzeugkasten;;1;0;0;1;1;0 : **Config_rule_#10**=gdkWindowToplevel;GIMP-Start;;1;0;0;1;1;0"
: **Config_rules[11]**=gdkWindowToplevel;Ebenen, .* - Pinsel, Muster, .*;;1;0;0;1;1;0 : **Config_rule_#11**=gdkWindowToplevel;GNU Image Manipulation Program;;1;0;0;1;1;0"
: **Config_rules[12]**=gdkWindowToplevel;Toolbox;;1;0;0;1;1;0 : **Config_rule_#12**=gdkWindowToplevel;Werkzeugkasten;;1;0;0;1;1;0"
: **Config_rules[13]**=gdkWindowToplevel;Layers, Channels, Paths, .*;;1;0;0;1;1;0 : **Config_rule_#13**=gdkWindowToplevel;Ebenen, .* - Pinsel, Muster, .*;;1;0;0;1;1;0"
: **Config_rules[14]**=CalcFrame;.*;;1;0;0;1;1;0 : **Config_rule_#14**=gdkWindowToplevel;Toolbox;;1;0;0;1;1;0"
: **Config_rule_#15**=gdkWindowToplevel;Layers, Channels, Paths, .*;;1;0;0;1;1;0"
: **Config_rulesCount**=14
The total number of active rules above.
Using an indexing number less or equal to "Config_rulesCount" replaces
this rule. Additional rules need an increasing indexing number higher
than the value for "Config_rulesCount".
=== Session management === === Session management ===
: **Config_autoSaveSession**=0 : **Config_autoSaveSession**=0
Automatically save the current state of monitors, views, layouts Automatically save the current state of monitors, views, layouts (active
(active view, layout, axes, mfact and msplit) to te session file (set view, layout, axes, mfact and msplit) to the configuration file when
below) when quitting bug.n. quitting bug.n.
=== Hotkeys === === Hotkeys ===
: **Config_hotkey[i]**=<key name>::<command or function name> : **Config_hotkey**=<key name>::<command or function name>
You may overwrite default or add new hotkeys by using the above You may overwrite default or add new hotkeys by using the above
format. The indexing numbers ("i") should start with 1 and be format. "<key name>::<command or function name>" is the original
sequential. "<key name>::<command or function name>" is the original
syntax from AutoHotkey as described in syntax from AutoHotkey as described in
http://www.autohotkey.com/docs/Hotkeys.htm. http://www.autohotkey.com/docs/Hotkeys.htm.
- To deacivate a default hotkey as listed in %%LINK_hotkeys, add a new - To deacivate a default hotkey as listed in %%LINK_hotkeys, add a new
line in the format "Config_hotkey[i]=<key name>::" (without a line in the format "Config_hotkey=<key name>::" (without a
function name). function name).
- To assign an internal function of bug.n to a new hotkey, add a line - To assign an internal function of bug.n to a new hotkey, add a line
as documented in %%LINK_hotkeys, but with the new key name. as documented in %%LINK_hotkeys, but with the new key name.

View file

@ -1,9 +1,9 @@
%!encoding: iso-8859-1 %!encoding: utf-8
%!options(html): --css-sugar -o help.html %!options(html): --css-sugar -o help.html
%!style(html): ../styles.css %!style(html): ../styles.css
%!preproc(html): '%%html: ' '' %!preproc(html): '%%html: ' ''
%!postproc(html): '<HEAD>' '<HEAD>\n<TITLE>joten @ AutoHotkey</TITLE>' %!postproc(html): '<HEAD>' '<HEAD>\n<TITLE>bug.n help</TITLE>'
%!postproc(html): '<HEAD>' '<HEAD>\n<LINK REL="icon" HREF="../images/jn.ico" />' %!postproc(html): '<HEAD>' '<HEAD>\n<LINK REL="icon" HREF="../images/jn.ico" />'
%!postproc(html): '<HEAD>' '<HEAD>\n<META NAME="author" CONTENT="joten" />' %!postproc(html): '<HEAD>' '<HEAD>\n<META NAME="author" CONTENT="joten" />'
%!postproc(html): '<HEAD>' '<HEAD>\n<META NAME="keywords" CONTENT="AutoHotkey, joten, bug.n, tiling, window management" />' %!postproc(html): '<HEAD>' '<HEAD>\n<META NAME="keywords" CONTENT="AutoHotkey, joten, bug.n, tiling, window management" />'
@ -77,7 +77,7 @@ There are three layouts.
=== Tagging === === Tagging ===
bug.n features an extended implementation of virtual desktops: bug.n features an extended implementation of virtual desktops:
tagging.''<BR>'' //tagging//.''<BR>''
Windows are tagged with one or more numbers, which determine on which Windows are tagged with one or more numbers, which determine on which
views they are shown. Selecting a view shows the windows tagged with the views they are shown. Selecting a view shows the windows tagged with the
same number and hides all other windows. same number and hides all other windows.
@ -93,54 +93,31 @@ internal variables for the current state of bug.n, e. g. the active view
(saved for each monitor) and layout (saved for each view). (saved for each monitor) and layout (saved for each view).
== Preliminary note ==
There are two forms in which you can run bug.n:
+ the compiled executable
+ the AutoHotkey script
Depending on which form you choose, the following procedures
(installing, running and customizing) are different. Using the compiled
executable may be easier but is also less flexible for customization.
== Installing and running bug.n == == Installing and running bug.n ==
There is no installation wizard for bug.n. If you downloaded this There is no installation wizard for bug.n. If you downloaded this
package and unpacked it, it should be in a directory, where you have package and unpacked it, it should be in a directory, where you have
read and write access. This is the only requirement for using bug.n (at read and write access. This is the only requirement for using bug.n (at
least for saving the bug.n session file). Apart from that you may copy least for saving the bug.n configuration file). Apart from that you may
bug.n to any directory. copy bug.n to any directory.
+ If you choose to use the executable and want to save it to a If you want to save it to a directory, to which you do not have write
directory, to which you do not have write access, you will have to run access, you will have to run bug.n with a parameter indicating the file
bug.n with a parameter indicating the file path to the session file path to the configuration file (<file path to the bug.n executable>
(<file path to the bug.n executable> <file path to the session file>), <file path to the session file>), e. g.
e. g. "C:\Program Files\bugn\bugn.exe C:\Users\joten\bugn.ini". "C:\Program Files\bugn\bugn.exe C:\Users\joten\bugn.ini".
+ If you choose to use the AutoHotkey script, you will need a version of
AutoHotkey (available from http://www.autohotkey.com/download) and a
file association for AutoHotkey scripts to the AutoHotkey executable
(*.ahk -> <file path to AutoHotkey.exe>). You will than have to run
"Main.ahk" from within the "source" directory of bug.n.
=== Microsoft Windows Vista / 7 and UAC === === Microsoft Windows Vista / 7 and UAC ===
If you are using bug.n on Microsoft Windows Vista or 7 you may use If you are using bug.n on Microsoft Windows Vista or 7 you may use
applications, which run with administrator privileges e. g. applications, which run with administrator privileges e. g.
administrative tools and therefor are not managed by bug.n. If you want administrative tools and therefor are not managed by bug.n, if it is
run with an account, which //is// not the administrator. If you want
those applications to be managed, you need to run bug.n with those applications to be managed, you need to run bug.n with
administrator privileges, too. administrator privileges, too.
+ If you choose to use the executable, you can set the option "Run this You can set the option "Run this program as an administrator" on the
program as an administrator" on the "Compatiblity" tab, section "Compatiblity" tab, section "Privilege level" of the bug.n executable
"Privilege level" of the bug.n executable file properties. file properties.
+ If you choose to use the AutoHotkey script, you will have to use a
command script like "run.cmd" provided in the "source" directory of
bug.n. Please adjust the file pathes in this file depending on your
working environment and than create a link to the file. In the file
properties of this link you can set the option "Run this program as an
administrator" on the "Compatiblity" tab, section "Privilege level".
You will than have to run bug.n through this link.
== Customization == == Customization ==
@ -156,10 +133,8 @@ Customization can be done
- for hotkeys (the key bindings for the bug.n functions) - for hotkeys (the key bindings for the bug.n functions)
%%html: ''<P></P>'' The available configuration variables are listed in
+ If you use the executable, you can not change the layout symbols and %%LINK_configuration.''<BR>''
the order of the layouts. The available configuration variables are
listed in %%LINK_configuration.''<BR>''
To change these, first create a session file by using the hotkey To change these, first create a session file by using the hotkey
"WIN+CTRL+S". The file is either saved in the directory you specified "WIN+CTRL+S". The file is either saved in the directory you specified
with the parameter to the executable, or in the same directory where the with the parameter to the executable, or in the same directory where the
@ -168,19 +143,9 @@ Customization can be done
configuration variable with its value (format: <variable>=<value>, use configuration variable with its value (format: <variable>=<value>, use
no quotation marks, 1 for true and 0 for false), e. g. no quotation marks, 1 for true and 0 for false), e. g.
"Config_showBar=0". You will have to quit and run bug.n again for the "Config_showBar=0". You will have to quit and run bug.n again for the
changes to take effect. changes to take effect.''<BR>''
+ If you use the AutoHotkey script you can directly edit the file You may find a sample configuration file (Config_example.ini) in the
"Config.ahk" in the "source" directory of bug.n and reload the script main directory of bug.n.
with the hotkey "WIN+CTRL+R". You can additionally use the
configuration file as described above. Please refer to the
documentation of AutoHotkey for more information about writing an
AutoHotkey script, especially
- http://www.autohotkey.com/docs/Hotkeys.htm
- http://www.autohotkey.com/docs/Variables.htm
You may find a sample session file (Session_sample.ini) in the main
directory of bug.n.
== Usage == == Usage ==

View file

@ -1,9 +1,9 @@
%!encoding: iso-8859-1 %!encoding: utf-8
%!options(html): --css-sugar -o hotkeys.html %!options(html): --css-sugar -o hotkeys.html
%!style(html): ../styles.css %!style(html): ../styles.css
%!preproc(html): '%%html: ' '' %!preproc(html): '%%html: ' ''
%!postproc(html): '<HEAD>' '<HEAD>\n<TITLE>joten @ AutoHotkey</TITLE>' %!postproc(html): '<HEAD>' '<HEAD>\n<TITLE>bug.n hotkeys</TITLE>'
%!postproc(html): '<HEAD>' '<HEAD>\n<LINK REL="icon" HREF="../images/jn.ico" />' %!postproc(html): '<HEAD>' '<HEAD>\n<LINK REL="icon" HREF="../images/jn.ico" />'
%!postproc(html): '<HEAD>' '<HEAD>\n<META NAME="author" CONTENT="joten" />' %!postproc(html): '<HEAD>' '<HEAD>\n<META NAME="author" CONTENT="joten" />'
%!postproc(html): '<HEAD>' '<HEAD>\n<META NAME="keywords" CONTENT="AutoHotkey, joten, bug.n, tiling, window management" />' %!postproc(html): '<HEAD>' '<HEAD>\n<META NAME="keywords" CONTENT="AutoHotkey, joten, bug.n, tiling, window management" />'
@ -50,8 +50,8 @@ pressing the left Windows key and the shift key and the q key
the view. the view.
: #+Enter::**View_shuffleWindow(0)** : #+Enter::**View_shuffleWindow(0)**
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
view. the view.
: #c::**Manager_closeWindow()** : #c::**Manager_closeWindow()**
Close the active window. Close the active window.
@ -74,8 +74,8 @@ pressing the left Windows key and the shift key and the q key
floating windows). floating windows).
: #i::**Manager_getWindowInfo()** : #i::**Manager_getWindowInfo()**
Get information for the active window (id, title, class, process name, Get information for the active window (id, title, class, process
style, geometry, tags and floating state). name, style, geometry, tags and floating state).
: #+i::**Manager_getWindowList()** : #+i::**Manager_getWindowList()**
Get a window list for the active view (id, title and class). Get a window list for the active view (id, title and class).
@ -108,23 +108,23 @@ pressing the left Windows key and the shift key and the q key
"tile" layout). "tile" layout).
: #^t::**View_rotateLayoutAxis(1, +1)** : #^t::**View_rotateLayoutAxis(1, +1)**
Rotate the layout axis (i. e. 2 -> 1 = vertical layout, 1 -> 2 = Rotate the layout axis (i. e. 2 -> 1 = vertical layout,
horizontal layout, only for the "tile" layout). 1 -> 2 = horizontal layout, only for the "tile" layout).
: #^Enter::**View_rotateLayoutAxis(1, +2)** : #^Enter::**View_rotateLayoutAxis(1, +2)**
Mirror the layout axis (i. e. -1 -> 1 / 1 -> -1 = master on the left / Mirror the layout axis (i. e. -1 -> 1 / 1 -> -1 = master on the left
right side, -2 -> 2 / 2 -> -2 = master at top / bottom, only for the / right side, -2 -> 2 / 2 -> -2 = master at top / bottom, only for
"tile" layout). the "tile" layout).
: #^Tab::**View_rotateLayoutAxis(2, +1)** : #^Tab::**View_rotateLayoutAxis(2, +1)**
Rotate the master axis (i. e. 3 -> 1 = x-axis = horizontal stack, 1 -> Rotate the master axis (i. e. 3 -> 1 = x-axis = horizontal stack,
2 = y-axis = vertical stack, 2 -> 3 = z-axis = monocle, only for the 1 -> 2 = y-axis = vertical stack, 2 -> 3 = z-axis = monocle, only for
"tile" layout). the "tile" layout).
: #^+Tab::**View_rotateLayoutAxis(3, +1)** : #^+Tab::**View_rotateLayoutAxis(3, +1)**
Rotate the stack axis (i. e. 3 -> 1 = x-axis = horizontal stack, 1 -> Rotate the stack axis (i. e. 3 -> 1 = x-axis = horizontal stack,
2 = y-axis = vertical stack, 2 -> 3 = z-axis = monocle, only for the 1 -> 2 = y-axis = vertical stack, 2 -> 3 = z-axis = monocle, only for
"tile" layout). the "tile" layout).
: #^Left::**View_setMSplit(+1)** : #^Left::**View_setMSplit(+1)**
Move the master splitter, i. e. decrease the number of windows in the Move the master splitter, i. e. decrease the number of windows in the
@ -139,23 +139,23 @@ pressing the left Windows key and the shift key and the q key
: #BackSpace::**Monitor_activateView(-1)** : #BackSpace::**Monitor_activateView(-1)**
Activate the previously activated view. You may also use Activate the previously activated view. You may also use
Monitor_activateView(">") for activating the next / adjacent view. Monitor_activateView("<") or Monitor_activateView(">") for activating
the previous or next adjacent view.
: #+0::**Monitor_setWindowTag(0)** : #+0::**Monitor_setWindowTag(0)**
Tag the active window with all tags (1 ... 9). Tag the active window with all tags (1 ... Config_viewCount). You may
also use Monitor_setWindowTag("<") or Monitor_setWindowTag(">") for
setting the tag of the previous or next adjacent to the current view.
: #<tag>::**Monitor_activateView(<tag>)** : #<tag>::**Monitor_activateView(<tag>)**
Activate the view indicated by "<tag>" (choose one out of 1 ... 9), e. Activate the view (choose one out of 1 ... Config_viewCount).
g. #1::Monitor_activateView(1).
: #+<tag>::**Monitor_setWindowTag(<tag>)** : #+<tag>::**Monitor_setWindowTag(<tag>)**
Tag the active window indicated by "<tag>" (choose one tag out of 1 Tag the active window (choose one tag out of 1 ... Config_viewCount).
... 9), e. g. #+1::Monitor_setWindowTag(1).
: #^<tag>::**Monitor_toggleWindowTag(<tag>)** : #^<tag>::**Monitor_toggleWindowTag(<tag>)**
Add / Remove the tag indicated by "<tag>" (1 ... 9) for the active Add / Remove the tag (1 ... Config_viewCount) for the active window,
window, if it is not / is already set, e. g. if it is not / is already set.
#^1::Monitor_toggleWindowTag(1).
=== Monitor related hotkeys === === Monitor related hotkeys ===
@ -194,16 +194,14 @@ pressing the left Windows key and the shift key and the q key
: #y::**Bar_toggleCommandGui()** : #y::**Bar_toggleCommandGui()**
Open the command GUI for executing programmes or bug.n functions. Open the command GUI for executing programmes or bug.n functions.
: #^e::**Run, edit, %Config_sessionFilePath%** : #^e::**Run, edit %Config_filePath%
Open the session file in the standard text editor. Open the configuration file in the standard text editor.
: #^s::**Session_save()** : #^s::**Config_saveSession()**
Save the current state of monitors, views, layouts. Save the current state of monitors, views, layouts to the
configuration file.
: #^r::**Reload** : #^q::**ExitApp
For resetting the confguration, if running bug.n as an Autohotkey script.
: #^q::**ExitApp**
Quit bug.n, restore the default Windows UI and show all windows. Quit bug.n, restore the default Windows UI and show all windows.
''<BR>'' ''<BR>''