Created
December 12, 2015 21:43
-
-
Save andytumelty/4ac0e672c73789f85ee3 to your computer and use it in GitHub Desktop.
gnome-terminal settings sync
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# export-settings | |
# echos all gnome-terminal dconf settings for the first gnome-terminal profile | |
# the idea is you'll direct the output of this to somewhere to be consumed by | |
# import-settings | |
# note: I have no idea what the order of the profiles list is. I only have one | |
# profile, so don't really care either | |
profile_id=$(dconf list /org/gnome/terminal/legacy/profiles:/ | head -1) | |
# currently grabs all settings, suggest moving list of setting to config file | |
while read setting; do | |
echo "$setting:$(dconf read /org/gnome/terminal/legacy/profiles:/$profile_id$setting)" | |
done <<< "$(dconf list /org/gnome/terminal/legacy/profiles:/$profile_id)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# import-settings $settings-file | |
# imports saved gnome-terminal settings from the specified file | |
# settings are dconf settings in the form key:"value" and are imported to the | |
# first reported terminal profile | |
profile_id=$(dconf list /org/gnome/terminal/legacy/profiles:/ | head -1) | |
settings_file=$1 | |
# currently grabs all settings, suggest moving list of setting to config file | |
while read setting; do | |
key=${setting%%:*} | |
value=${setting##*:} | |
echo "dconf write /org/gnome/terminal/legacy/profiles:/$profile_id$key \"$value\"" | |
dconf write /org/gnome/terminal/legacy/profiles:/$profile_id$key "$value" | |
done < $settings_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment