Repository navigation
mini-oled-dock 1.4.0
Changes since 1.3.0: security and stability fixes from a full review of the code added since 1.0.0, a self-updater, a battery module and a new Settings window.
Fixes
- Import from Windows Start no longer runs PowerShell as administrator. The import now runs with normal user rights.
- The import no longer touches the temp folder. Files it reads are no longer written to or cleaned up from the shared temp folder.
- AppBar requests are checked before the dock acts on them. When a program reserves screen space or asks where the taskbar is, the dock now checks the shared memory block of the request and maps it itself, instead of letting Windows look it up a second time. When the request names a window, that window must still exist and its program must not run as administrator; as with the Windows taskbar, it may belong to a different program than the one that sent the request. Requests from programs running as administrator, and requests that point at memory that is not a genuine request block or that the program itself could not write, are rejected, so another program cannot make the dock write into memory of a program running as administrator, or into memory that program could not write itself. Asking where the taskbar is works with or without a window.
- "Terminal (admin)" and "PowerShell (admin)" no longer depend on the search path. PowerShell is launched by its full path in the Windows System32 folder, and Terminal by its app ID (the Microsoft Store package
Microsoft.WindowsTerminal). A Terminal installed only as Preview or outside the Store is not found by this entry. - No tray host restart while Explorer restarts. The dock leaves the tray host alone while Explorer is coming back, so tray icons are not disturbed.
- The taskbar is restored when the dock exits during an Explorer restart. If the dock closes while Explorer is restarting, the Windows taskbar comes back.
- Start menu icons are freed when it is not used. The Start menu keeps its catalog and icons for 60 s after it closes (so reopening is instant), then releases them.
- The Win key hook is repaired after Win+L. A Win key press that was in progress when the screen locked no longer leaves the dock thinking Win is still held. The stale "Win held" state is cleared only when both Win keys are up and the press is over: older than 1.5 s after a Win+key shortcut such as Win+L, or older than 10 s for Win pressed alone. Then the dock can repair the key hook. A Win key really held alone is left untouched, so a long press still toggles the dock on release.
- The Win key always gives the bar the keyboard focus. Like the Windows taskbar, a Win tap that shows the bar now brings it to the front over any window or game, even one the dock does not recognise as fullscreen, so you no longer need Alt+Tab. When the bar hides, the window you were using gets the focus back, unless you have already moved to another one. Showing the bar from the screen edge still leaves the focus where it is, and Alt+F4 while the bar has the focus no longer closes the dock.
- The Start menu and popups fit small or high-DPI screens. Popups are now capped to the screen's usable area. The Start menu and the tray chooser drop rows and scroll when space is short; the audio popup and the calendar are cut at the edge instead of running off screen.
- Tray icons of apps run as administrator can be used. Icons of programs running as administrator (for example MSI Afterburner) showed in the bar but did nothing on click, because the dock refuses by default to send messages to elevated windows. The new switch Settings → Modules → Tray → Icons of apps run as administrator allows them; it writes the admin-only registry value
HKLM\SOFTWARE\mini-oled-dock\TrustElevatedTrayIcons(neverconfig.json) and takes effect at once. Even when it is on, the dock sends only application messages (WM_USERto0xFFFF, never system messages), only to a top-level or message-only window (never a child control), and only while the icon's window still belongs to the same process running the same program file recorded when the icon was registered. Those checks only stop a closed program's window or process id from being reused: with the switch on, a normal program can still make the dock send an application message, with a value it partly chooses, to a window of a program running as administrator when you click or hover an icon it registered. Turn it on only if you trust the programs you run. Off by default; icons of normal apps are unchanged. - Tray menu placement can no longer stall the tray. A tray menu that takes too long to place no longer blocks the other tray icons.
--installwaits for the old watchdog. The new copy starts only after the old watchdog has stopped, so two watchdogs do not run at the same time.
Updater
- Self-updater. The dock checks GitHub Releases once a day for a newer version. The check makes one request to api.github.com and changes nothing else: when a newer release exists, an orange dot with a count shows on Settings in the power popup, and the Updates page of the Settings window shows the details (check now, release notes, update now). It is on by default (
"update_check": true; set it tofalseto turn the check off). - Automatic install is off by default. With
"update_auto_install": truethe dock downloads the release into the admin-only folder%ProgramData%\mini-oled-dock\update\<tag>\, checks its SHA-256 and its own--version, and runs--install --quietwhen no popup is open and no fullscreen app is in front. No UAC prompt; the dock restarts from the new copy. The exe is not code-signed: trust rests on HTTPS to github.com and the hash published with the same release. - First step from 1.3.0 or 1.0.0. Run
dock.exe --installonce from the 1.4.0 exe. Later releases can then reach you through the dock itself. - Add/Remove Programs and real uninstall.
--installregisters the dock in Add/Remove Programs.--uninstall --removestops the dock, restores the taskbar and deletes the installed copy (a file still in use goes at the next restart); it keeps your settings.--purge-dataalso deletes the data folder. - Installs are atomic and always start the dock. The new exe is written as
dock.exe.newand moved over the old one in one step.--installwaits up to 35 s for the old dock and its watchdog to exit, then starts the new copy (--no-relaunchskips the start). - Scripting.
--quietshows no message box,--versionprintsmini-oled-dock X.Y.Z, and the exe carries a version resource. Exit codes: 0 success, 1 failure, 2 bad arguments, 3 the running dock could not be stopped. - Diagnostics.
--update-checkmakes one check and prints the result.--update-install <tag>verifies and installs a release already staged in itsupdate\<tag>\folder, and accepts no other path.
Battery
- A battery module for laptops. An Apple-style battery icon in the bar: the fill follows the charge, a bolt shows while charging, and the percentage sits beside the icon or inside it. The fill is orange under 20 % and red at 10 % and below; while plugged in it is white. The module can be dragged like the others and follows
module_size. - Popup and click. Left click opens a popup with the charge, the state (charging, on battery, fully charged, plugged in), the time remaining on battery and the active power plan (Power saver, Balanced or High performance), plus a "Power & battery settings" link. Right click opens
ms-settings:batterysaverdirectly. - Options.
show_batteryis"auto"by default (shown only when Windows reports a battery), ortrue/false.battery_percent(defaulttrue) shows the percentage andbattery_percent_inside(defaultfalse) draws it inside the icon. They are on the Modules page of the Settings window. - A desktop PC sees no change. With
"auto"nothing is created on a machine without a battery: no module, no timer. - Cost. The charge is read every 30 s only while the bar is visible, plus instantly when the charger is plugged in or out. No thread.
- Known limitation. The time to full charge is not shown: Windows only reports the time remaining on battery.
Settings window
The settings popup had become too full for its size. It is replaced by a real window: power button → Settings, Start quick links → Dock settings, or dock.exe --settings.
- Resizable, dark title bar in the bar's background colour, left navigation: Appearance (live preview of the bar, colour, opacity, sizes, language), Bar, Start, Modules (with the new Battery group and the tray icon chooser inline), Screen, Updates (check, release notes, update now, automatic check and install), About (memory, data folder, log, exit the dock).
- Every change still applies at once and is saved to
config.json. The window remembers its size (settings_window_size). Esccloses,Tabmoves between the navigation and the page,Up/Downchange page, the wheel scrolls. The wheel no longer steps a slider under the pointer: it scrolls the page.- Nothing of the window stays in memory once it is closed.
- Automatic install never starts while the window is open.
Icon
- The dock has an icon. A black OLED tile with a thin white outline (the screen) and a small white bar low inside it (the dock). It shows in Explorer, in Add/Remove Programs and on the Settings window (title bar, Alt+Tab). Only the Settings window loads it, and frees it when it closes; the bar does not. The exe grows by about 48 KB.
If you are updating from 1.0.0
- Start button on by default. Since 1.1.0 a Start button is shown at the left of the bar (the Start button setting, or
"show_start_button": falseinconfig.json). A config file that does not mention it gets the new default. - Window previews on by default. Since 1.1.0, resting the pointer on an app with several windows shows a live preview of each one (the Window previews setting, or
"window_previews": false).
Install / update
Requires Windows 11. Download dock.exe and run it from a terminal:
.\dock.exe --installIt asks for administrator rights, copies itself to %ProgramFiles%\mini-oled-dock and starts with Windows. To update, run --install from the new dock.exe: the running dock is stopped and restarted from the new copy. Settings are kept.
SHA256 of dock.exe: 3c950a74bdecf09fbd31d9aaa3ef4e2a9723552efacdd2f87c5bec98b0c5663d