I would like to be able to hide the tabs in gnome-terminal since I switch tabs with shortcuts and don't need or want the graphical tabs. Is there a way to hide them?
1 Answers
This works for me on Debian 10 with gnome-terminal 3.30.2.
If you look at the allowed values for tab-policy you will see:
$ gsettings range org.gnome.Terminal.Legacy.Settings tab-policy
enum
'always'
'automatic'
With a couple of minor changes to /usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.xml you can enable what appears to be an existing setting that will allow you to turn the tabs on and off.
--- /usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.xml 2018-12-25 13:45:29.000000000 -0800
+++ /tmp/org.gnome.Terminal.gschema.xml 2019-12-06 13:22:19.318272624 -0800
@@ -38,7 +38,7 @@
<enum id='org.gnome.Terminal.TabsbarPolicy'>
<value nick='always' value='0'/>
<value nick='automatic' value='1'/>
- <!-- <value nick='never' value='2'/> -->
+ <value nick='never' value='2'/>
</enum>
<enum id='org.gnome.Terminal.ThemeVariant'>
@@ -727,7 +727,7 @@
</key>
<key name="tab-policy" enum="org.gnome.Terminal.TabsbarPolicy">
- <default>'automatic'</default>
+ <default>'never'</default>
<summary>When to show the tabs bar</summary>
</key>
After the change you should see 'never' as a possible value:
$ gsettings range org.gnome.Terminal.Legacy.Settings tab-policy
enum
'always'
'automatic'
'never'
Note that you might need to run the following as root after editing the xml file:
# cd /usr/share/glib-2.0/schemas
# glib-compile-schemas .
After restarting your gnome-terminal tabs can be turned off with:
$ gsettings set org.gnome.Terminal.Legacy.Settings tab-policy 'never'
And turned back on with:
$ gsettings set org.gnome.Terminal.Legacy.Settings tab-policy 'always'
Update (Oct 2021)
The above no longer works in Debian 11. The schema change now needs to be made in the source. The following works for me.
$ apt source gnome-terminal
$ cd gnome-terminal-3.42.0
edit src/org.gnome.Terminal.gschema.xml and uncomment the never value in TabsbarPolicy
$ debuild -b -uc -us
$ cd ..
$ sudo dpkg -i gnome-terminal_3.42.0-1_amd64.deb gnome-terminal-data_3.42.0-1_all.deb