Use Plank On Multiple Monitors Without Creating Multiple Docks With autoplank

Plank Dock

autoplank is a small tool written in Go which adds multi-monitor support to Plank dock without having to create multiple docks.

When you move your mouse cursor to the bottom of a monitor, autoplank detect your mouse movement using xdotool and it automatically moves Plank to that monitor. This tool only works if Plank is set to run at the bottom of the screen, at least for now.

There's a slight delay until Plank actually shows up on the monitor where the mouse is though. The developer says this is intentional, to make sure you actually want to access Plank on that monitor. The time delay before showing plank is not currently configurable, but that may change in the future.

[Edit] autoplank stopped working and a couple of pull requests on GitHub fix that, but the autoplank developer seems inactive and did not merge those pull requests, that's why in the commands below we'll also get those these 1 2 pull requests besides the autoplank code. Although it works, autoplank is a bit buggy with these pull requests.

The behavior also changes when including these pull requests. With these fixes, Plank is shown on a different monitor as soon as the mouse enters that monitor, with no delay. This causes Plank to flicker slightly (I didn't find it too distracting, but you may have a different opinion) when it's moved between monitors, if Plank is set to hide, in all modes except "Autohide". With "Autohide" this is not noticeable because the dock is only shown when moving the mouse near the bottom of the screen. It is very noticeable though if hiding Plank is completely turned off, so I don't recommend using autoplank if you want to keep Plank always visible!

It's also important to note that with these 2 extra pull requests, the Plank preferences window closes when moving the mouse to a different monitor.

autoplank should work with elementary OS, as well as any desktop environment or Linux distribution you use Plank dock on.

Plank is a simple dock that shows icons of running applications / windows. The application allows pinning applications to the dock, and comes with a few built-in simple "docklets": a clipboard manager, clock, CPU monitor, show desktop and trash. To access its settings, hold down the Ctrl key while right clicking anywhere on the Plank dock, and then clicking on Preferences.

Plank is used by default in elementary OS, but it can be used on any desktop environment or Linux distribution you wish.

Install autoplank


On its GitHub page, it's mentioned that you need Go 1.8 or newer to build autoplank but I was able to successfully build it with Go 1.6 in Ubuntu 16.04 (elementary OS 0.4 Loki).

The developer has said on Reddit that he will provide binaries for autoplank, but they aren't available for now. It's very easy to build it from source though.

1. Install required dependencies.

To build autoplank you'll need Go (golang-go in Debian, Ubuntu, elementary OS, etc.). To get the latest Git code you'll also need git, and for detecting the monitor on which you move the mose, you'll also need to install xdotool.

Install these in Ubuntu, Debian, elementary OS and so on, by using this command:

sudo apt install git golang-go xdotool

2. Get the latest autoplank from Git, build it, and install it in /usr/local/bin.

git clone https://github.com/abiosoft/autoplank

cd autoplank

git fetch origin pull/6/head:fixes

git fetch origin pull/7/head:fixes

git checkout fixes

go build -o autoplank

sudo mv autoplank /usr/local/bin/

You can remove the autoplank folder from your home directory now.

When you want to uninstall autoplank, simply remove the /usr/local/bin/autoplank binary (sudo rm /usr/local/bin/autoplank).

3. Add autoplank to startup.

If you want to try autoplank before adding it to startup or creating a systemd service for it, you can simply type autoplank in a terminal to start it.

To have autoplank work between reboots, you'll need to add it to your startup applications. The exact steps for doing this depend on your desktop environments, so I won't tell you exactly how to do that for every desktop environment, but remember to use /usr/local/bin/autoplank as the executable in Startup Applications.

In elementary OS, you can open System Settings, then in Applications, on the Startup tab, click the + button in the bottom left-hand side corner of the window, then add /usr/local/bin/autoplank in the Type in a custom command field:

Startup elementary OS

The order in which Plank and autoplank are launched shouldn't matter.

Another way of using autoplank is by creating a systemd service for it, as explained here. Using a systemd service for autoplank has the advantage of restarting autoplank if it crashes for whatever reason. Use either the systemd service or add autoplank to your startup applications (don't use both).

4. After you do this, logout, login and autoplank should be running so you can move the mouse at the bottom of a monitor to move Plank dock there.