sunhat/bin/omakub-font
David Heinemeier Hansson 63b8d7733a Use single routing bin
2024-06-03 14:57:00 -07:00

20 lines
726 B
Bash

#!/bin/bash
set -e
# Pick a preconfigured theme
FONT=$(gum choose "Cascadia Mono" "Fira Mono" "JetBrains Mono" "Meslo" | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
if [ "$FONT" == "cascadia-mono" ]; then
NERD_FONT="CaskaydiaMono Nerd Font"
elif [ "$FONT" == "fira-mono" ]; then
NERD_FONT="FiraMono Nerd Font"
elif [ "$FONT" == "jetbrains-mono" ]; then
NERD_FONT="JetBrainsMono NFM"
elif [ "$FONT" == "meslo" ]; then
NERD_FONT="MesloLGLDZ Nerd Font"
fi
gsettings set org.gnome.desktop.interface monospace-font-name "$NERD_FONT 10"
cp $OMAKUB_PATH/fonts/alacritty/$FONT.toml ~/.config/alacritty/font.toml
sed -i "s/\"editor.fontFamily\": \".*\"/\"editor.fontFamily\": \"$NERD_FONT\"/g" ~/.config/Code/User/settings.json