latest config changes

This commit is contained in:
Alex Selimov 2026-03-26 22:36:22 -04:00
parent 86f31edec2
commit a14e1172d9
5 changed files with 92 additions and 7 deletions

View file

@ -3,16 +3,19 @@
NVIM_CONF="${HOME}/.config/nvim/init.lua"
GHOSTTY_CONF="${HOME}/.config/ghostty/config"
GEMINI_CONF="${HOME}/repos/SelimovDE/gemini/settings.json"
CLAUDE_CONF="${HOME}/.claude.json"
[ -f "$NVIM_CONF" ] || { echo "Missing $NVIM_CONF"; exit 1; }
[ -f "$GHOSTTY_CONF" ] || { echo "Missing $GHOSTTY_CONF"; exit 1; }
[ -f "$GEMINI_CONF" ] || { echo "Missing $GEMINI_CONF"; exit 1; }
[ -f "$CLAUDE_CONF" ] || { echo "Missing $CLAUDE_CONF"; exit 1; }
which sed
set_light_mode() {
sed -E -i 's/^([[:space:]]*theme[[:space:]]*=[[:space:]]*)zenwritten-dark/\1zenwritten-light/' "$GHOSTTY_CONF"
sed -E -i 's/(vim.g.light_mode[[:space:]]*=[[:space:]]*).*/\1true/' "$NVIM_CONF"
sed -i 's/"theme": "Zenwritten Dark"/"theme": "Zenwritten Light"/' "$GEMINI_CONF"
sed -i 's/"theme": "dark"/"theme": "light"/' "$CLAUDE_CONF"
MODE="light"
}
@ -20,6 +23,7 @@ set_dark_mode() {
sed -E -i 's/^([[:space:]]*theme[[:space:]]*=[[:space:]]*)zenwritten-light/\1zenwritten-dark/' "$GHOSTTY_CONF"
sed -E -i 's/(vim.g.light_mode[[:space:]]*=[[:space:]]*).*/\1false/' "$NVIM_CONF"
sed -i 's/"theme": "Zenwritten Light"/"theme": "Zenwritten Dark"/' "$GEMINI_CONF"
sed -i 's/"theme": "light"/"theme": "dark"/' "$CLAUDE_CONF"
MODE="dark"
}

View file

@ -30,8 +30,5 @@ split-inherit-working-directory = true
keybind = cmd+shift+p=ignore
window-save-state = always
confirm-close-surface = true
keybind = cmd+shift+t=close_surface

View file

@ -2,5 +2,15 @@
[ -f "/home/aselimov/.ghcup/env" ] && . "/home/aselimov/.ghcup/env" # ghcup-env
export PATH="$PATH:/usr/local/cuda-12.8/bin:$HOME/bin:$HOME/.local/bin"
export PATH="$PATH:$HOME/.local/bin"
if [ "$(uname)" = "Darwin" ]; then
export PATH="$HOME/bin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/bin:$PATH"
fi
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda-12.8/lib64"
# Added by LM Studio CLI (lms)
export PATH="$PATH:/Users/aselimov/.lmstudio/bin"
# End of LM Studio CLI section

View file

@ -16,8 +16,6 @@ setopt HIST_IGNORE_SPACE # Don't save commands starting with space
# Environment Variables
#==============================================================================
source ~/.profile
export OMPI_MCA_rmaps_base_oversubscribe=1
export CLICOLOR=1
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd
@ -146,7 +144,6 @@ bindkey '^[[B' history-substring-search-down
#==============================================================================
if [ "$(uname)" = "Darwin" ]; then
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/bin:$PATH"
alias ls="gls --classify --group-directories-first --color"
export NVIM_JDTLS_JAVA_HOME="/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home/"
else

77
setup_mac.sh Executable file
View file

@ -0,0 +1,77 @@
#!/bin/bash
# Full macOS setup script.
# Deploys dotfiles, sets up neovim config, and installs brew applications.
set -e
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# --- SSH keygen ---
SSH_KEY="$HOME/.ssh/id_ed25519"
echo "=== Setting up SSH key ==="
if [ -f "$SSH_KEY" ]; then
echo "SSH key already exists at $SSH_KEY, skipping."
else
read -rp "Enter email for SSH key: " ssh_email
ssh-keygen -t ed25519 -C "$ssh_email" -f "$SSH_KEY"
eval "$(ssh-agent -s)"
ssh-add "$SSH_KEY"
echo "Public key:"
cat "${SSH_KEY}.pub"
fi
echo
# --- Deploy dotfiles ---
echo "=== Deploying dotfiles ==="
"$SCRIPT_DIR/deploy.sh"
# --- Neovim config ---
NVIM_CONFIG="$HOME/.config/nvim"
NVIM_REPO="https://forge.alexselimov.com/aselimov/neovim.git"
echo "=== Setting up neovim config ==="
if [ -d "$NVIM_CONFIG" ]; then
if [ -L "$NVIM_CONFIG" ]; then
echo "Removing existing symlink at $NVIM_CONFIG"
rm "$NVIM_CONFIG"
elif [ -d "$NVIM_CONFIG/.git" ]; then
echo "Neovim config already cloned at $NVIM_CONFIG, pulling latest..."
git -C "$NVIM_CONFIG" pull
echo "Done."
echo
else
echo "Backing up existing $NVIM_CONFIG -> ${NVIM_CONFIG}.bak"
mv "$NVIM_CONFIG" "${NVIM_CONFIG}.bak"
fi
fi
if [ ! -d "$NVIM_CONFIG/.git" ]; then
echo "Cloning neovim config..."
git clone "$NVIM_REPO" "$NVIM_CONFIG"
echo "Done."
echo
fi
# --- Homebrew ---
echo "=== Checking for Homebrew ==="
if ! command -v brew &>/dev/null; then
echo "Homebrew not found. Installing..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
echo "=== Installing brew formulae ==="
brew install neovim
brew install coreutils
brew install gnu-sed
brew install starship
brew install nvm
brew install kubectl
echo "=== Installing brew casks ==="
brew install --cask anytype
brew install --cask ghostty
brew install --cask helium
brew install --cask flowvision
echo
echo "macOS setup complete!"