#!/usr/bin/env bash

# omarchy:summary=Install the Night Lion V2 theme and apply it

# Based: Night Lion V2 as an Omarchy theme, so the terminal, the editors,
# the shell and everything else the theme system renders take the palette
# from one colors.toml, on Debian and on a Mac alike.

set -eo pipefail

theme_dir="$HOME/.config/omarchy/themes/night-lion"

if [[ ! -f $theme_dir/colors.toml ]]; then
  echo "Installing the Night Lion V2 theme..."
  mkdir -p "$theme_dir/backgrounds"
  cat >"$theme_dir/colors.toml" <<'COLORS'
mode = "dark"

accent = "#64d0f0"
selection = "#b5d5ff"
muted = "#909090"

background = "#171717"
dark_background = "#101010"
darker_background = "#0a0a0a"
lighter_background = "#242424"

foreground = "#bbbbbb"
dark_foreground = "#909090"
light_foreground = "#d0d0d0"
bright_foreground = "#ffffff"

red = "#bb0000"
yellow = "#f3f167"
orange = "#d78a3c"
green = "#04f623"
cyan = "#00dadf"
blue = "#64d0f0"
magenta = "#ce6fdb"
brown = "#75493d"

bright_red = "#ff5555"
bright_yellow = "#ffff55"
bright_green = "#7df71d"
bright_cyan = "#00ccd8"
bright_blue = "#62cbe8"
bright_magenta = "#ff9bf5"
COLORS
fi

omarchy-theme-set night-lion
