#!/bin/bash

# Show logo
clear
cat <~/.local/share/omarchy/logo.txt

font=$(
  fc-list :spacing=100 -f "%{family[0]}\n" |
    grep -v -i -E 'emoji|signwriting' |
    sort -u |
    gum choose --header "Choose terminal font"
)

if [[ -n "$font" ]]; then
  sed -i "s/family = \".*\"/family = \"$font\"/g" ~/.config/alacritty/alacritty.toml
fi

gum spin --spinner "globe" --title "Done!" -- sleep 2
