How to center the icons of my launcher?
Here is how my launcher looks:
And here is how I want the launcher to look like:
Kindly let me know what I can do to have a launcher icon in center as shown in the figure.
Solution 1:
Try the following setting changes in dconf-editor (works on 18.04)
gsettings set org.gnome.shell.extensions.dash-to-dock extend-height false
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM
gsettings set org.gnome.shell.extensions.dash-to-dock transparency-mode FIXED
gsettings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 64
gsettings set org.gnome.shell.extensions.dash-to-dock unity-backlit-items true
The property you want to modify to keep the dock only as big as its contents is the extend-height
. Set it to false
Source https://linuxconfig.org/how-to-customize-dock-panel-on-ubuntu-18-04-bionic-beaver-linux
Solution 2:
I don't know, how to customize default Unity dock, but I think, It must be really difficult. The only tool I found is unity-tweak-tool, but it behaves very strangely and there isn't setting for icons align.
Fortunately there are many alternative docks. I can show you, how to install and customize Plank (Default dock from Elementary OS) and use it together with default Unity dock.
I tested this on Ubuntu 17.04. I hope that it will work on 16.04 as well.
1. Install
Plank is available from official repositories.
sudo apt install plank
2. Set autostart
Hit Alt + F2 and run command: gnome-session-properties
. Than Add and fill inputs:
Name: what you want
Command: plank
Comment: what you want
Now close your session and login again.
3. Add Dash to Plank
Plank as default hasn't Dash launcher so you can add it if you want.
I use xdotool key super
command to simulate the Super key press. Read this for more info.
sudo apt install xdotool
Plank works with .desktop files so create one. Open Gedit, insert this:
[Desktop Entry]
Name=Dash
GenericName=Open Ubuntu Dash
Exec=xdotool key super
Terminal=false
Type=Application
Icon=/usr/share/unity/icons/launcher_bfb.png
StartupNotify=false
Check if the icon exists or use your own icon.
Save as Dash.desktop to your home folder. Open nautilus
(Files), find this file and in Properties/Permissions allow executing file as program.
Drag file from Nautilus and drop it to Plank dock.
4. Customize
For Plank customization hit Alt + F2 and run command: plank --preferences
.
Finally, I suggest you enable auto-hiding for default Unity dock and set it to left side, because in some cases it may overlap Plank.
Solution 3:
To bring dock to the bottom
$ gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM
To bring dock to the center
$ gsettings set org.gnome.shell.extensions.dash-to-dock extend-height false
result