Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



22 Commits

Repository files navigation

Mjolnir Window Hints Module

Provides a fancy method of window switching for Mjolnir. Pressing a shortcut brings up "hints" which are app icons with a letter, typing that letter focuses the corresponding window.

Currently it is in a very hacky state, it works for me but is not packaged for use by others.


You can install from luarocks by running the command below. You'll need to install Mjolnir and luarocks beforehand.

luarocks install

You can also install from source. You'll need to install Mjolnir and possibly moonrocks (luarocks install --server= moonrocks).

Then just run luarocks make in a clone of this git repo and it should install.


Bind the function in your init.lua to a key like this:

local hints = require ""

By default, the hint keys used are: A O E U I D H T N S P G M W V J K X B Y F. To customize the hint keys, change the hints.HINTCHARS value to the prefered keys before declaring any bindings:

local hints = require ""
hints.HINTCHARS = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"}

You can also use hints.appHints to switch between windows in an app:

-- This switches between windows of the focused app
hotkey.bind({"ctrl","cmd"},"j",function() hints.appHints(window.focusedwindow():application()) end)

-- You can also use this with appfinder to switch to windows of a specific app
local appfinder = require "mjolnir.cmsj.appfinder"
hotkey.bind({"ctrl","cmd"},"k",function() hints.appHints(appfinder.app_from_name("Emacs")) end)



Hints are centered on the window they will switch to and have a unique key.

Note that the hints still show for hidden windows, this means you can switch to ANY currently open window in 2 key strokes.

Also note the vertical line of hints in the center, these are all maximized windows but the hints are spread out so they don't collide.

App switching

You can also switch windows within an app, in this case the window titles are also shown.


Mjolnir Module for Window Hints






No releases published



Contributors 4