Compare commits
13 Commits
73f620fe39
...
e5c749bd25
| Author | SHA1 | Date | |
|---|---|---|---|
| e5c749bd25 | |||
| cc3a281298 | |||
| 9f6ba885b5 | |||
| 01ae211cfc | |||
| 9b8bd80cde | |||
| 7c9246ab08 | |||
| 89dcb057cc | |||
| 29c896f017 | |||
| a7d2a70163 | |||
| a413fae874 | |||
| 47823a0c50 | |||
| 78239cafb8 | |||
| c19881baf5 |
11
config.json
11
config.json
@ -28,10 +28,16 @@
|
|||||||
},
|
},
|
||||||
"zsh": {
|
"zsh": {
|
||||||
"link": {
|
"link": {
|
||||||
"from": "shared/zsh",
|
"from": "shared/zsh_root",
|
||||||
"to": "~/.zshrc"
|
"to": "~/.zshrc"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"zsh_config": {
|
||||||
|
"link": {
|
||||||
|
"from": "shared/zsh_config",
|
||||||
|
"to": "~/.config/zsh"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tmux": {
|
"tmux": {
|
||||||
"link": {
|
"link": {
|
||||||
"from": "shared/tmux",
|
"from": "shared/tmux",
|
||||||
@ -66,6 +72,7 @@
|
|||||||
"environments": {
|
"environments": {
|
||||||
"macos": [
|
"macos": [
|
||||||
"zsh",
|
"zsh",
|
||||||
|
"zsh_config",
|
||||||
{
|
{
|
||||||
"package": "bin",
|
"package": "bin",
|
||||||
"link": {
|
"link": {
|
||||||
@ -98,6 +105,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"linux-vm": [
|
"linux-vm": [
|
||||||
|
"zsh_config",
|
||||||
{
|
{
|
||||||
"package": "zsh",
|
"package": "zsh",
|
||||||
"install": "sudo apt install -y zsh",
|
"install": "sudo apt install -y zsh",
|
||||||
@ -126,6 +134,7 @@
|
|||||||
"bin"
|
"bin"
|
||||||
],
|
],
|
||||||
"linux-dev": [
|
"linux-dev": [
|
||||||
|
"zsh_config",
|
||||||
{
|
{
|
||||||
"package": "zsh",
|
"package": "zsh",
|
||||||
"install": "sudo apt install -y zsh",
|
"install": "sudo apt install -y zsh",
|
||||||
|
|||||||
@ -1,135 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
ATTACH_TMUX=1
|
|
||||||
DRY_RUN=0
|
|
||||||
TMUX_SESSION_DEFAULT="default"
|
|
||||||
|
|
||||||
df_platform=""
|
|
||||||
df_namespace=""
|
|
||||||
df_user=""
|
|
||||||
|
|
||||||
ssh_identity=""
|
|
||||||
ssh_host=""
|
|
||||||
ssh_args=()
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
local prog
|
|
||||||
prog=$(basename "$0")
|
|
||||||
echo "Usage: $prog <platform> [user@]namespace [--no-tmux|-t] [--dry-run|-n] [-- <ssh args...>]" >&2
|
|
||||||
echo
|
|
||||||
echo "Examples:"
|
|
||||||
echo " $prog orb namespace"
|
|
||||||
echo " $prog utm user@namespace --no-tmux"
|
|
||||||
echo " $prog core user@namespace --dry-run -- -v -p 2222"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
parse_args() {
|
|
||||||
if [[ $# -lt 2 ]]; then
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
df_platform="$1"
|
|
||||||
local user_namespace_arg="$2"
|
|
||||||
shift 2
|
|
||||||
|
|
||||||
# Extract df_user and df_namespace
|
|
||||||
if [[ "$user_namespace_arg" == *@* ]]; then
|
|
||||||
df_user="${user_namespace_arg%@*}"
|
|
||||||
df_namespace="${user_namespace_arg#*@}"
|
|
||||||
else
|
|
||||||
df_user="$USER"
|
|
||||||
df_namespace="$user_namespace_arg"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Parse remaining flags and ssh args
|
|
||||||
while [[ $# -gt 0 ]]; do
|
|
||||||
case "$1" in
|
|
||||||
-t|--no-tmux)
|
|
||||||
ATTACH_TMUX=0
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-n|--dry-run)
|
|
||||||
DRY_RUN=1
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--)
|
|
||||||
shift
|
|
||||||
ssh_args+=("$@")
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown option: $1" >&2
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
resolve_host() {
|
|
||||||
case "$df_platform" in
|
|
||||||
orb)
|
|
||||||
# orb-stack handles user@namespace internally
|
|
||||||
ssh_host="${df_namespace}@orb"
|
|
||||||
;;
|
|
||||||
utm)
|
|
||||||
ssh_host="${df_namespace}.utm.local"
|
|
||||||
ssh_identity="$HOME/.ssh/id_ed25519_internal"
|
|
||||||
;;
|
|
||||||
core)
|
|
||||||
ssh_host="${df_namespace}.core.lan"
|
|
||||||
ssh_identity="$HOME/.ssh/id_ed25519_internal"
|
|
||||||
;;
|
|
||||||
ec2)
|
|
||||||
ssh_host="${df_namespace}.ec2.internal"
|
|
||||||
;;
|
|
||||||
hetzner)
|
|
||||||
ssh_host="${df_namespace}.hetzner.test"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Error: unknown platform '$df_platform'" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
build_ssh_cmd() {
|
|
||||||
local cmd=(ssh -tt)
|
|
||||||
|
|
||||||
if [[ -n "$ssh_identity" ]]; then
|
|
||||||
cmd+=(-i "$ssh_identity" -o IdentitiesOnly=yes)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${#ssh_args[@]} -gt 0 ]]; then
|
|
||||||
cmd+=("${ssh_args[@]}")
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmd+=("${df_user}@${ssh_host}")
|
|
||||||
|
|
||||||
if [[ $ATTACH_TMUX -eq 1 ]]; then
|
|
||||||
cmd+=("tmux" "new-session" "-As" "$TMUX_SESSION_DEFAULT"
|
|
||||||
"-e" "DF_NAMESPACE=$df_namespace"
|
|
||||||
"-e" "DF_PLATFORM=$df_platform")
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "${cmd[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
parse_args "$@"
|
|
||||||
resolve_host
|
|
||||||
ssh_cmd=($(build_ssh_cmd))
|
|
||||||
|
|
||||||
if [[ $DRY_RUN -eq 1 ]]; then
|
|
||||||
echo "Dry run command:"
|
|
||||||
printf '%q ' "${ssh_cmd[@]}"
|
|
||||||
echo
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "${ssh_cmd[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# URL="https://raw.githubusercontent.com/triimdev/invero.nvim/refs/heads/main/extras/ghostty/invero_day"
|
|
||||||
# THEME_DIR="$HOME/.config/ghostty/themes"
|
|
||||||
# THEME_NAME="Invero Day"
|
|
||||||
|
|
||||||
URL="https://raw.githubusercontent.com/triimdev/invero.nvim/refs/heads/main/extras/wezterm/invero_day.toml"
|
|
||||||
THEME_DIR="$HOME/.config/wezterm/colors"
|
|
||||||
THEME_NAME="Invero Day.toml"
|
|
||||||
|
|
||||||
|
|
||||||
THEME_PATH="${THEME_DIR}/${THEME_NAME}"
|
|
||||||
|
|
||||||
mkdir -p "$THEME_DIR"
|
|
||||||
|
|
||||||
if curl -fsSL -o "$THEME_PATH" "$URL"; then
|
|
||||||
echo "Theme downloaded to $THEME_PATH"
|
|
||||||
else
|
|
||||||
echo "Failed to download theme."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
81
config/macos/bin/vm
Executable file
81
config/macos/bin/vm
Executable file
@ -0,0 +1,81 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# ~/bin/vm
|
||||||
|
#
|
||||||
|
# SSH helper script for connecting to VMs or workstations.
|
||||||
|
# Usage:
|
||||||
|
# vm [--no-tmux] <host>
|
||||||
|
#
|
||||||
|
# Host patterns:
|
||||||
|
# personal-orb -> ssh $USER@personal@orb
|
||||||
|
# personal-utm -> ssh $USER@personal.utm.local
|
||||||
|
# personal-workstation -> ssh $USER@personal.workstation.lan
|
||||||
|
#
|
||||||
|
# Optional:
|
||||||
|
# --no-tmux -> skips attaching to tmux session
|
||||||
|
|
||||||
|
# TMP: Tmux will be disabled (switch to 0 to enable it again)
|
||||||
|
skip_tmux=0
|
||||||
|
|
||||||
|
# Check for --no-tmux flag
|
||||||
|
if [[ "$1" == "--no-tmux" ]]; then
|
||||||
|
skip_tmux=1
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
full="$1"
|
||||||
|
shift # remove host from args
|
||||||
|
|
||||||
|
user="$USER"
|
||||||
|
host="$full"
|
||||||
|
|
||||||
|
# Split user@host if explicitly specified
|
||||||
|
if [[ "$full" == *@* ]]; then
|
||||||
|
user="${full%@*}"
|
||||||
|
host="${full#*@}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Map host patterns to SSH target and machine type
|
||||||
|
case "$host" in
|
||||||
|
*-orb)
|
||||||
|
ssh_host="${host%-orb}@orb"
|
||||||
|
TARGET_MACHINE="orb"
|
||||||
|
;;
|
||||||
|
*-utm)
|
||||||
|
ssh_host="${host%-utm}.utm.local"
|
||||||
|
TARGET_MACHINE="utm"
|
||||||
|
ssh_identity="$HOME/.ssh/id_ed25519_internal"
|
||||||
|
;;
|
||||||
|
*-workstation)
|
||||||
|
ssh_host="${host%-workstation}.workstation.lan"
|
||||||
|
TARGET_MACHINE="workstation"
|
||||||
|
ssh_identity="$HOME/.ssh/id_ed25519_internal"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Error: unknown host pattern '$host'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Always use "default" tmux session
|
||||||
|
tmux_session="default"
|
||||||
|
|
||||||
|
# Build SSH command safely using an array
|
||||||
|
ssh_cmd=(ssh -tt)
|
||||||
|
|
||||||
|
# Include identity file if needed
|
||||||
|
[[ -n "$ssh_identity" ]] && ssh_cmd+=(-i "$ssh_identity" -o IdentitiesOnly=yes)
|
||||||
|
|
||||||
|
# Add target user and host
|
||||||
|
ssh_cmd+=("$user@$ssh_host")
|
||||||
|
|
||||||
|
# Add tmux session unless skipped
|
||||||
|
if [[ $skip_tmux -eq 0 ]]; then
|
||||||
|
ssh_cmd+=("tmux" "new-session" "-As" "$tmux_session" "-e" "TARGET_MACHINE=$TARGET_MACHINE")
|
||||||
|
else
|
||||||
|
# Pass through any extra args user supplied
|
||||||
|
ssh_cmd+=("$@")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# echo "Executing: ${ssh_cmd[*]}" >&2
|
||||||
|
exec "${ssh_cmd[@]}"
|
||||||
|
|
||||||
Binary file not shown.
@ -1,12 +1,24 @@
|
|||||||
|
# Terminal
|
||||||
term = xterm-256color
|
term = xterm-256color
|
||||||
theme = Invero Day
|
|
||||||
|
|
||||||
# Font
|
# Fonts
|
||||||
font-family = "Maple Mono NF"
|
font-family = "Maple Mono NF"
|
||||||
font-size = 13
|
#font-size = 14
|
||||||
#font-thicken = true
|
font-thicken = true
|
||||||
adjust-cell-width = -7%
|
#font-thicken-strength = 2
|
||||||
adjust-cell-height = -2
|
adjust-box-thickness = 2
|
||||||
|
|
||||||
|
# Window
|
||||||
|
window-padding-x = 0
|
||||||
|
window-padding-y = 0
|
||||||
|
window-height = 50
|
||||||
|
window-width = 120
|
||||||
|
window-step-resize = true
|
||||||
|
window-padding-balance = false
|
||||||
|
# window-padding-color = extend
|
||||||
|
|
||||||
|
# Icon
|
||||||
|
macos-icon = custom
|
||||||
|
|
||||||
# Cursor
|
# Cursor
|
||||||
cursor-style = block
|
cursor-style = block
|
||||||
@ -14,9 +26,17 @@ cursor-style-blink = false
|
|||||||
mouse-hide-while-typing = true
|
mouse-hide-while-typing = true
|
||||||
shell-integration-features = no-cursor
|
shell-integration-features = no-cursor
|
||||||
|
|
||||||
# Window
|
# Font/Cell quality
|
||||||
window-padding-x = 4
|
window-colorspace = srgb
|
||||||
window-padding-y = 0
|
alpha-blending = linear-corrected
|
||||||
window-padding-color = extend
|
|
||||||
macos-titlebar-style = native
|
macos-titlebar-style = native
|
||||||
macos-icon = custom
|
|
||||||
|
adjust-cell-width = -1
|
||||||
|
#adjust-cell-height = -2
|
||||||
|
|
||||||
|
# Theme
|
||||||
|
background = #eeeeee
|
||||||
|
foreground = #434343
|
||||||
|
window-theme = auto
|
||||||
|
background-opacity = 1
|
||||||
|
background-blur = false
|
||||||
|
|||||||
@ -1,22 +0,0 @@
|
|||||||
palette = 0=#444444
|
|
||||||
palette = 1=#ff0000
|
|
||||||
palette = 2=#00af5f
|
|
||||||
palette = 3=#d75f00
|
|
||||||
palette = 4=#005fff
|
|
||||||
palette = 5=#5f5f87
|
|
||||||
palette = 6=#afd7ff
|
|
||||||
palette = 7=#eeeeee
|
|
||||||
palette = 8=#444444
|
|
||||||
palette = 9=#ff0000
|
|
||||||
palette = 10=#00af5f
|
|
||||||
palette = 11=#d75f00
|
|
||||||
palette = 12=#005fff
|
|
||||||
palette = 13=#5f5f87
|
|
||||||
palette = 14=#afd7ff
|
|
||||||
palette = 15=#eeeeee
|
|
||||||
|
|
||||||
background = #eeeeee
|
|
||||||
foreground = #444444
|
|
||||||
cursor-color = #005fff
|
|
||||||
selection-background = #dadada
|
|
||||||
selection-foreground = #444444
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
export PATH="$PATH:$HOME/bin"
|
|
||||||
export LANG=en_US.UTF-8
|
|
||||||
export LC_CTYPE=en_US.UTF-8
|
|
||||||
export LC_COLLATE=C
|
|
||||||
|
|
||||||
KEYTIMEOUT=1
|
|
||||||
HISTFILE=$HOME/.zsh_history
|
|
||||||
HISTSIZE=10000
|
|
||||||
SAVEHIST=10000
|
|
||||||
|
|
||||||
setopt auto_cd interactive_comments prompt_subst
|
|
||||||
setopt append_history hist_ignore_dups hist_ignore_all_dups hist_reduce_blanks
|
|
||||||
|
|
||||||
autoload -Uz compinit
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case-insensitive
|
|
||||||
zstyle ':completion:*' use-cache on
|
|
||||||
zstyle ':completion:*' cache-path ~/.zsh/cache
|
|
||||||
compinit
|
|
||||||
|
|
||||||
git_prompt_info() {
|
|
||||||
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
|
||||||
local branch=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD)
|
|
||||||
echo " %F{green}($branch)%f"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
PROMPT='%n@%m%f %F{blue}%~%f$(git_prompt_info) $ '
|
|
||||||
|
|
||||||
autoload -U up-line-or-beginning-search down-line-or-beginning-search
|
|
||||||
zle -N up-line-or-beginning-search
|
|
||||||
zle -N down-line-or-beginning-search
|
|
||||||
bindkey '^[[A' up-line-or-beginning-search
|
|
||||||
bindkey '^[OA' up-line-or-beginning-search
|
|
||||||
bindkey '^[[B' down-line-or-beginning-search
|
|
||||||
bindkey '^[OB' down-line-or-beginning-search
|
|
||||||
bindkey '^U' backward-kill-line
|
|
||||||
|
|
||||||
# alias ls='ls --color=auto --group-directories-first'
|
|
||||||
alias ls='ls --color=auto'
|
|
||||||
alias ll='ls -lF'
|
|
||||||
alias lla='ll -a'
|
|
||||||
alias ld='ls -ld */'
|
|
||||||
alias vim=nvim
|
|
||||||
47
config/shared/zsh_config/aliases
Normal file
47
config/shared/zsh_config/aliases
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# -----------------------------
|
||||||
|
# OS-specific aliases for ls
|
||||||
|
# -----------------------------
|
||||||
|
OS_TYPE=$(uname)
|
||||||
|
if [[ "$OS_TYPE" == "Linux" ]]; then
|
||||||
|
alias ls='ls --color=auto --group-directories-first'
|
||||||
|
elif [[ "$OS_TYPE" == "Darwin" ]]; then
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
alias ll='ls -lF'
|
||||||
|
alias lla='ll -a'
|
||||||
|
alias ld='ls -ld */'
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Vim / Neovim
|
||||||
|
# -----------------------------
|
||||||
|
if command -v nvim >/dev/null 2>&1; then
|
||||||
|
alias vim='nvim'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Git aliases
|
||||||
|
# -----------------------------
|
||||||
|
alias g='git'
|
||||||
|
alias ga='git add'
|
||||||
|
alias gaa='git add --all'
|
||||||
|
alias gb='git branch'
|
||||||
|
alias gcm='git commit -m'
|
||||||
|
alias gam='git commit -am'
|
||||||
|
alias gco='git checkout'
|
||||||
|
alias gd='git diff'
|
||||||
|
alias gf='git fetch'
|
||||||
|
alias gl='git pull'
|
||||||
|
alias gp='git push'
|
||||||
|
alias gst='git status'
|
||||||
|
alias glg='git log --graph --oneline --decorate --all'
|
||||||
|
alias gm='git merge'
|
||||||
|
alias grb='git rebase'
|
||||||
|
alias grs='git reset'
|
||||||
|
alias grv='git remote -v'
|
||||||
|
alias tree='tree -I node_modules'
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Other
|
||||||
|
# -----------------------------
|
||||||
|
alias k='kubectl'
|
||||||
15
config/shared/zsh_config/keybindings
Normal file
15
config/shared/zsh_config/keybindings
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# -----------------------------
|
||||||
|
# ZLE functions
|
||||||
|
# -----------------------------
|
||||||
|
autoload -U up-line-or-beginning-search
|
||||||
|
autoload -U down-line-or-beginning-search
|
||||||
|
zle -N up-line-or-beginning-search
|
||||||
|
zle -N down-line-or-beginning-search
|
||||||
|
|
||||||
|
bindkey '^[[A' up-line-or-beginning-search
|
||||||
|
bindkey '^[OA' up-line-or-beginning-search
|
||||||
|
bindkey '^[[B' down-line-or-beginning-search
|
||||||
|
bindkey '^[OB' down-line-or-beginning-search
|
||||||
|
|
||||||
|
bindkey '^U' backward-kill-line
|
||||||
|
|
||||||
15
config/shared/zsh_config/prompt
Normal file
15
config/shared/zsh_config/prompt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# -----------------------------
|
||||||
|
# Git prompt function
|
||||||
|
# -----------------------------
|
||||||
|
git_prompt_info() {
|
||||||
|
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||||
|
local branch=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD)
|
||||||
|
echo " %F{green}($branch)%f"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Set prompt
|
||||||
|
# -----------------------------
|
||||||
|
PROMPT='%n@%m%f %F{blue}%~%f$(git_prompt_info) $ '
|
||||||
|
|
||||||
48
config/shared/zsh_config/zshrc
Normal file
48
config/shared/zsh_config/zshrc
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# -----------------------------
|
||||||
|
# PATH
|
||||||
|
# -----------------------------
|
||||||
|
export PATH="$PATH:$HOME/bin"
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Locales
|
||||||
|
# -----------------------------
|
||||||
|
export LANGUAGE="en_US:en"
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Autocomplete
|
||||||
|
# -----------------------------
|
||||||
|
autoload -Uz compinit && compinit
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Shell options
|
||||||
|
# -----------------------------
|
||||||
|
setopt autocd
|
||||||
|
setopt share_history
|
||||||
|
setopt interactivecomments
|
||||||
|
setopt PROMPT_SUBST # Enable dynamic prompt expansion
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Disable conflicting builtins
|
||||||
|
# -----------------------------
|
||||||
|
disable log
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# History
|
||||||
|
# -----------------------------
|
||||||
|
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
|
||||||
|
HISTSIZE=2000
|
||||||
|
SAVEHIST=1000
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Source modular components
|
||||||
|
# -----------------------------
|
||||||
|
CONFIG_DIR="$HOME/.config/zsh"
|
||||||
|
|
||||||
|
[ -f "$CONFIG_DIR/aliases" ] && source "$CONFIG_DIR/aliases"
|
||||||
|
[ -f "$CONFIG_DIR/prompt" ] && source "$CONFIG_DIR/prompt"
|
||||||
|
[ -f "$CONFIG_DIR/keybindings" ] && source "$CONFIG_DIR/keybindings"
|
||||||
|
|
||||||
14
config/shared/zsh_root
Normal file
14
config/shared/zsh_root
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
export EDITOR="nvim"
|
||||||
|
export VISUAL="nvim"
|
||||||
|
export PATH="$PATH:/home/tomas/.local/bin"
|
||||||
|
|
||||||
|
eval "$(dircolors)"
|
||||||
|
export LS_COLORS="${LS_COLORS}:ln=1;33:"
|
||||||
|
|
||||||
|
|
||||||
|
if [ -f "$HOME/.config/zsh/zshrc" ]; then
|
||||||
|
source "$HOME/.config/zsh/zshrc"
|
||||||
|
else
|
||||||
|
echo "Warning: ~/.config/zsh/zshrc not found, skipping custom Zsh configuration."
|
||||||
|
fi
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user