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.
John Mertz 2023-07-20 16:03:20 -04:00
parent aeffca21f0
commit ad27c1f783
Signed by: jpm
GPG Key ID: E9C5EA2D867501AB
1 changed files with 15 additions and 0 deletions

15 Executable file
View File

@ -0,0 +1,15 @@
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"