From c7c5400c24a689d6466d316cc5cf6ab1082e266e Mon Sep 17 00:00:00 2001 From: Sophie Date: Sun, 24 Sep 2023 22:21:35 +0400 Subject: Apply default gnome terminal default profile --- run_gnome_terminal_profile.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 run_gnome_terminal_profile.sh (limited to 'run_gnome_terminal_profile.sh') diff --git a/run_gnome_terminal_profile.sh b/run_gnome_terminal_profile.sh new file mode 100755 index 0000000..13a07f9 --- /dev/null +++ b/run_gnome_terminal_profile.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +set -e + +DCONF_PATH=/org/gnome/terminal/legacy/profiles: +DEFAULT_UUID=b1dcc9dd-5262-4d8d-a863-c897e6d979b9 + +PROFILES=$(dconf read ${DCONF_PATH}/list | tr -d '[' | tr -d ']') + +readarray -td, LISTED_PROFILES <<< ${PROFILES}; +declare LISTED_PROFILES; + +if [[ ${LISTED_PROFILES[@]} =~ ${DEFAULT_UUID} ]] +then + echo "Default gnome terminal profile already set" +else + NEW_PROFILES="['${DEFAULT_UUID}', ${PROFILES}]" + dconf write ${DCONF_PATH}/list "$NEW_PROFILES" +fi + +dconf write ${DCONF_PATH}/default "'${DEFAULT_UUID}'" +dconf write ${DCONF_PATH}/:${DEFAULT_UUID}/use-theme-colors "false" +dconf write ${DCONF_PATH}/:${DEFAULT_UUID}/use-system-font "false" +dconf write ${DCONF_PATH}/:${DEFAULT_UUID}/font "'Monospace 12'" +dconf write ${DCONF_PATH}/:${DEFAULT_UUID}/visible-name "'Default Theme'" +dconf write ${DCONF_PATH}/:${DEFAULT_UUID}/default-size-columns "80" +dconf write ${DCONF_PATH}/:${DEFAULT_UUID}/default-size-rows "24" +dconf write ${DCONF_PATH}/:${DEFAULT_UUID}/background-color "'rgb(23,20,33)'" +dconf write ${DCONF_PATH}/:${DEFAULT_UUID}/foreground-color "'rgb(208,207,204)'" +dconf write ${DCONF_PATH}/:${DEFAULT_UUID}/palette "['rgb(46,52,54)', 'rgb(204,0,0)', 'rgb(78,154,6)', 'rgb(196,160,0)', 'rgb(52,101,164)', 'rgb(117,80,123)', 'rgb(6,152,154)', 'rgb(211,215,207)', 'rgb(85,87,83)', 'rgb(239,41,41)', 'rgb(138,226,52)', 'rgb(252,233,79)', 'rgb(114,159,207)', 'rgb(173,127,168)', 'rgb(52,226,226)', 'rgb(238,238,236)']" -- cgit 1.4.1-2-gfad0