In regard to: Re: [oi-dev] mate-tweak?, Alexander Pyhalov via oi-dev said...:

I don't know how to handle this in Mate theme, but you can create a set
of dconf settings and import them with dconf - for example see
https://github.com/OpenIndiana/oi-userland/commit/005fb56930218fbf86686be21f4dca1f5db0bbf3
. To do more customization to mate-panel we just patch it.

To add to what Alexander said, you can use gsettings to both query
and set a lot of the desktop settings, including stuff not exposed by
the preferences GUIs.  For some stuff (like creating a new profile in
the terminal app) you must use dconf.

One workflow that you may find useful is

        gsettings list-recursively | sort > /tmp/before-my-change
        # make some desktop change via the GUIs
        gsettings list-recursively | sort > /tmp/after-my-change
        gdiff -u /tmp/before-my-change /tmp/after-my-change

to figure out which settings control the behavior you're altering.

From that point on, you can just put a 'gsettings set' with your
setting and value in a script, and have everything configured without
having to hunt through a bunch of GUIs.

I'm including the script I use for customizing my environment when I'm
spinning up a new hipster build box.  Hopefully you find some useful
examples in there.

Tim
--
Tim Mooney                                             [email protected]
Enterprise Computing & Infrastructure                  701-231-1076 (Voice)
Room 242-J6, Quentin Burdick Building                  701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164


#! /bin/sh

# Author : Tim Mooney <[email protected]>
# Usage  :
#
#          hipster-environment-setup.sh
#
# Purpose: Do a bunch of (personal) environment setup to get basic GUI
# and shell settings more usable.
#
# See the dconf and especially gsettings documentation
#
PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/ccs/bin; export PATH

yyyymmdd=`/bin/date +%Y%m%d`

echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo '+                                                                     +'
echo '+ Ensuring system/font/truetype/hack is installed:                    +'
echo '+                                                                     +'
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo
is_installed=`sudo pkg list | egrep 'font/truetype/hack'`
if test X"$is_installed" = X"" ; then
        sudo pkg install system/font/truetype/hack
else
        echo '='
        echo '= Already installed, no changes needed.'
        echo '='
fi

echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo '+                                                                     +'
echo '+ Setting window titlebar double-click action to maximize vertically: +'
echo '+                                                                     +'
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo
echo gsettings set org.mate.Marco.general action-double-click-titlebar 
'toggle_maximize_vertically'
gsettings set org.mate.Marco.general action-double-click-titlebar 
'toggle_maximize_vertically'

echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo '+                                                                     +'
echo '+ Setting Caps Lock to be another control key:                        +'
echo '+                                                                     +'
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo
echo gsettings set org.mate.peripherals-keyboard-xkb.kbd options 
"['ctrl\tctrl:nocaps']"
gsettings set org.mate.peripherals-keyboard-xkb.kbd options 
"['ctrl\tctrl:nocaps']"

echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo '+                                                                     +'
echo '+ Lowering Log out delay from 60 to 10 seconds:                       +'
echo '+                                                                     +'
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo
echo gsettings set org.mate.session logout-timeout 10
gsettings set org.mate.session logout-timeout 10

echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo '+                                                                     +'
echo '+ Checking whether an additional terminal profile has been created:   +'
echo '+                                                                     +'
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo
profile0=`dconf read /org/mate/terminal/global/profile-list |  egrep 'profile.'`
if test X"$profile0" = X"" ; then
        echo '+'
        echo '+ profile0 is not present, creating...'
        echo '+'
        tfile=`mktemp /tmp/dconf-XXXXXX`
        if test X"$tfile" = X"" || test ! -f $tfile ; then
                echo "Failed to create temporary file for dconf settings" >&2
                exit 1
        fi
        dconf dump /org/mate/terminal/profiles/default/ > $tfile
        dconf load /org/mate/terminal/profiles/profile0/ < $tfile
else
        echo '='
        echo '= Already installed, no need to create profile0.'
        echo '='
fi


echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo '+                                                                     +'
echo '+ Applying personal preferences to mate-terminal profile0:            +'
echo '+                                                                     +'
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo dconf write /org/mate/terminal/profiles/profile0/visible-name \
        "'Hack Bold 14'"
dconf write /org/mate/terminal/profiles/profile0/visible-name "'Hack Bold 14'"

#
# make it a login shell:
#
echo dconf write /org/mate/terminal/profiles/profile0/login-shell true
dconf write /org/mate/terminal/profiles/profile0/login-shell true

#
# set the scrollback buffer to 2048 lines
#
echo dconf write /org/mate/terminal/profiles/profile0/scrollback-lines 2048
dconf write /org/mate/terminal/profiles/profile0/scrollback-lines 2048

#
# disable the use of the system font for the terminal:
#
echo dconf write /org/mate/terminal/profiles/profile0/use-system-font false
dconf write /org/mate/terminal/profiles/profile0/use-system-font false

#
# set the terminal font to 'Hack Bold 14'
#
echo dconf write /org/mate/terminal/profiles/profile0/font "'Hack Bold 14'"
dconf write /org/mate/terminal/profiles/profile0/font "'Hack Bold 14'"

#
# disable the use of theme colors
#
echo dconf write /org/mate/terminal/profiles/profile0/use-theme-colors false
dconf write /org/mate/terminal/profiles/profile0/use-theme-colors false

#
# set the foreground color
#
echo dconf write /org/mate/terminal/profiles/profile0/foreground-color \
        "'#320FCDCD320F'"
dconf write /org/mate/terminal/profiles/profile0/foreground-color \
        "'#320FCDCD320F'"

#
# set the background color
#
echo dconf write /org/mate/terminal/profiles/profile0/background-color \
        "'#333333333333'"
dconf write /org/mate/terminal/profiles/profile0/background-color \
        "'#333333333333'"

echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo '+                                                                     +'
echo '+ Making profile0 the default mate-terminal profile:                  +'
echo '+                                                                     +'
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
#
# add our loaded profile to the global list of profiles
#
echo dconf write /org/mate/terminal/global/profile-list \
        "['default','profile0']"
dconf write /org/mate/terminal/global/profile-list \
        "['default','profile0']"


#
# now make it the default:
#
echo dconf write /org/mate/terminal/global/default-profile  "'profile0'"
dconf write /org/mate/terminal/global/default-profile "'profile0'"

_______________________________________________
oi-dev mailing list
[email protected]
https://openindiana.org/mailman/listinfo/oi-dev

Reply via email to