How to merge these two bars, e.g. the menu bar of any application (here Firefox) with the desktop top bar (I don't know if it has some kind of official name) on GNOME (42.0), into only one bar in order to save vertical space on a laptop screen:
Fig.1: The top row of pixels of this screenshot correspond to the top row of pixels of the monitor.
System info:
OS: Ubuntu 22.04 jammy
Kernel: x86_64 Linux 5.15.0-25-generic
Shell: bash 5.1.16
DE: GNOME 42.0
WM: Mutter
WM Theme: Adwaita
GTK Theme: Yaru [GTK2/3]
Icon Theme: Yaru
This is difficult to globally support in the diverse Linux ecosystem. An nice attempt to have a global menu, i.e., a menu that for any window is displayed on the top bar, combined with a HUD, is implemented through the Fildem project. A HUD is a way to search a menu for commands.
Linux Uprising has a post on Fildem. Due to the diversity of the Linux ecosystem, such attempts have limitations:
Other ways to save vertical screen real estate
Hide the top bar (extensions: Hide Panel Lite by fthx, Hide Panel by fthx, Hide Top Bar by tuxor1337)
Merge panel and legacy title bar (extension: Unite by hardpixel)
At the application level: turn the legacy title bar in Firefox browser or Thunderbird off, maximize the application (Super+Up, command line options to have them start full screen)
https://extensions.gnome.org/extension/1287/unite/ found this came across a few other's just forget the names. have not found an app it won't work with yet