Alternative dock with win hotkeys

Currently Ubuntu MATE ships with the Plank dock, which is not even enabled by the default desktop layout. And while this app is cool, its description says it is meant to be the simplest dock on the planet - and it is so simple it does not work with hotkeys, and looks like there is literally no way to configure them. Surely you can just setup hotkeys for your favorite apps, but they will only create new windows - if you want to switch between already open ones or minimize them that'll require some scripting with something like wmctrl and xdotool, and will work only for apps you configure manually while the dock can handle any existing windows. Luckily there is another option for people who like to use the hotkeys Win+1, Win+2 and so on, like the dock works in KDE or Cinnamon. There is a better (in my opinion) MATE dock applet available in the universe repository, part of the software originally written for Ubuntu MATE:

# apt install mate-dock-applet

Now you need to add the dock to a panel -- as the dock is like any other panel applet, you can add it to a panel by right-clicking on a panel, then clicking Add to Panel... in the menu that pops up, then choosing the Dock. I'd suggest that you create a new, otherwise empty panel to add the dock applet to; by doing so, you can drag the panel to wherever you want the dock to be. Due to a bug, the dock may initially not show any icons; if this happens, try logging out and logging back in.

There are few things you should know about this dock:

  • If you right click an application icon on the dock there is a Pin to Panel option - it does not pin the app to the dock. To pin an app to the dock, hover over the icon and wait for the popup menu, or go to Dock Preferences -> Panel options and check Disable popup action list, which will move all options to the right-click context menu.

  • In the Preferences you will also find an option to show thumbnails for open windows, but it says this feature requires Compiz. For me the thumbnails didn't work when I enabled Compiz. I had to switch from Compiz to Marco as my window manager to get the thumbnails to work, and by switching I lost some other features of the dock; however your mileage may vary, and you may be able to use Compiz with the dock and get thumbnails.

    NOTE: To switch to Marco instead of Compiz, a lot of steps were carried out below by the original poster of this tutorial. I barely understand some of the reasoning for the steps and believe that the steps are semi-dangerous and unnecessarily complicated; generally speaking it is best to just switch to Marco using the MATE Tweak Tool -- there is a tab in the Tool called Windows and a list of window managers to choose from; select Marco (adaptive compositor) and you should be good to go, no need to uninstall anything dangerously. However, should anyone need to use the steps the original poster took, the steps are still preserved below: