By default Ubuntu Dock in Ubuntu 17.10 and later releases always extends to the edges (top-bar-to-bottom if placed on the left or right and left-to-right when placed at the bottom) even when it's not filled with icons.
Is there a way to prevent this behaviour (i.e. I want to make the dock-length flexible so that as the number of application icons in the dock increases, it should expand accordingly)?
In other words, is there a way make Ubuntu Dock look like a "proper dock" instead of a side/bottom panel with full-height/width?
Open Terminal and run
To revert to the "panel mode" run
Using either the
Gnome Tweak Tool
, or https://extensions.gnome.org/local/, disable the 17.10 built-inUbuntu Dock
extension, and install the more configurableDash to Dock
extension, and it'll give you the shorter dock you desire.https://extensions.gnome.org/extension/307/dash-to-dock/