Skip to content

Instantly share code, notes, and snippets.

@cecepm
Created April 12, 2021 01:30
Show Gist options
  • Select an option

  • Save cecepm/64fccd609adc0c96fb2292c0e1c74451 to your computer and use it in GitHub Desktop.

Select an option

Save cecepm/64fccd609adc0c96fb2292c0e1c74451 to your computer and use it in GitHub Desktop.
Install Meslo Nerd Font patched for Powerlevel10k
mkdir -p ~/.fonts
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf --output ~/.fonts/'MesloLGS NF Regular.ttf'
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf --output ~/.fonts/'MesloLGS NF Bold.ttf'
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf --output ~/.fonts/'MesloLGS NF Italic.ttf'
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf --output ~/.fonts/'MesloLGS NF Bold Italic.ttf'
@FuturePhisicist
Copy link

This code has 2 problems:

  1. No shebang SC2148 in shellcheck
  2. ~/.fonts is deprecated see Arch Linux wiki

So, the better version:

#!/bin/bash

CURRENT_USER_FONT_PATH=~/.local/share/fonts/

mkdir -p "$CURRENT_USER_FONT_PATH"

curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf --output "${CURRENT_USER_FONT_PATH}MesloLGS NF Regular.ttf"
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf --output "${CURRENT_USER_FONT_PATH}MesloLGS NF Bold.ttf"
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf --output "${CURRENT_USER_FONT_PATH}MesloLGS NF Italic.ttf"
curl -L https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf --output "${CURRENT_USER_FONT_PATH}MesloLGS NF Bold Italic.ttf"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment