Compare commits
No commits in common. "a14e1172d990bd77b46b36fd60b8b35126d1d8b0" and "34421ffd640d0f8bb9c8ee75ae07bf7a40ec49ea" have entirely different histories.
a14e1172d9
...
34421ffd64
6 changed files with 115 additions and 130 deletions
|
|
@ -2,28 +2,21 @@
|
||||||
|
|
||||||
NVIM_CONF="${HOME}/.config/nvim/init.lua"
|
NVIM_CONF="${HOME}/.config/nvim/init.lua"
|
||||||
GHOSTTY_CONF="${HOME}/.config/ghostty/config"
|
GHOSTTY_CONF="${HOME}/.config/ghostty/config"
|
||||||
GEMINI_CONF="${HOME}/repos/SelimovDE/gemini/settings.json"
|
DUNST_CONF="${HOME}/.config/dunst/dunstrc"
|
||||||
CLAUDE_CONF="${HOME}/.claude.json"
|
|
||||||
|
|
||||||
[ -f "$NVIM_CONF" ] || { echo "Missing $NVIM_CONF"; exit 1; }
|
[ -f "$NVIM_CONF" ] || { echo "Missing $NVIM_CONF"; exit 1; }
|
||||||
[ -f "$GHOSTTY_CONF" ] || { echo "Missing $GHOSTTY_CONF"; exit 1; }
|
[ -f "$GHOSTTY_CONF" ] || { echo "Missing $GHOSTTY_CONF"; exit 1; }
|
||||||
[ -f "$GEMINI_CONF" ] || { echo "Missing $GEMINI_CONF"; exit 1; }
|
[ -f "$DUNST_CONF" ] || { echo "Missing $DUNST_CONF"; exit 1; }
|
||||||
[ -f "$CLAUDE_CONF" ] || { echo "Missing $CLAUDE_CONF"; exit 1; }
|
|
||||||
|
|
||||||
which sed
|
|
||||||
set_light_mode() {
|
set_light_mode() {
|
||||||
sed -E -i 's/^([[:space:]]*theme[[:space:]]*=[[:space:]]*)zenwritten-dark/\1zenwritten-light/' "$GHOSTTY_CONF"
|
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 -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"
|
MODE="light"
|
||||||
}
|
}
|
||||||
|
|
||||||
set_dark_mode() {
|
set_dark_mode() {
|
||||||
sed -E -i 's/^([[:space:]]*theme[[:space:]]*=[[:space:]]*)zenwritten-light/\1zenwritten-dark/' "$GHOSTTY_CONF"
|
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 -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"
|
MODE="dark"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -61,11 +54,80 @@ for dir in "${XDG_RUNTIME_DIR:-}" "${TMPDIR:-/tmp}" "/tmp" "$HOME/.local/state/n
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
# Reload Ghostty via AppleScript menu click
|
# Reload Ghostty: send SIGUSR2 to running ghostty processes (macOS/Linux)
|
||||||
osascript -e 'tell application "System Events"
|
pkill -USR2 -x ghostty 2>/dev/null
|
||||||
tell process "Ghostty"
|
|
||||||
click menu item "Reload Configuration" of menu "Ghostty" of menu bar item "Ghostty" of menu bar 1
|
|
||||||
end tell
|
|
||||||
end tell' 2>/dev/null || true
|
|
||||||
|
|
||||||
echo "Switched to ${MODE} mode"
|
echo "Switched to ${MODE} mode"
|
||||||
|
|
||||||
|
# Script for changing between light and dark modes on Linux
|
||||||
|
if [ "$(uname)" != "Darwin" ]; then
|
||||||
|
if [ "$MODE" == "dark" ]; then
|
||||||
|
echo "Swapping to dark mode"
|
||||||
|
# GTK Theme
|
||||||
|
gsettings set org.gnome.desktop.interface gtk-theme ''
|
||||||
|
gsettings set org.gnome.desktop.interface gtk-theme 'WhiteSur-Dark'
|
||||||
|
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||||
|
sed -i -e 's@Net/ThemeName.*@Net/ThemeName "WhiteSur-Dark"@' ~/.xsettingsd
|
||||||
|
|
||||||
|
# Rofi theme
|
||||||
|
sed -i -e "s/light.rasi/dark.rasi/" $HOME/.config/rofi/config.rasi
|
||||||
|
# Swap dunst urgency_low background and foreground
|
||||||
|
sed -E -i '/^\[urgency_low\]/,/^\[.*\]/ {
|
||||||
|
s/^([[:space:]]*background[[:space:]]*=[[:space:]]*).*/\1"#3d3839"/
|
||||||
|
s/^([[:space:]]*foreground[[:space:]]*=[[:space:]]*).*/\1"#8e8e8e"/
|
||||||
|
}' "$DUNST_CONF"
|
||||||
|
|
||||||
|
# Swap dunst urgency_normal background and foreground
|
||||||
|
sed -E -i '/^\[urgency_normal\]/,/^\[.*\]/ {
|
||||||
|
s/^([[:space:]]*background[[:space:]]*=[[:space:]]*).*/\1"#3d3839"/
|
||||||
|
s/^([[:space:]]*foreground[[:space:]]*=[[:space:]]*).*/\1"#BBBBBB"/
|
||||||
|
}' "$DUNST_CONF"
|
||||||
|
|
||||||
|
# Plasma theme
|
||||||
|
if [[ "$XDG_CURRENT_DESKTOP" == "KDE" ]]; then
|
||||||
|
plasma-apply-lookandfeel -a com.github.vinceliuice.WhiteSur-dark
|
||||||
|
plasma-apply-cursortheme phinger-cursors-dark
|
||||||
|
kwriteconfig6 --file kdeglobals --group Icons --key Theme Papirus-Dark
|
||||||
|
kwriteconfig6 --file ksplashrc --group KSplash --key Theme Breeze
|
||||||
|
kquitapp6 plasmashell
|
||||||
|
sleep 0.3
|
||||||
|
kstart5 plasmashell
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Swapping to light mode"
|
||||||
|
# GTK Theme
|
||||||
|
gsettings set org.gnome.desktop.interface gtk-theme ''
|
||||||
|
gsettings set org.gnome.desktop.interface gtk-theme 'WhiteSur-Light'
|
||||||
|
gsettings set org.gnome.desktop.interface color-scheme 'default'
|
||||||
|
sed -i -e 's@Net/ThemeName.*@Net/ThemeName "WhiteSur-Light"@' ~/.xsettingsd
|
||||||
|
# Swap dunst urgency_low background and foreground
|
||||||
|
sed -E -i '/^\[urgency_low\]/,/^\[.*\]/ {
|
||||||
|
s/^([[:space:]]*background[[:space:]]*=[[:space:]]*).*/\1"#8e8e8e"/
|
||||||
|
s/^([[:space:]]*foreground[[:space:]]*=[[:space:]]*).*/\1"#3d3839"/
|
||||||
|
}' "$DUNST_CONF"
|
||||||
|
|
||||||
|
# Swap dunst urgency_normal background and foreground
|
||||||
|
sed -E -i '/^\[urgency_normal\]/,/^\[.*\]/ {
|
||||||
|
s/^([[:space:]]*background[[:space:]]*=[[:space:]]*).*/\1"#BBBBBB"/
|
||||||
|
s/^([[:space:]]*foreground[[:space:]]*=[[:space:]]*).*/\1"#191919"/
|
||||||
|
}' "$DUNST_CONF"
|
||||||
|
|
||||||
|
# Rofi theme
|
||||||
|
sed -i -e "s/dark.rasi/light.rasi/" $HOME/.config/rofi/config.rasi
|
||||||
|
#
|
||||||
|
# Plasma theme
|
||||||
|
if [[ "$XDG_CURRENT_DESKTOP" == "KDE" ]]; then
|
||||||
|
plasma-apply-lookandfeel -a com.github.vinceliuice.WhiteSur-alt
|
||||||
|
plasma-apply-cursortheme phinger-cursors-dark
|
||||||
|
kwriteconfig6 --file kdeglobals --group Icons --key Theme Papirus
|
||||||
|
kwriteconfig6 --file ksplashrc --group KSplash --key Theme Breeze
|
||||||
|
kquitapp6 plasmashell
|
||||||
|
sleep 0.3
|
||||||
|
kstart6 plasmashell
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
killall dunst
|
||||||
|
killall -HUP xsettingsd
|
||||||
|
fi
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,3 @@ split-inherit-working-directory = true
|
||||||
|
|
||||||
keybind = cmd+shift+p=ignore
|
keybind = cmd+shift+p=ignore
|
||||||
|
|
||||||
confirm-close-surface = true
|
|
||||||
keybind = cmd+shift+t=close_surface
|
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,5 @@
|
||||||
|
|
||||||
[ -f "/home/aselimov/.ghcup/env" ] && . "/home/aselimov/.ghcup/env" # ghcup-env
|
[ -f "/home/aselimov/.ghcup/env" ] && . "/home/aselimov/.ghcup/env" # ghcup-env
|
||||||
|
|
||||||
export PATH="$PATH:$HOME/.local/bin"
|
export PATH="$PATH:/usr/local/cuda-12.8/bin:$HOME/bin:$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"
|
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
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ set -g prefix C-p
|
||||||
bind C-p send-prefix
|
bind C-p send-prefix
|
||||||
|
|
||||||
#Sane split commands
|
#Sane split commands
|
||||||
bind v split-window -h -c "#{pane_current_path}"
|
bind | split-window -h -c "#{pane_current_path}"
|
||||||
bind s split-window -v -c "#{pane_current_path}"
|
bind - split-window -v -c "#{pane_current_path}"
|
||||||
unbind '"'
|
unbind '"'
|
||||||
unbind %
|
unbind %
|
||||||
|
|
||||||
|
|
|
||||||
58
home/.zshrc
58
home/.zshrc
|
|
@ -16,6 +16,8 @@ setopt HIST_IGNORE_SPACE # Don't save commands starting with space
|
||||||
# Environment Variables
|
# Environment Variables
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
|
|
||||||
|
source ~/.profile
|
||||||
|
|
||||||
export OMPI_MCA_rmaps_base_oversubscribe=1
|
export OMPI_MCA_rmaps_base_oversubscribe=1
|
||||||
export CLICOLOR=1
|
export CLICOLOR=1
|
||||||
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd
|
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd
|
||||||
|
|
@ -61,7 +63,6 @@ zstyle -e ':completion:*:hosts' hosts 'reply=(
|
||||||
${=${${(f)"$(cat {/etc/ssh_,~/ar.ssh/known_}hosts(|2)(N) 2>/dev/null)"}%%[#| ]*}//,/ }
|
${=${${(f)"$(cat {/etc/ssh_,~/ar.ssh/known_}hosts(|2)(N) 2>/dev/null)"}%%[#| ]*}//,/ }
|
||||||
${=${${${${(@M)${(f)"$(cat ~/.ssh/config 2>/dev/null)"}:#Host *}#Host }:#*\**}:#*\?*}}
|
${=${${${${(@M)${(f)"$(cat ~/.ssh/config 2>/dev/null)"}:#Host *}#Host }:#*\**}:#*\?*}}
|
||||||
)'
|
)'
|
||||||
source <(k completion zsh)
|
|
||||||
|
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
# Plugins & Tools
|
# Plugins & Tools
|
||||||
|
|
@ -79,23 +80,42 @@ load_nvm() {
|
||||||
|
|
||||||
# Create placeholder functions that load nvm once, then call the real command
|
# Create placeholder functions that load nvm once, then call the real command
|
||||||
nvm() {
|
nvm() {
|
||||||
unset -f nvm node npm
|
unset -f nvm node npm gemini
|
||||||
load_nvm
|
load_nvm
|
||||||
nvm "$@"
|
nvm "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
node() {
|
node() {
|
||||||
unset -f nvm node npm
|
unset -f nvm node npm gemini
|
||||||
load_nvm
|
load_nvm
|
||||||
node "$@"
|
node "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
npm() {
|
npm() {
|
||||||
unset -f nvm node npm
|
unset -f nvm node npm gemini
|
||||||
load_nvm
|
load_nvm
|
||||||
npm "$@"
|
npm "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gemini() {
|
||||||
|
unset -f nvm node npm gemini
|
||||||
|
load_nvm
|
||||||
|
gemini "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
claude() {
|
||||||
|
unset -f claude
|
||||||
|
export ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic
|
||||||
|
export ANTHROPIC_AUTH_TOKEN="$(pass list zai_token)"
|
||||||
|
npm 2>&1 1>/dev/null
|
||||||
|
claude "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
codex() {
|
||||||
|
unset -f codex
|
||||||
|
npm 2>&1 1>/dev/null
|
||||||
|
codex "$@"
|
||||||
|
}
|
||||||
# ghcup
|
# ghcup
|
||||||
[ -f "/home/aselimov/.ghcup/env" ] && . "/home/aselimov/.ghcup/env" # ghcup-env
|
[ -f "/home/aselimov/.ghcup/env" ] && . "/home/aselimov/.ghcup/env" # ghcup-env
|
||||||
|
|
||||||
|
|
@ -112,15 +132,8 @@ if command -v jenv >/dev/null 2>&1; then
|
||||||
eval "$(jenv init -)"
|
eval "$(jenv init -)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Simple notify function
|
# starship
|
||||||
notify() {
|
eval "$(starship init zsh)"
|
||||||
local cmd="$*"
|
|
||||||
eval "$cmd"
|
|
||||||
local rc=$?
|
|
||||||
osascript -e "display notification \"Done (exit=$rc)\" with title \"${cmd//\"/\\\"}\""
|
|
||||||
return $rc
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# zsh-autosuggestions
|
# zsh-autosuggestions
|
||||||
source "$HOME/.config/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
source "$HOME/.config/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||||
|
|
@ -144,15 +157,21 @@ bindkey '^[[B' history-substring-search-down
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
|
|
||||||
if [ "$(uname)" = "Darwin" ]; then
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
|
export PATH="/opt/homebrew/bin:$PATH"
|
||||||
alias ls="gls --classify --group-directories-first --color"
|
alias ls="gls --classify --group-directories-first --color"
|
||||||
|
GEMINI_BIN=$(which gemini)
|
||||||
|
function gemini(){
|
||||||
|
source ~/.gemini_project && $GEMINI_BIN "$@"
|
||||||
|
}
|
||||||
export NVIM_JDTLS_JAVA_HOME="/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home/"
|
export NVIM_JDTLS_JAVA_HOME="/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home/"
|
||||||
|
# I only start tmux by default on Mac because of dwm+swallow patch
|
||||||
else
|
else
|
||||||
alias ls="ls --classify --group-directories-first --color"
|
alias ls="ls --classify --group-directories-first --color"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#if [[ -z "$TMUX" ]] && [[ -n "$PS1" ]] && [[ -z "$NO_TMUX" ]]; then
|
if [[ -z "$TMUX" ]] && [[ -n "$PS1" ]] && [[ -z "$NO_TMUX" ]]; then
|
||||||
# tmux attach -t dev || tmux new -s dev
|
tmux attach -t dev || tmux new -s dev
|
||||||
#fi
|
fi
|
||||||
|
|
||||||
# pnpm
|
# pnpm
|
||||||
export PNPM_HOME="/home/aselimov/.local/share/pnpm"
|
export PNPM_HOME="/home/aselimov/.local/share/pnpm"
|
||||||
|
|
@ -161,10 +180,3 @@ case ":$PATH:" in
|
||||||
*) export PATH="$PNPM_HOME:$PATH" ;;
|
*) export PATH="$PNPM_HOME:$PATH" ;;
|
||||||
esac
|
esac
|
||||||
# pnpm end
|
# pnpm end
|
||||||
|
|
||||||
# Added by LM Studio CLI (lms)
|
|
||||||
export PATH="$PATH:/Users/aselimov/.lmstudio/bin"
|
|
||||||
# End of LM Studio CLI section
|
|
||||||
|
|
||||||
# starship
|
|
||||||
eval "$(starship init zsh)"
|
|
||||||
|
|
|
||||||
77
setup_mac.sh
77
setup_mac.sh
|
|
@ -1,77 +0,0 @@
|
||||||
#!/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!"
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue