#!/usr/bin/env bash set -e FONT_NAME="JetBrainsMono Nerd Font" FONT_DIR="$HOME/.local/share/fonts" FONT_TEST="JetBrainsMonoNerdFont-Regular.ttf" echo "🔎 Sjekker Nerd Font..." if fc-list | grep -qi "JetBrainsMono Nerd Font"; then echo "✅ Nerd Font allerede installert." exit 0 fi echo "⬇️ Laster ned JetBrainsMono Nerd Font..." mkdir -p "$FONT_DIR" cd "$FONT_DIR" TMP_ZIP="$(mktemp --suffix=.zip)" curl -fsSL \ https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip \ -o "$TMP_ZIP" echo "📦 Pakker ut fonter..." unzip -o "$TMP_ZIP" >/dev/null rm -f "$TMP_ZIP" echo "🔄 Oppdaterer font cache..." fc-cache -f >/dev/null echo "🎉 Ferdig!" echo echo "⚠️ Viktig:" echo " Du må nå velge «JetBrainsMono Nerd Font» i terminalen din." echo " (Terminal → Preferences → Font)"