Created
January 27, 2021 16:03
-
-
Save l00sed/78dddae4f45e84159fb9744f5e8fc195 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ========================== ~/.bashrc | |
# Alacritty Colors | |
# -------------------------- | |
# Requires colortty: | |
# https://github.com/shuhei/colortty | |
# Requires perl: | |
# https://learn.perl.org/installing/unix_linux.html | |
# -------------------------- | |
function theme() { | |
# Add '## <- START ->' and '## <- END ->' strings to the bottom of your ~/.config/alacritty/alacritty.yml | |
ColorStart='## <- START ->' | |
ColorEnd='## <- END ->' | |
color="$(colortty get "$1")" | |
perl -0777 -pi -e 's/'"$ColorStart"'.*?'"$ColorEnd"'/'"$ColorStart\n$color\n$ColorEnd"'/sg;' ~/.config/alacritty/alacritty.yml | |
if [[ "$1" == "Tomorrow" ]] | |
then | |
echo "Tomorrow" | |
fi | |
if [[ "$1" == "Duotone Dark" ]] | |
then | |
echo "wwdc16" | |
fi | |
} | |
export -f theme | |
# Light Theme | |
#export VIM_COLOR="$(theme 'Tomorrow')" | |
# Dark Theme | |
export VIM_COLOR="$(theme 'Duotone Dark')" | |
# ================================= ~/.vimrc | |
# You should have any AirlineThemes installed | |
# --------------------------------- | |
if !empty($VIM_COLOR) | |
colo $VIM_COLOR | |
if $VIM_COLOR == "Tomorrow" | |
let g:airline_theme='base16_snazzy' | |
endif | |
if $VIM_COLOR == "wwdc16" | |
let g:airline_theme='base16color' | |
endif | |
endif | |
Author
l00sed
commented
Jan 27, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment