ubuntu 20.04 将dock栏合并到panel
The Dash to Panel Gnome Shell extension does exactly what you want and is highly configurable.
You can install it from Ubuntu software (search Dash to panel), or using the terminal with the command
sudo apt install gnome-shell-extension-dash-to-panel.
Caveat: the extension is not automatically enabled. Log out and then back in. Then you will see the
extension in Gnome Tweaks, and you can enable it there.
To configure the extension, make sure you have Gnome Tweaks installed. In
Gnome Tweaks, find the extension on the Extensions tab and click the cog
icon to access the settings.