Mjolnir Workflow

An Alfred Workflow

Short Description

A workflow for controlling your desktop with Mjolnir and Alfred Remote.

Last Updated

02 Feb 2015


Mountain Lion
Snow Leopard
Yes Yes No No No



Bundle ID



This workflow is for running scripts using Mjolnir to control your windows. This is just a sample of the things that can be done. Follow this layout and you can do many neat things with Mjolnir.

First off, download Mjolnir from Mjolnir-io. That site also tells how to get started. To install the needed modules and configuration file, you will need to run the “mj:install” command. This will also install the cli program called “mjolnir”.

Once mjolnir and it’s cli program is installed, use the “mj:find mjolnir” command to set the path to the executable. After this step is done, all the following commands are available to use.


This will install some modules that is used in the configuration file for this workflow. It will also install a default configuration file for mjolnir. If you already have one, move it to a temporary location, run this command, and then copy your function to the configuration file. This should be the second command you run to get this workflow running.


This command just updates the init.lua file to the new one for the workflow. It does not try to update the modules.


This tells mjolnir to reload the configuration file.


This brings the Mjolnir console to the front.


This nudges the current window up.


This nudges the current window down.


This nudges the current window to the left.


This nudges the current window to the right.


This toggles system caffenate.


This moves the current window to the left 1/3 of the screen.


This moves the current window to the right 2/3 of the screen.


This moves the current window to the left half of the screen.


This moves the current window to the right half of the screen.


This moves the current window to the top half of the screen.


This moves the current window to the bottom half of the screen.


This moves the window to the maximum size on the screen.


This minimizes the current window.


This toggles the system fullscreen on and off for the current window. This moves the window to it's own space taking up the entire screen.


This will list all the running apps. You can then just select one to bring it to the front, select with alt key to hide it, select with ctrl key to unhide it, and select with the fn key to close the application.


This snaps the current window to the closes grid box area.


This requires you to put the x, y for a starting position in a 3x3 matrix for the current window. Then you give the width and height. Therefore, to move the current window to the upper left most block in a 3x3 matric, you would do “mj:setgrid 0, 0, 1, 1”. There is also a hotkey set to this value as an example.


Type in a command string and it will be sent to Mjolnir directly!


This puts every window for FoldingText to the left half of the screen.


This focuses the window with the title “today.txt”. That is my todo list for the day.


This function list all running applications and allow the user to select one. It will show every window for that window in a matrix. It will then ask for the coordinates for the window in the expose. It will then put everything back and bring the selected window to the front.

There is a hotkey assignment to expose all FoldingText windows.

If the application only has one window, then it will simply bring that window to the front.


This will move the last window moved around to it’s position and size before the movement. This is a single level return.

This workflow is also set up with a Remote page as well. Have fun controlling your windows from your iPad or iPhone.