Three methods to Enable ‘Minimize on Click’ for Ubuntu Dock Icons

Your Ubuntu Dock is a useful tool for accessing common applications and also the ones you add to it as Favorites. The default behavior of the icons in the dock ‘on click’ is:

  • The respective application opens if it is already not running.
  • The respective application comes in focus if it is already running.
  • The respective application DOES NOT minimize if it is in focus.

This third behavior is what we want to change here. Although many of us think that it should be the default ‘on click’ behavior of the dock icons, unfortunately it is not. Also, the Settings utility does not provide any way to customize this behavior.

However, Ubuntu is very customizable and there are many ways to change the behavior of many workspace items, including the dock. In this article, we will describe three ways for you to customize the behavior of your dock icons:

  1. Through the Dconf Editor
  2. By configuring Gnome Shell Extensions Through the Command Line
  3. By configuring Gnome Shell Extensions Through the User Interface

We have run the commands and procedures mentioned in this article on a Ubuntu 18.04 LTS system.

Method 1: Through the Dconf Editor

In order to configure your desktop settings through the dconf Editor, you first need to install it by running the following command in your Ubuntu Terminal:

$ sudo apt-get install dconf-editor

You can open the Terminal either through the system Dash or the Ctrl+Alt+T shortcut.

Please enter the password for sudo in case you are asked to do so as only an authorized user can install/uninstall and configure software on Ubuntu.

Install Dconf Editor

You can launch the Dconf Editor through the GUI by searching for it through the system Dash:

Dconf Editor Icon

Or, launch it through the command line by entering the following command in your Terminal:

$ dconf-editor

The dconf Editor will launch, displaying the following message:

Launch Dconf Editor

The message means that you need to be very careful while performing system configurations as it might mess up with sensitive settings and break down your system. After clicking the “I’ll be careful” button, search for “dash-to-dock” through the search button. This will display the following result:

Search for dash-to-dock

Click on the /org/gnome/shell/extensions/dash-to-dock/ folder. This will open the following view:

dash-to-dock click action

Try to locate the click-action key by scrolling down in the same window and then click on it. The following window will open:

Configure Click action

Switch off the Use default value slider button; this will activate the Custom value drop-down for you.

Set custom value

Select the ‘minimize’ option in order to set the Dock icons to be minimized on click and then click the Apply button. As soon as you do so, the behavior of your icons on click will change. You can now quit the DConf Editor.

Method 2: Configure Gnome Shell Extensions Through the Command Line

For a Terminal-savvy person, here is the recommended approach to set your dock icons to be minimized on click:

Open the Ubuntu command line, the Terminal, either through the system Dash or the Ctrl+Alt+T shortcut.

Then enter the following command in order to configure the new dock settings:

$ gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'

Use gsettings app

As soon as you do so, your new settings will immediately take effect.

You can now exit the Terminal.

Revert the Configuration

If you want to cancel the settings you made to the behavior of the dock icons, you can run the following command in your Terminal:

$ gsettings reset org.gnome.shell.extensions.dash-to-dock click-action

Method 3: Through Gnome Shell Extensions (UI)

In order to use the Gnome Extension 'Dash to Dock' through the UI in order to configure the behavior of your dock icons, please follow this method:

Open the Ubuntu Software Manager and look up for Gnome Tweaks:

Install Gnome Tweaks

Click on the similar search result that you see above and install it on your system.

Then search for the Dash to Dock extension from the Software Manager and also install this extension on your system.

Dash To Dock

Now open the Tweaks tool from the system Dash and switch to the Extensions tab: Configure Dash-To-Dock Extensions

In the Extensions view, you will be able to see the Dash to dock extension which will be enabled by default. Because of this, you will also see some changes in the behavior and appearance of the dock. If this behavior seems unnecessary to you, simply switch off the slider button.

Now click on the settings icon adjacent to the slider button to make your desired settings.

The Dash to Dock settings will appear. Click on the Behavior tab and then click select Minimize option from the Click action drop-down.

Set click action to Minimize

As soon as you do so, the behavior of your dock icons will change according to the new settings.

So now, you do not have one but three ways through which you can set your dock icons to be minimized on click.