Repository navigation
mrun 0.1.0
First release. Extracted from mshell, whose
built-in launcher this replaces.
Added
-
A launcher that is its own program. mshell's built-in one indexed the
Start menu and did nothing else: no config, no way to add a source, no way to
add a mode. Extending it in place would have meant growing the window manager
every time the launcher learned something new.Being a separate process also fixes the hardest part. An overlay painted by a
window manager is typicallyWS_EX_NOACTIVATEand cannot take the foreground,
so it can only be typed into by intercepting the keyboard globally and
forwarding keystrokes to itself — a capture mode whose failure case is a dead
keyboard. mrun is an ordinary process with an ordinary focused window and
reads keys the way every other application does. -
A module system. Every result comes from a module, behind one interface
(init/configure/search/activate).appsis the first, indexing
both Start menus; clipboard history and emoji are the obvious next ones and
register the same way.A module is also writable entirely in Lua, against the same interface:
mrun.set_modules({ "apps", "calc" }) -- enabled, in search order mrun.module({ name = "calc", prefix = "=", -- typing "=" searches only this search = function(query) ... end, -- runs on every keystroke activate = function(item) ... end, -- runs on Enter })
Module names are resolved after the whole config has run, so the order things
are declared in the file does not matter. -
Fuzzy matching — subsequence, with prefix, word-boundary and camelCase
hits ranked above scattered ones, consecutive runs rewarded and long gaps
penalised.vscfinds Visual Studio Code. A row may supply its ownscore
to override the ranking. Unit-tested (make test), being the one part with no
Windows in it. -
A resident instance with a client CLI. The first invocation goes resident;
every later one is a client that tells it what to do and exits (--toggle,
--show,--hide,--query,--mode,--reload,--quit). Binding
mrun.exeto a hotkey therefore gives a toggle rather than a second copy, and
--daemonat login makes the first open instant. -
Lua configuration, at
%APPDATA%\mrun\init.luaorconfig\mrun.lua
beside the exe.mrun.set_appearance{}covers size, colours, fonts, opacity,
rounding and position;mrun.set_behaviour{}covers hide-on-blur and whether
the query survives a close.--checkvalidates a config from the command
line.A config error is atomic: the whole file is rejected and mrun runs on
built-in defaults rather than half of what you wrote. -
Per-monitor DPI awareness, declared in the manifest so it applies before
the first window exists and costs no load-time dependency on auser32export
that older Windows lacks.
Notes
- The portable config file is
config\mrun.luarather thanconfig\init.lua
deliberately: mrun.exe is often dropped besidemshell.exe, whose own config
isconfig\init.lua, and two programs reading the same filename out of the
same folder is a trap. - The log goes to
%LOCALAPPDATA%\mshell\mrun.log, whichlog.cinherited from
mshell along with the file itself.