Skip to content

Instantly share code, notes, and snippets.

@mtesseracted
Created March 6, 2018 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtesseracted/c33e216ba4d724b581b12f7ae31c9857 to your computer and use it in GitHub Desktop.
Save mtesseracted/c33e216ba4d724b581b12f7ae31c9857 to your computer and use it in GitHub Desktop.
Export / Import Gnome Terminal Profiles

Export Gnome Terminal Profile

List profiles

dconf dump /org/gnome/terminal/legacy/profiles:/

Determine the terminal profile string for the profile you will need. This is the terminal profile that I will export:

[:1430663d-083b-4737-a7f5-8378cc8226d1]
foreground-color='#C3C3C7C7D1D1'
visible-name='Material Colors'
palette=['#070736364141', '#EBEB60606B6B', '#C3C3E8E88D8D', '#F7F7EBEB9595', '#8080CBCBC3C3', '#FFFF24249090', '#AEAEDDDDFFFF', '#FFFFFFFFFFFF', '#00002B2B3636', '#EBEB60606B6B', '#C3C3E8E88D8D', '#F7F7EBEB9595', '#7D7DC6C6BFBF', '#6C6C7171C3C3', '#343443434D4D', '#FFFFFFFFFFFF']
default-size-columns=100
default-size-rows=28
use-system-font=false
use-theme-colors=false
font='Source Code Pro 10'
allow-bold=false
bold-color-same-as-fg=true
bold-color='#FFFFFFFFFFFF'
background-color='#1E1E28282C2C'
audible-bell=false
scrollbar-policy='never'

And the string that I will need to use to export is

:1430663d-083b-4737-a7f5-8378cc8226d1

The command to export that profile is (note the ending slash)

dconf dump /org/gnome/terminal/legacy/profiles:/:1430663d-083b-4737-a7f5-8378cc8226d1/ > material-theme-profile.dconf

To restore the profile

dconf load /org/gnome/terminal/legacy/profiles:/:1430663d-083b-4737-a7f5-8378cc8226d1/ < material-theme-profile.dconf
@mtesseracted
Copy link
Author

mtesseracted commented Mar 6, 2018

Idea: pretty easy to encapsulate into script.

Features:
(i) List available 'visible-name=' profiles from the local dconf db or a log file
(ii) save a given 'visible-name=' profile to a log file
(iii) load a profile from a log file to the local dconf db

can also do the same for GUI settings:
https://github.com/linuxmint/Cinnamon/wiki/Backing-up-and-restoring-your-cinnamon-settings-(dconf)

NB: /org/gnome/terminal/legacy/profiles:/ is not a path but a list of dconf keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment