diff --git a/bugn.exe b/bugn.exe index 4ec2414..0000139 100644 Binary files a/bugn.exe and b/bugn.exe differ diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 311a4c5..d915866 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -24,9 +24,10 @@ called with the window ID as a paramater, when applying the rule. 9. `+` Added the possibility for sending commands to bug.n from another AutoHotkey script. 10. `~` Removed the function `Main_reload` and reassigned the hotkey. 11. `+` Added the possibility to minimize windows, making them floating and thereby excluded from tiling. +12. `+` Added configuration variables for customizing the date and time format shown in the status bar. | # | `-` or `~` Configuration Variables or
`-` Hotkey Functions | `+` Configuration Variables or
`+` Hotkey Functions | -| ---:|:---------------------------------------------------------------- |:--------------------------------------------------------- | +| ---:| ---------------------------------------------------------------- | --------------------------------------------------------- | | 1. | `#+d::Manager_toggleDecor()` | `#+d::Window_toggleDecor()` | | 2. | `#+f::View_toggleFloating()` | `#+f::View_toggleFloatingWindow()` | | 3. | `#Left::View_setMFactor(-0.05)` | `#Left::View_setLayoutProperty("MFactor", 0, -0.05)` | @@ -84,6 +85,8 @@ called with the window ID as a paramater, when applying the rule. | 10. | `#^r::Main_reload()` | | | | `#^+r::Reload` | `#^r::Reload` | | 11. | | `#^m::Manager_minimizeWindow()` | +| 12. | | `Config_readinDateFormat` | +| | | `Config_readinTimeFormat` | ### 8.4.0 diff --git a/doc/CREDITS.md b/doc/CREDITS.md index be42e61..4b06211 100644 --- a/doc/CREDITS.md +++ b/doc/CREDITS.md @@ -31,6 +31,7 @@ summarizes these sources (of ideas or code): + [Remote control](https://github.com/franckspike/bug.n/commit/2beacc71aef4d4c46021f97b52ab857efabc871c) + [Resize the master area correctly, if the first layout axis is inverted.](https://github.com/franckspike/bug.n/commit/8e6f809d33326408fc1c7e249f5b278708b91565) * fures: System + Network monitor - with net history graph (AutoHotkey forum) +* Kenta Oda: [Add configuration variables for custom time format](https://github.com/fuhsjr00/bug.n/pull/63) * maestrith: Script Writer (github.com/maestrith/Script_Writer) * PhiLho: [AC/Battery status](http://www.autohotkey.com/forum/topic7633.html) * Pillus: [System monitor (HDD/Wired/Wireless) using keyboard LEDs](http://www.autohotkey.com/board/topic/65308-system-monitor-hddwiredwireless-using-keyboard-leds/) diff --git a/doc/Default_configuration.md b/doc/Default_configuration.md index 127e062..8a7e9b3 100644 --- a/doc/Default_configuration.md +++ b/doc/Default_configuration.md @@ -114,9 +114,15 @@ status bar. This only makes sense, if you have a system battery (notebook). > If true (`=1`), the current CPU load is read in and displayed in the status bar. `Config_readinDate=1` -> If true (`=1`), the current date is read in (format: "WW, DD. MMM. YYYY") and +> If true (`=1`), the current date is read in (format: "ddd, dd. MMM. yyyy") and displayed in the status bar. +`Config_readinDateFormat=ddd, dd. MMM. yyyy` +> The format in which the date, if it is read in, should be displayed. Please see +the documentation at +[autohotkey.com](https://www.autohotkey.com/docs/commands/FormatTime.htm#Date_Formats_case_sensitive) +for a description of the string components. + `Config_readinDiskLoad=0` > If true (`=1`), the current disk load (read and write) is read in and displayed in the status bar. @@ -134,6 +140,12 @@ and displayed in the status bar. > If true (`=1`), the current time is read in (format: "HH:MM") and displayed in the status bar. +`Config_readinTimeFormat=HH:mm` +> The format in which the time, if it is read in, should be displayed. Please see +the documentation at +[autohotkey.com](https://www.autohotkey.com/docs/commands/FormatTime.htm#Time_Formats_case_sensitive) +for a description of the string components. + `Config_readinVolume=0` > If true (`=1`), the current sound volume is read in (format: "VOL: ") and displayed in the status bar. diff --git a/src/Bar.ahk b/src/Bar.ahk index 46447a1..9e8922f 100644 --- a/src/Bar.ahk +++ b/src/Bar.ahk @@ -68,12 +68,12 @@ Bar_init(m) { If Config_readinTime { color .= ";5" id .= ";time" - text .= "; ??:?? " + text .= "; " . Config_readinTimeFormat . " " } If Config_readinDate { color .= ";6" id .= ";date" - text .= "; ??, ??. ???. ???? " + text .= "; " . Config_readinDateFormat . " " } If Config_readinVolume { color .= ";9" @@ -164,7 +164,7 @@ Bar_init(m) { Bar_initCmdGui() { - Global Bar_#0_#0, Bar_#0_#0H, Bar_#0_#0W, Bar_#0_#1, Bar_cmdGuiIsVisible, Config_backColor_#1_#3, Config_barCommands, Config_fontName, Config_fontSize, Config_foreColor_#1_#3, Config_dateFormat, Config_timeFormat + Global Bar_#0_#0, Bar_#0_#0H, Bar_#0_#0W, Bar_#0_#1, Bar_cmdGuiIsVisible, Config_backColor_#1_#3, Config_barCommands, Config_fontName, Config_fontSize, Config_foreColor_#1_#3 Bar_cmdGuiIsVisible := False wndTitle := "bug.n_BAR_0" @@ -392,7 +392,7 @@ Bar_updateStatic(m) { } Bar_updateStatus() { - Local anyText, bat1, bat2, bat3, GuiN, m, mute, vol, date + Local anyText, bat1, bat2, bat3, GuiN, m, mute, time, vol anyText := Config_readinAny() If Config_readinBat { @@ -441,10 +441,10 @@ Bar_updateStatus() { GuiControl, , Bar_#%m%_volume, % " VOL: " SubStr(" " vol, -2) "% " } If Config_readinDate - FormatTime, date, , % Config_dateFormat - GuiControl, , Bar_#%m%_date, % date + FormatTime, time, , % Config_readinDateFormat + GuiControl, , Bar_#%m%_date, % time If Config_readinTime - FormatTime, time, , % Config_timeFormat + FormatTime, time, , % Config_readinTimeFormat GuiControl, , Bar_#%m%_time, % time } } diff --git a/src/Config.ahk b/src/Config.ahk index fdcfc9e..69cf859 100644 --- a/src/Config.ahk +++ b/src/Config.ahk @@ -36,14 +36,14 @@ Config_init() { Config_readinBat := False Config_readinCpu := False Config_readinDate := True + Config_readinDateFormat := "ddd, dd. MMM. yyyy" Config_readinDiskLoad := False Config_readinMemoryUsage := False Config_readinNetworkLoad := False Config_readinTime := True + Config_readinTimeFormat := "HH:mm" Config_readinVolume := False Config_readinInterval := 30000 - Config_dateFormat := "ddd, dd, MM, yyyy" - Config_timeFormat := "HH:mm" ;; Windows ui elements Config_bbCompatibility := False diff --git a/usr/default_01.ini b/usr/default_01.ini index bb0db4a..8ff0305 100644 --- a/usr/default_01.ini +++ b/usr/default_01.ini @@ -26,10 +26,12 @@ ;Config_readinBat=0 ;Config_readinCpu=0 ;Config_readinDate=1 +;Config_readinDateFormat=ddd, dd. MMM. yyyy ;Config_readinDiskLoad=0 ;Config_readinMemoryUsage=0 ;Config_readinNetworkLoad=0 ;Config_readinTime=1 +;Config_readinTimeFormat=HH:mm ;Config_readinVolume=0 ;Config_readinInterval=30000 diff --git a/usr/joten_01.ini b/usr/joten_01.ini index 44486bc..4754621 100644 --- a/usr/joten_01.ini +++ b/usr/joten_01.ini @@ -26,10 +26,12 @@ Config_fontColor_#3=;;;;;;;Black; Config_readinBat=1 ;Config_readinCpu=0 ;Config_readinDate=1 +Config_readinDateFormat=yyyy-MM-dd ddd ;Config_readinDiskLoad=0 ;Config_readinMemoryUsage=0 ;Config_readinNetworkLoad=0 ;Config_readinTime=1 +;Config_readinTimeFormat=HH:mm Config_readinVolume=1 Config_readinInterval=10000