From ad27c1f783f776ab0b6f54435771a83a824b36f1 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Thu, 20 Jul 2023 16:03:20 -0400 Subject: [PATCH] Script to update gnome settings Should take any modified settings and write them as the default settings. I do not remember if this actually worked. The intent was so that, when a terminal was openned using a different profile, those preferences would become the defaults for new actions. I don't remember the exact impetus for this either. No longer using gnome-terminal, so I'm just storing this for posterity. --- update_gnome_profile.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 update_gnome_profile.sh diff --git a/update_gnome_profile.sh b/update_gnome_profile.sh new file mode 100755 index 0000000..f488288 --- /dev/null +++ b/update_gnome_profile.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +PROFILES=`gsettings get org.gnome.Terminal.ProfilesList list | sed -e 's/\[\(.*\)\]/\1/' |sed -e "s/[\',]//g"` +for i in $PROFILES; do + CURRENT=`gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:${i}/ visible-name | sed -e "s/'\(.*\)'/\1/"` + if [[ $1 == $CURRENT ]]; then + for j in `gsettings list-keys org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:${i}/`; do + k=`gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:${i}/ $j` + #echo $k + echo gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles/ $j \'$k\' + gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles/ $j "$k" + done + exit + fi +done