28 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/bin/bash
 | 
						|
set -e
 | 
						|
 | 
						|
# Pick a preconfigured theme
 | 
						|
THEME=$(gum choose "Tokyo Night" "Gruvbox" "Catppuccin" "Rose Pine" --height 6 | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
 | 
						|
 | 
						|
[ ! -n "$THEME" ] && exit 0
 | 
						|
 | 
						|
# Install theme in Gnome, Terminal, and both default editors
 | 
						|
source $OMAKUB_PATH/themes/gnome/$THEME.sh
 | 
						|
cp $OMAKUB_PATH/themes/alacritty/$THEME.toml ~/.config/alacritty/theme.toml
 | 
						|
cp $OMAKUB_PATH/themes/neovim/$THEME.lua ~/.config/nvim/lua/plugins/theme.lua
 | 
						|
sed -i "s/theme \".*\"/theme \"$THEME\"/g" ~/.config/zellij/config.kdl
 | 
						|
 | 
						|
# Translate to specific VSC theme name
 | 
						|
if [ "$THEME" == "gruvbox" ]; then
 | 
						|
	VSC_THEME="Gruvbox Dark Medium"
 | 
						|
elif [ "$THEME" == "catppuccin" ]; then
 | 
						|
	VSC_THEME="Catppuccin Macchiato"
 | 
						|
elif [ "$THEME" == "tokyo-night" ]; then
 | 
						|
	VSC_THEME="Tokyo Night"
 | 
						|
elif [ "$THEME" == "rose-pine" ]; then
 | 
						|
	VSC_THEME="Rosé Pine Dawn"
 | 
						|
fi
 | 
						|
sed -i "s/\"workbench.colorTheme\": \".*\"/\"workbench.colorTheme\": \"$VSC_THEME\"/g" ~/.config/Code/User/settings.json
 | 
						|
 | 
						|
echo "Restart your terminal and editor if theme hasn't changed"
 |