summary refs log tree commit diff
path: root/run_gnome_terminal_profile.sh
blob: 13a07f9080484ae1f11b8bfbf045e490d8a8f622 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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)']"