2023-09-13 13:28:57 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -o errexit # crash the script when a command crash
|
|
|
|
set -o pipefail # same as above for piped command
|
|
|
|
set -o nounset # crash when a variable doesnt exist
|
|
|
|
|
|
|
|
# TRACE=1 for debug
|
|
|
|
if [[ "${TRACE-0}" == "1" ]]; then
|
|
|
|
set -o xtrace
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd "$(dirname "$0")" # change script directory
|
|
|
|
|
|
|
|
main() {
|
|
|
|
if [ $# -eq 0 ]; then
|
|
|
|
echo "No arguments supplied"
|
|
|
|
else
|
2023-09-13 14:22:11 +02:00
|
|
|
local GT_default
|
|
|
|
GT_default=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \')
|
2023-09-13 13:28:57 +02:00
|
|
|
case $1 in
|
|
|
|
"sunset" ) # Go to dark mode
|
2023-09-13 13:43:40 +02:00
|
|
|
# Set the Dracula theme
|
2023-09-13 13:28:57 +02:00
|
|
|
set org.gnome.desktop.wm.preferences theme Dracula
|
2023-09-13 13:43:40 +02:00
|
|
|
# Set the Terminal profile
|
2023-09-13 22:48:07 +02:00
|
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ visible-name "Dark"
|
2023-09-13 14:22:11 +02:00
|
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ foreground-color "rgb(211,208,200)"
|
|
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ background-color "rgb(45,45,45)"
|
2023-09-13 13:43:40 +02:00
|
|
|
# Set the fish theme
|
|
|
|
fish -c "fish_config theme choose 'Base16 Eighties' && yes | fish_config theme save"
|
2023-09-13 21:47:07 +02:00
|
|
|
fish -c "set fish_color_comment 5c6773" # custom comment color
|
2023-09-18 09:57:12 +02:00
|
|
|
sed -i "s/bubblegum/default/g" "$HOME"/.config/micro/settings.json
|
2023-09-13 13:28:57 +02:00
|
|
|
;;
|
|
|
|
"sunrise" ) # Go to light mode
|
2023-09-13 13:43:40 +02:00
|
|
|
# Set the Terminal profile
|
2023-09-13 22:48:07 +02:00
|
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ visible-name "Light"
|
2023-09-13 14:22:11 +02:00
|
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ foreground-color "rgb(23,20,33)"
|
|
|
|
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ background-color "rgb(253,246,227)"
|
2023-09-13 13:43:40 +02:00
|
|
|
# Set the fish theme
|
|
|
|
fish -c "fish_config theme choose 'Solarized Light' && yes | fish_config theme save"
|
2023-09-18 09:57:12 +02:00
|
|
|
sed -i "s/default/bubblegum/g" "$HOME"/.config/micro/settings.json
|
2023-09-13 13:28:57 +02:00
|
|
|
;;
|
|
|
|
* )
|
|
|
|
echo "Can't interpret given argument" ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
main "$@"
|