summary refs log tree commit diff
path: root/run_gnome_terminal_profile.sh
diff options
context:
space:
mode:
authorSophie <sophie@yoga>2023-09-24 22:21:35 +0400
committerSophie <sophie@yoga>2023-10-14 00:28:01 +0400
commitc7c5400c24a689d6466d316cc5cf6ab1082e266e (patch)
tree2dfc72e832ea50e364325e915c1bc8e0d58c6bdc /run_gnome_terminal_profile.sh
parentbb3cfbc180e98fa2b8cb92795492d74c96b5d465 (diff)
Apply default gnome terminal default profile feature/setup-gnome-terminal-profile
Diffstat (limited to 'run_gnome_terminal_profile.sh')
-rwxr-xr-xrun_gnome_terminal_profile.sh30
1 files changed, 30 insertions, 0 deletions
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)']"