Skip to content

Commit

Permalink
Add a bash function to download and install Nerd Fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
leouieda committed Sep 13, 2024
1 parent f5800d8 commit 2089e91
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bash/.bash/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ alias untar='tar -xvf'
alias untargz='tar -xzvf'
alias untarbz='tar -xjvf'
alias lab='cd ~ && yavanna && tmux new-session -s lab -d jupyter-lab && cd $OLDPWD'
alias v='nvim'
alias nvim='~/bin/nvim.appimage'
alias v='~/bin/nvim.appimage'
alias m='make'
alias errcho='>&2 echo'

Expand Down
16 changes: 16 additions & 0 deletions bash/.bash/functions/fonts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Dowload and install Nerd Fonts https://www.nerdfonts.com

nerdfonts() {
if [[ $# -le 0 ]]; then
echo "Usage: nerdfonts FontName"
echo ""
echo "The name should be the package in the nerdfonts release page: https://github.com/ryanoasis/nerd-fonts/releases/latest"
else
wget -P ~/.local/share/fonts https://github.com/ryanoasis/nerd-fonts/releases/latest/download/$1.zip \
&& cd ~/.local/share/fonts \
&& unzip $1.zip \
&& rm $1.zip \
&& fc-cache -fv
cd -
fi
}

0 comments on commit 2089e91

Please sign in to comment.