2024-05-27 18:46:33 -05:00
|
|
|
# Pick a preconfigured theme
|
2024-06-06 14:55:20 -05:00
|
|
|
THEME_NAMES=("Tokyo Night" "Nord" "Catppuccin" "Everforest" "Gruvbox" "Kanagawa" "Rose Pine")
|
|
|
|
THEME=$(gum choose "${THEME_NAMES[@]}" --header "Choose your theme" --height 9 | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
|
2024-06-03 15:26:40 -05:00
|
|
|
|
2024-06-03 21:18:44 -05:00
|
|
|
[ ! -n "$THEME" ] && exit 0
|
|
|
|
|
2024-06-03 15:26:40 -05:00
|
|
|
# Install theme in Gnome, Terminal, and both default editors
|
2024-06-09 04:16:43 -05:00
|
|
|
source $SUNHAT_PATH/themes/gnome/$THEME.sh
|
|
|
|
#cp $SUNHAT_PATH/themes/kitty/$THEME.conf ~/.config/kitty/kitty.conf
|
|
|
|
#cp $SUNHAT_PATH/themes/neovim/$THEME.lua ~/.config/nvim/lua/gib_nvim/colors.lua
|
2024-06-03 15:26:40 -05:00
|
|
|
|
|
|
|
# Translate to specific VSC theme name
|
|
|
|
if [ "$THEME" == "gruvbox" ]; then
|
2024-06-06 13:55:17 -05:00
|
|
|
VSC_THEME="Gruvbox Dark Medium"
|
|
|
|
VSC_EXTENSION="jdinhlife.gruvbox"
|
2024-06-03 15:26:40 -05:00
|
|
|
elif [ "$THEME" == "catppuccin" ]; then
|
2024-06-06 13:55:17 -05:00
|
|
|
VSC_THEME="Catppuccin Macchiato"
|
|
|
|
VSC_EXTENSION="Catppuccin.catppuccin-vsc"
|
2024-06-03 15:49:44 -05:00
|
|
|
elif [ "$THEME" == "tokyo-night" ]; then
|
2024-06-06 13:55:17 -05:00
|
|
|
VSC_THEME="Tokyo Night"
|
|
|
|
VSC_EXTENSION="enkia.tokyo-night"
|
2024-06-03 22:56:14 -05:00
|
|
|
elif [ "$THEME" == "everforest" ]; then
|
2024-06-06 13:55:17 -05:00
|
|
|
VSC_THEME="Everforest Dark"
|
|
|
|
VSC_EXTENSION="sainnhe.everforest"
|
2024-06-03 22:00:01 -05:00
|
|
|
elif [ "$THEME" == "rose-pine" ]; then
|
2024-06-06 13:55:17 -05:00
|
|
|
VSC_THEME="Rosé Pine Dawn"
|
|
|
|
VSC_EXTENSION="mvllow.rose-pine"
|
|
|
|
elif [ "$THEME" == "nord" ]; then
|
|
|
|
VSC_THEME="Nord"
|
|
|
|
VSC_EXTENSION="arcticicestudio.nord-visual-studio-code"
|
2024-06-06 14:55:20 -05:00
|
|
|
elif [ "$THEME" == "kanagawa" ]; then
|
|
|
|
VSC_THEME="Kanagawa"
|
|
|
|
VSC_EXTENSION="qufiwefefwoyn.kanagawa"
|
2024-06-03 15:26:40 -05:00
|
|
|
fi
|
2024-06-06 13:55:17 -05:00
|
|
|
code --install-extension $VSC_EXTENSION > /dev/null
|
2024-06-03 15:26:40 -05:00
|
|
|
sed -i "s/\"workbench.colorTheme\": \".*\"/\"workbench.colorTheme\": \"$VSC_THEME\"/g" ~/.config/Code/User/settings.json
|
2024-06-03 14:58:45 -05:00
|
|
|
|
2024-06-09 04:16:43 -05:00
|
|
|
echo "Restart your terminal for a full theme change (Super + Q to close. Super + T to open again)"
|