dotfiles/.local/bin/scripts/alchanger

44 lines
1.3 KiB
Text
Raw Normal View History

2021-10-30 11:20:10 +02:00
#!/bin/bash
## slightly modified version of https://github.com/mtwb47/scripts/blob/master/alchanger.sh
config="$HOME/.config/alacritty/colors.yml"
declare -a options=(
"doom-one"
"dracula"
"gruvbox-dark"
"monokai-pro"
"nord"
"oceanic-next"
"solarized-light"
"solarized-dark"
"tomorrow-night"
"quit"
)
choice=$(printf '%s\n' "${options[@]}" | fuzzel --dmenu --log-level=none -l 20 --prompt='Themes')
2021-10-30 11:20:10 +02:00
if [[ "$choice" == quit ]]; then
echo "No Theme Chosen" && exit 1
elif [[ "$choice" == 'doom-one' ]]; then
sed -i '/^colors:/c\colors: *doom-one' $config
elif [[ "$choice" == 'dracula' ]]; then
sed -i '/^colors:/c\colors: *dracula' $config
elif [[ "$choice" == 'gruvbox-dark' ]]; then
sed -i '/^colors:/c\colors: *gruvbox-dark' $config
elif [[ "$choice" == 'monokai-pro' ]]; then
sed -i '/^colors:/c\colors: *monokai-pro' $config
elif [[ "$choice" == 'nord' ]]; then
sed -i '/^colors:/c\colors: *nord' $config
elif [[ "$choice" == 'oceanic-next' ]]; then
sed -i '/^colors:/c\colors: *oceanic-next' $config
elif [[ "$choice" == 'solarized-light' ]]; then
sed -i '/^colors:/c\colors: *solarized-light' $config
elif [[ "$choice" == 'solarized-dark' ]]; then
sed -i '/^colors:/c\colors: *solarized-dark' $config
elif [[ "$choice" == 'tomorrow-night' ]]; then
sed -i '/^colors:/c\colors: *tomorrow-night' $config
fi