marathon is a minimal shell-based launcher for Linux/X that tries to be
smart about running or focusing apps. When calling marathon application
,
- If
application
is not running, marathon will run it. - Else marathon will just focus
application
That way, after binding your favorite apps to a few easily-accessible OS global keyboard shortcuts, you can access them with a single keypress and forget about alt-tabbing or clicking app icons in your dock / window list.
Flags:
-
--toggle
will emulate the Quake terminal-like behavior of minimizing already-focused windows. (By default, marathon leaves them untouched.) -
--ignore-args-on-focus
will ignore command arguments when focusing (e.g.--incognito
inmarathon google-chrome --incognito
) while still passing them on initial run.- This is useful for applications who use a runner or spawn other processes, making ineffective post-exec searching for the fully-qualified command.
- This is not what you want if the process you want to focus needs
arguments to be uniquely identified (e.g.
gvim -S work
).
-
--launch-closed
will use the active window list to determine if the requested program is running. By default, marathon looks in the process list. Useful to focus well-behaved single-instance programs closed to tray that respond to a re-launch by activating the window (e.g. Slack).
-
macOS is not supported, sorry (due to depending on Xorg utilities). But rejoice, you'll be well served with Automator or Alfred, see for example this guide
-
Linux:
- X is required, as there is (at time of writing) no equivalent
to
wmctrl
/xdotool
under Wayland. You'll have to disable Wayland. Suggestions welcome in issue #5 - Support Wayland. - Install
wmctrl
andxdotool
from your package manager. - Drop
marathon
somewhere in your$PATH
. - Bind
marathon command
(optionally adding flags) to a keyboard shortcut, courtesy of your Desktop Environment / Window Manager:
- X is required, as there is (at time of writing) no equivalent
to
Nit: ensure the app process name (or window class if using --launch-closed
)
matches the executable filename. If not, a symlink will do the trick.
Bug Reports and Pull Requests are welcome.
Licensed under the MIT license, 2012-2018, Ronan Jouchet / @ronjouch