From 38ad06b2b35273c8a3ac29736ce0fdd75db9f887 Mon Sep 17 00:00:00 2001 From: Tomas Mirchev Date: Tue, 26 Aug 2025 12:31:47 +0200 Subject: [PATCH 01/10] set k3s --- config/linux-vm/tmux | 4 ++-- config/shared/zsh | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/linux-vm/tmux b/config/linux-vm/tmux index 038aae4..458483c 100644 --- a/config/linux-vm/tmux +++ b/config/linux-vm/tmux @@ -1,7 +1,7 @@ # Change the prefix from 'C-b' to 'C-Space' unbind C-b -set-option -g prefix C-f -bind-key C-f send-prefix +set-option -g prefix C-Space +bind-key C-Space send-prefix set-option -g set-clipboard on diff --git a/config/shared/zsh b/config/shared/zsh index 79babb1..12969c2 100644 --- a/config/shared/zsh +++ b/config/shared/zsh @@ -5,7 +5,7 @@ export PATH="$PATH:$HOME/bin" export LANGUAGE="en_US:en" export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 - +export KUBECONFIG=~/.kube/config autoload -Uz compinit && compinit # Autocomplete zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case Insensitive @@ -77,5 +77,6 @@ alias gm='git merge' alias grb='git rebase' alias grs='git reset' alias grv='git remote -v' - +alias k='kubectl' alias tree='tree -I node_modules' +alias vim=nvim -- 2.45.2 From 4a4ba49c97ecc2ae5b0a532bc433a3bdf2c53493 Mon Sep 17 00:00:00 2001 From: Tomas Mirchev Date: Mon, 15 Sep 2025 06:59:56 +0200 Subject: [PATCH 02/10] minor updates --- .../automatic_backups/karabiner_20250531.json | 43 ++++++++++ config/macos/karabiner/karabiner.json | 1 + config/shared/ghostty/config | 16 ++-- config/shared/nvim | 2 + config/shared/zsh | 82 ------------------- 5 files changed, 54 insertions(+), 90 deletions(-) create mode 100644 config/macos/karabiner/automatic_backups/karabiner_20250531.json delete mode 100644 config/shared/zsh diff --git a/config/macos/karabiner/automatic_backups/karabiner_20250531.json b/config/macos/karabiner/automatic_backups/karabiner_20250531.json new file mode 100644 index 0000000..672a8e8 --- /dev/null +++ b/config/macos/karabiner/automatic_backups/karabiner_20250531.json @@ -0,0 +1,43 @@ +{ + "profiles": [ + { + "devices": [ + { + "identifiers": { "is_keyboard": true }, + "simple_modifications": [ + { + "from": { "key_code": "non_us_backslash" }, + "to": [{ "key_code": "grave_accent_and_tilde" }] + } + ] + }, + { + "identifiers": { + "is_keyboard": true, + "product_id": 49164, + "vendor_id": 7276 + }, + "simple_modifications": [ + { + "from": { "key_code": "left_command" }, + "to": [{ "key_code": "left_option" }] + }, + { + "from": { "key_code": "left_option" }, + "to": [{ "key_code": "left_command" }] + } + ] + } + ], + "name": "Default profile", + "selected": true, + "simple_modifications": [ + { + "from": { "key_code": "caps_lock" }, + "to": [{ "key_code": "left_control" }] + } + ], + "virtual_hid_keyboard": { "keyboard_type_v2": "ansi" } + } + ] +} \ No newline at end of file diff --git a/config/macos/karabiner/karabiner.json b/config/macos/karabiner/karabiner.json index 672a8e8..52bcba2 100644 --- a/config/macos/karabiner/karabiner.json +++ b/config/macos/karabiner/karabiner.json @@ -1,4 +1,5 @@ { + "global": { "show_in_menu_bar": false }, "profiles": [ { "devices": [ diff --git a/config/shared/ghostty/config b/config/shared/ghostty/config index 2b20b3c..93c839a 100644 --- a/config/shared/ghostty/config +++ b/config/shared/ghostty/config @@ -1,4 +1,4 @@ -theme = catppuccin-frappe +theme = catppuccin-latte # Terminal term = "xterm-256color" @@ -9,9 +9,9 @@ font-size = 14 font-thicken = true # Cell width (affects letter spacing) -adjust-cell-width = -1 -adjust-cell-height = -1 -adjust-font-baseline = -1 +# adjust-cell-width = -1 +# adjust-cell-height = -1 +# adjust-font-baseline = -1 # Cursor cursor-style-blink = false @@ -32,8 +32,8 @@ window-width = 100 window-height = 26 window-padding-x = 4 window-padding-y = 2 -window-colorspace = display-p3 -macos-titlebar-style = native +# window-colorspace = display-p3 +# macos-titlebar-style = native #macos-titlebar-style = transparent @@ -42,8 +42,8 @@ macos-titlebar-style = native #window-padding-balance = true # Background -background-opacity = 1 -background-blur-radius = 0 +# background-opacity = 1 +# background-blur-radius = 0 diff --git a/config/shared/nvim b/config/shared/nvim index 863b000..ecae856 100644 --- a/config/shared/nvim +++ b/config/shared/nvim @@ -20,6 +20,8 @@ local function nmap(lhs, rhs, opts) map("n", lhs, rhs, opts) end local function imap(lhs, rhs, opts) map("i", lhs, rhs, opts) end local function vmap(lhs, rhs, opts) map("v", lhs, rhs, opts) end local function tmap(lhs, rhs, opts) map("t", lhs, rhs, opts) end +vim.opt.signcolumn = "no" + -- Map Leader vim.g.mapleader = " " diff --git a/config/shared/zsh b/config/shared/zsh deleted file mode 100644 index 12969c2..0000000 --- a/config/shared/zsh +++ /dev/null @@ -1,82 +0,0 @@ -# Add /bin to path -export PATH="$PATH:$HOME/bin" - -# Set locales -export LANGUAGE="en_US:en" -export LANG=en_US.UTF-8 -export LC_ALL=en_US.UTF-8 -export KUBECONFIG=~/.kube/config -autoload -Uz compinit && compinit # Autocomplete -zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case Insensitive - -setopt autocd # cd without it -setopt share_history - -# Set terminal title to hostname -echo -n -e "\033]0;SSH: $(hostname)\007" - -# 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 up the prompt -setopt PROMPT_SUBST # Dyna -PROMPT='%n@%m%f %F{blue}%~%f$(git_prompt_info) $ ' - -# Disable the log builtin, so we don't conflict with /usr/bin/log -disable log - -# Save command history -HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history -HISTSIZE=2000 -SAVEHIST=1000 -setopt HIST_IGNORE_ALL_DUPS - -# Load 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 - -# Bind both common escape sequences -bindkey '^[[A' up-line-or-beginning-search # normal mode -bindkey '^[OA' up-line-or-beginning-search # application mode -bindkey '^[[B' down-line-or-beginning-search # normal mode -bindkey '^[OB' down-line-or-beginning-search # application mode - -# 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 */' # List only directories - -# Aliases for git -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 k='kubectl' -alias tree='tree -I node_modules' -alias vim=nvim -- 2.45.2 From 97ed2db0f77ec2988daa733f1fb290c1947ff5c4 Mon Sep 17 00:00:00 2001 From: Tomas Mirchev Date: Mon, 15 Sep 2025 07:05:06 +0200 Subject: [PATCH 03/10] split zsh in config modules --- config/shared/zsh/zsh_config/aliases | 45 ++++++++++++++++++++++ config/shared/zsh/zsh_config/keybindings | 16 ++++++++ config/shared/zsh/zsh_config/prompt | 15 ++++++++ config/shared/zsh/zsh_config/zshrc | 48 ++++++++++++++++++++++++ 4 files changed, 124 insertions(+) create mode 100644 config/shared/zsh/zsh_config/aliases create mode 100644 config/shared/zsh/zsh_config/keybindings create mode 100644 config/shared/zsh/zsh_config/prompt create mode 100644 config/shared/zsh/zsh_config/zshrc diff --git a/config/shared/zsh/zsh_config/aliases b/config/shared/zsh/zsh_config/aliases new file mode 100644 index 0000000..b32ac20 --- /dev/null +++ b/config/shared/zsh/zsh_config/aliases @@ -0,0 +1,45 @@ +# ----------------------------- +# 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' +else + alias vim='vim' +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' + diff --git a/config/shared/zsh/zsh_config/keybindings b/config/shared/zsh/zsh_config/keybindings new file mode 100644 index 0000000..b6a70ca --- /dev/null +++ b/config/shared/zsh/zsh_config/keybindings @@ -0,0 +1,16 @@ +# ----------------------------- +# 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 + +# ----------------------------- +# Bind keys for history 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 + diff --git a/config/shared/zsh/zsh_config/prompt b/config/shared/zsh/zsh_config/prompt new file mode 100644 index 0000000..2610971 --- /dev/null +++ b/config/shared/zsh/zsh_config/prompt @@ -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) $ ' + diff --git a/config/shared/zsh/zsh_config/zshrc b/config/shared/zsh/zsh_config/zshrc new file mode 100644 index 0000000..efeb1d0 --- /dev/null +++ b/config/shared/zsh/zsh_config/zshrc @@ -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" + -- 2.45.2 From 616ba973252b7d0b5893cc2553f108bf40a03afa Mon Sep 17 00:00:00 2001 From: Tomas Mirchev Date: Mon, 15 Sep 2025 07:05:21 +0200 Subject: [PATCH 04/10] add vm bin script --- config/macos/bin/vm | 71 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100755 config/macos/bin/vm diff --git a/config/macos/bin/vm b/config/macos/bin/vm new file mode 100755 index 0000000..442061c --- /dev/null +++ b/config/macos/bin/vm @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# ~/bin/vm +# +# SSH helper script for connecting to VMs or workstations. +# Usage: +# vm [--no-tmux] +# +# 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 + +skip_tmux=0 + +# Check for --no-tmux flag +if [[ "$1" == "--no-tmux" ]]; then + skip_tmux=1 + shift +fi + +full="$1" +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 tmux session +case "$host" in + *-orb) + ssh_host="${host%-orb}@orb" + tmux_session="$host" + ;; + *-utm) + ssh_host="${host%-utm}.utm.local" + tmux_session="$host" + ssh_identity="$HOME/.ssh/id_ed25519_internal" + ;; + *-workstation) + ssh_host="${host%-workstation}.workstation.lan" + tmux_session="$host" + ssh_identity="$HOME/.ssh/id_ed25519_internal" + ;; + *) + echo "Error: unknown host pattern '$host'" >&2 + exit 1 + ;; +esac + +# Build SSH command safely using an array +ssh_cmd=(ssh -t) + +# 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 +[[ $skip_tmux -eq 0 ]] && ssh_cmd+=("tmux" "new" "-A" "-s" "$tmux_session") + +# Replace current shell with SSH command +# echo "Executing: ${ssh_cmd[*]}" >&2 +exec "${ssh_cmd[@]}" + -- 2.45.2 From d3971924710f5b652803a8e6f70c3615ac47eeba Mon Sep 17 00:00:00 2001 From: Tomas Mirchev Date: Mon, 15 Sep 2025 07:07:37 +0200 Subject: [PATCH 05/10] add new files to config --- config.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index c032c86..a17d3df 100644 --- a/config.json +++ b/config.json @@ -15,7 +15,10 @@ "post-link": "(grep -q 'alias vim=nvim' ~/.zshrc || echo 'alias vim=nvim' >> ~/.zshrc) || true" }, "zsh": { - "link": { "from": "shared/zsh", "to": "~/.zshrc" } + "link": { "from": "shared/zsh/zshrc_root", "to": "~/.zshrc" }, + }, + "zsh_config": { + "link": { "from": "shared/zsh/zsh", "to": "~/.config/zsh" }, }, "tmux": { "link": { "from": "shared/tmux", "to": "~/.tmux.conf" } @@ -36,6 +39,8 @@ "environments": { "macos": [ "zsh", + "zsh_config", + "bin", "tmux", "nvim", "git", @@ -55,6 +60,7 @@ } ], "linux-vm": [ + "zsh_config", { "package": "zsh", "install": "sudo apt install -y zsh", @@ -80,6 +86,7 @@ "bin" ], "linux-dev": [ + "zsh_config", { "package": "zsh", "install": "sudo apt install -y zsh", -- 2.45.2 From 652d71e50e7bdb7859672fdf2dcc8c4028799a22 Mon Sep 17 00:00:00 2001 From: Tomas Mirchev Date: Mon, 15 Sep 2025 08:19:46 +0300 Subject: [PATCH 06/10] fix zsh config paths --- config.json | 273 +++++++++++------- config/shared/{zsh => }/zsh_config/aliases | 0 .../shared/{zsh => }/zsh_config/keybindings | 0 config/shared/{zsh => }/zsh_config/prompt | 0 config/shared/{zsh => }/zsh_config/zshrc | 0 5 files changed, 162 insertions(+), 111 deletions(-) rename config/shared/{zsh => }/zsh_config/aliases (100%) rename config/shared/{zsh => }/zsh_config/keybindings (100%) rename config/shared/{zsh => }/zsh_config/prompt (100%) rename config/shared/{zsh => }/zsh_config/zshrc (100%) diff --git a/config.json b/config.json index a17d3df..5e3732f 100644 --- a/config.json +++ b/config.json @@ -1,115 +1,166 @@ { - "template": { - "htop": { - "link": { "from": "shared/htop", "to": "~/.config/htop" } + "template": { + "htop": { + "link": { + "from": "shared/htop", + "to": "~/.config/htop" + } + }, + "bin": { + "link": { + "from": "shared/bin", + "to": "~/bin" + } + }, + "vim": { + "link": { + "from": "shared/vim", + "to": "~/.vimrc" + }, + "-post-link": "curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim && vim -es -u ~/.vimrc -i NONE -c 'PlugInstall' -c 'qa'" + }, + "nvim": { + "link": { + "from": "shared/nvim", + "to": "~/.config/nvim/init.lua" + }, + "post-link": "(grep -q 'alias vim=nvim' ~/.zshrc || echo 'alias vim=nvim' >> ~/.zshrc) || true" + }, + "zsh": { + "link": { + "from": "shared/zsh_root", + "to": "~/.zshrc" + } + }, + "zsh_config": { + "link": { + "from": "shared/zsh_config", + "to": "~/.config/zsh" + } + }, + "tmux": { + "link": { + "from": "shared/tmux", + "to": "~/.tmux.conf" + } + }, + "git": { + "link": { + "from": "shared/git", + "to": "~/.gitconfig" + } + }, + "wezterm": { + "link": { + "from": "shared/wezterm", + "to": "~/.wezterm.lua" + } + }, + "alacritty": { + "link": { + "from": "shared/alacritty", + "to": "~/.alacritty.toml" + } + }, + "ghostty": { + "link": { + "from": "shared/ghostty", + "to": "~/.config/ghostty" + } + } }, - "bin": { - "link": { "from": "shared/bin", "to": "~/bin" } - }, - "vim": { - "link": { "from": "shared/vim", "to": "~/.vimrc" }, - "-post-link": "curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim && vim -es -u ~/.vimrc -i NONE -c 'PlugInstall' -c 'qa'" - }, - "nvim": { - "link": { "from": "shared/nvim", "to": "~/.config/nvim/init.lua" }, - "post-link": "(grep -q 'alias vim=nvim' ~/.zshrc || echo 'alias vim=nvim' >> ~/.zshrc) || true" - }, - "zsh": { - "link": { "from": "shared/zsh/zshrc_root", "to": "~/.zshrc" }, - }, - "zsh_config": { - "link": { "from": "shared/zsh/zsh", "to": "~/.config/zsh" }, - }, - "tmux": { - "link": { "from": "shared/tmux", "to": "~/.tmux.conf" } - }, - "git": { - "link": { "from": "shared/git", "to": "~/.gitconfig" } - }, - "wezterm": { - "link": { "from": "shared/wezterm", "to": "~/.wezterm.lua" } - }, - "alacritty": { - "link": { "from": "shared/alacritty", "to": "~/.alacritty.toml" } - }, - "ghostty": { - "link": { "from": "shared/ghostty", "to": "~/.config/ghostty" } + "environments": { + "macos": [ + "zsh", + "zsh_config", + { + "package": "bin", + "link": { + "from": "macos/bin", + "to": "~/bin" + } + }, + "tmux", + "nvim", + "git", + "ghostty", + "alacritty", + { + "package": "karabiner", + "link": { + "from": "macos/karabiner", + "to": "~/.config/karabiner" + } + }, + { + "package": "linearmouse", + "link": { + "from": "macos/linearmouse", + "to": "~/.config/linearmouse" + } + }, + { + "package": "rectangle", + "link-comment": "Needs manual import from config/macos/linearmouse" + } + ], + "linux-vm": [ + "zsh_config", + { + "package": "zsh", + "install": "sudo apt install -y zsh", + "post-link": "./scripts/linux-setup_zsh.sh" + }, + { + "package": "tmux", + "link": { + "from": "linux-vm/tmux", + "to": "~/.tmux.conf" + }, + "install": "sudo apt install -y tmux" + }, + { + "package": "nvim", + "install": "bash -c 'wget -O nvim.deb https://gitea.tomastm.com/tomas.mirchev/neovim/releases/download/v0.10.0/nvim-linux-$(dpkg --print-architecture).deb && sudo dpkg -i nvim.deb && rm nvim.deb'" + }, + { + "package": "git", + "install": "sudo apt install -y git" + }, + { + "package": "htop", + "install": "sudo apt install -y htop" + }, + "bin" + ], + "linux-dev": [ + "zsh_config", + { + "package": "zsh", + "install": "sudo apt install -y zsh", + "post-link": "./scripts/linux-setup_zsh.sh" + }, + { + "package": "tmux", + "install": "sudo apt install -y tmux" + }, + { + "package": "nvim", + "ignore-template": true, + "link": { + "from": "linux-dev/nvim", + "to": "~/.config/nvim" + }, + "post-link": "nvim --headless '+Lazy! restore' '+MasonUpdate' '+TSUpdate' +qa && (grep -q 'alias vim=nvim' ~/.zshrc || echo 'alias vim=nvim' >> ~/.zshrc) || true" + }, + { + "package": "git", + "install": "sudo apt install -y git" + }, + { + "package": "htop", + "install": "sudo apt install -y htop" + } + ] } - }, - "environments": { - "macos": [ - "zsh", - "zsh_config", - "bin", - "tmux", - "nvim", - "git", - "ghostty", - "alacritty", - { - "package": "karabiner", - "link": { "from": "macos/karabiner", "to": "~/.config/karabiner" } - }, - { - "package": "linearmouse", - "link": { "from": "macos/linearmouse", "to": "~/.config/linearmouse" } - }, - { - "package": "rectangle", - "link-comment": "Needs manual import from config/macos/linearmouse" - } - ], - "linux-vm": [ - "zsh_config", - { - "package": "zsh", - "install": "sudo apt install -y zsh", - "post-link": "./scripts/linux-setup_zsh.sh" - }, - { - "package": "tmux", - "link": { "from": "linux-vm/tmux", "to": "~/.tmux.conf" }, - "install": "sudo apt install -y tmux" - }, - { - "package": "nvim", - "install": "bash -c 'wget -O nvim.deb https://gitea.tomastm.com/tomas.mirchev/neovim/releases/download/v0.10.0/nvim-linux-$(dpkg --print-architecture).deb && sudo dpkg -i nvim.deb && rm nvim.deb'" - }, - { - "package": "git", - "install": "sudo apt install -y git" - }, - { - "package": "htop", - "install": "sudo apt install -y htop" - }, - "bin" - ], - "linux-dev": [ - "zsh_config", - { - "package": "zsh", - "install": "sudo apt install -y zsh", - "post-link": "./scripts/linux-setup_zsh.sh" - }, - { - "package": "tmux", - "install": "sudo apt install -y tmux" - }, - { - "package": "nvim", - "ignore-template": true, - "link": { "from": "linux-dev/nvim", "to": "~/.config/nvim" }, - "post-link": "nvim --headless '+Lazy! restore' '+MasonUpdate' '+TSUpdate' +qa && (grep -q 'alias vim=nvim' ~/.zshrc || echo 'alias vim=nvim' >> ~/.zshrc) || true" - }, - { - "package": "git", - "install": "sudo apt install -y git" - }, - { - "package": "htop", - "install": "sudo apt install -y htop" - } - ] - } } diff --git a/config/shared/zsh/zsh_config/aliases b/config/shared/zsh_config/aliases similarity index 100% rename from config/shared/zsh/zsh_config/aliases rename to config/shared/zsh_config/aliases diff --git a/config/shared/zsh/zsh_config/keybindings b/config/shared/zsh_config/keybindings similarity index 100% rename from config/shared/zsh/zsh_config/keybindings rename to config/shared/zsh_config/keybindings diff --git a/config/shared/zsh/zsh_config/prompt b/config/shared/zsh_config/prompt similarity index 100% rename from config/shared/zsh/zsh_config/prompt rename to config/shared/zsh_config/prompt diff --git a/config/shared/zsh/zsh_config/zshrc b/config/shared/zsh_config/zshrc similarity index 100% rename from config/shared/zsh/zsh_config/zshrc rename to config/shared/zsh_config/zshrc -- 2.45.2 From 490f6380c9350405747f772eac96578be2371ee7 Mon Sep 17 00:00:00 2001 From: Tomas Mirchev Date: Mon, 15 Sep 2025 08:20:18 +0300 Subject: [PATCH 07/10] rm nvim.deb tmp file --- nvim.deb | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 nvim.deb diff --git a/nvim.deb b/nvim.deb deleted file mode 100644 index e69de29..0000000 -- 2.45.2 From 32258d3b7f4fbe8fddc19d37c334f1332387633e Mon Sep 17 00:00:00 2001 From: Tomas Mirchev Date: Mon, 15 Sep 2025 08:46:08 +0300 Subject: [PATCH 08/10] add tmux custom title --- config/linux-vm/tmux | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/config/linux-vm/tmux b/config/linux-vm/tmux index 458483c..d10286f 100644 --- a/config/linux-vm/tmux +++ b/config/linux-vm/tmux @@ -19,20 +19,24 @@ setw -g pane-base-index 1 # Increase scrollback buffer size set -g history-limit 10000 -# Customize the status bar -set -g status-style bg=default,fg=white -set -g status-left '#[fg=cyan,bold][#S] ' +# Customize the status bar for Catppuccin Latte +set -g status-style bg=default,fg='#4c4f69' # Catppuccin Latte text color +set -g status-left '#[fg=#1e66f5,bold][#S] ' # Catppuccin Latte blue for session set -g status-left-length 50 set -g status-right '' -# Window status format -setw -g window-status-format '#[fg=white,dim]#I#[fg=grey]:#[fg=white]#W#[fg=grey]#F' -setw -g window-status-current-format '#[fg=cyan,bold]#I#[fg=blue]:#[fg=cyan]#W#[fg=grey]#F' +# Optional: Style the window tabs to match +set -g window-status-current-style 'fg=#4c4f69,bold' # Active window - dark text, bold +set -g window-status-style 'fg=#6c6f85' # Inactive windows - lighter text +set -g window-status-separator ' | ' # Clean separator -# Pane border -set -g pane-border-style fg=colour240 -set -g pane-active-border-style fg=cyan +# Optional: Style the borders to match (if you use pane borders) +set -g pane-border-style 'fg=#ccd0da' # Light border for inactive panes +set -g pane-active-border-style 'fg=#1e66f5' # Blue border for active pane +set -g status-left-length 20 +set -g status-right-length 20 +set -g pane-border-format "" # Message text set -g message-style bg=default,fg=cyan @@ -45,6 +49,7 @@ bind-key -T copy-mode-vi WheelDownPane send -N1 -X scroll-down # Update terminal titles set-option -g set-titles on +set-option -g set-titles-string "#S" # Use vim keybindings in copy mode setw -g mode-keys vi -- 2.45.2 From b8e96240ab38bc868a06d2865328244a3e00ce15 Mon Sep 17 00:00:00 2001 From: Tomas Mirchev Date: Fri, 26 Sep 2025 03:06:12 +0000 Subject: [PATCH 09/10] neovim custom invero light-theme (#1) Reviewed-on: https://gitea.tomastm.com/tomas.mirchev/dotfiles/pulls/1 Co-authored-by: Tomas Mirchev Co-committed-by: Tomas Mirchev --- config/linux-dev/nvim/colors/invero.lua | 1 + config/linux-dev/nvim/init.lua | 25 ++- config/linux-dev/nvim/lazy-lock.json | 36 ++-- config/linux-dev/nvim/lua/config/autocmds.lua | 128 ++++++++++++ config/linux-dev/nvim/lua/config/lazy.lua | 9 +- config/linux-dev/nvim/lua/config/options.lua | 30 +-- .../nvim/lua/plugins/colorscheme.lua | 11 - config/linux-dev/nvim/lua/plugins/lsp.lua | 12 +- .../linux-dev/nvim/lua/plugins/neo-tree.lua | 33 --- .../linux-dev/nvim/lua/plugins/nvim-tree.lua | 188 ++++++++++++++++++ .../linux-dev/nvim/lua/plugins/telescope.lua | 54 +---- .../linux-dev/nvim/lua/plugins/treesitter.lua | 62 +++--- .../nvim/lua/themes/invero/colors.lua | 19 ++ .../nvim/lua/themes/invero/groups/editor.lua | 32 +++ .../invero/groups/integrations/nvim-tree.lua | 7 + .../invero/groups/integrations/telescope.lua | 9 + .../groups/integrations/tree-sitter.lua | 20 ++ .../nvim/lua/themes/invero/groups/syntax.lua | 38 ++++ .../lua/themes/invero/groups/terminal.lua | 31 +++ .../linux-dev/nvim/lua/themes/invero/init.lua | 14 ++ .../nvim/lua/themes/invero/palette.lua | 53 +++++ .../nvim/lua/themes/invero/setup.lua | 72 +++++++ config/linux-dev/tmux | 71 +++++++ 23 files changed, 783 insertions(+), 172 deletions(-) create mode 100644 config/linux-dev/nvim/colors/invero.lua create mode 100644 config/linux-dev/nvim/lua/config/autocmds.lua delete mode 100644 config/linux-dev/nvim/lua/plugins/colorscheme.lua delete mode 100644 config/linux-dev/nvim/lua/plugins/neo-tree.lua create mode 100644 config/linux-dev/nvim/lua/plugins/nvim-tree.lua create mode 100644 config/linux-dev/nvim/lua/themes/invero/colors.lua create mode 100644 config/linux-dev/nvim/lua/themes/invero/groups/editor.lua create mode 100644 config/linux-dev/nvim/lua/themes/invero/groups/integrations/nvim-tree.lua create mode 100644 config/linux-dev/nvim/lua/themes/invero/groups/integrations/telescope.lua create mode 100644 config/linux-dev/nvim/lua/themes/invero/groups/integrations/tree-sitter.lua create mode 100644 config/linux-dev/nvim/lua/themes/invero/groups/syntax.lua create mode 100644 config/linux-dev/nvim/lua/themes/invero/groups/terminal.lua create mode 100644 config/linux-dev/nvim/lua/themes/invero/init.lua create mode 100644 config/linux-dev/nvim/lua/themes/invero/palette.lua create mode 100644 config/linux-dev/nvim/lua/themes/invero/setup.lua create mode 100644 config/linux-dev/tmux diff --git a/config/linux-dev/nvim/colors/invero.lua b/config/linux-dev/nvim/colors/invero.lua new file mode 100644 index 0000000..c3f6a36 --- /dev/null +++ b/config/linux-dev/nvim/colors/invero.lua @@ -0,0 +1 @@ +require("themes.invero").load() diff --git a/config/linux-dev/nvim/init.lua b/config/linux-dev/nvim/init.lua index 94396f2..46251f0 100644 --- a/config/linux-dev/nvim/init.lua +++ b/config/linux-dev/nvim/init.lua @@ -1,3 +1,22 @@ -require('config.options') -- vim options -require('config.keymaps') -- keymaps -require('config.lazy') -- plugin manager and plugins +--[[ + Neovim Lua config: ways to set things + + - vim.opt : preferred modern API for options (handles lists, cleaner syntax) + - vim.g : global variables (leader key, plugin settings, disable builtins, etc.) + - vim.o : global-only option (rarely needed directly) + - vim.wo : window-local option (applies to current window only, use in autocmds) + - vim.bo : buffer-local option (applies to current buffer only, use in autocmds) + - vim.env : set environment variables (like PATH, LANG) + - vim.fn : call Vimscript functions (e.g. vim.fn.getcwd()) + - vim.cmd : run raw Vimscript/Ex commands (e.g. vim.cmd("colorscheme desert")) + - vim.api : low-level Neovim API (create autocmds, keymaps, buffer/window ops, etc.) + + TL;DR -> use vim.opt + vim.g in options.lua for defaults. + Use vim.wo/vim.bo only in context-specific tweaks (autocmds). + Use vim.env, vim.fn, vim.cmd, vim.api as needed for scripting. +]] + +require("config.options") +require("config.keymaps") +require("config.lazy") +require("config.autocmds") diff --git a/config/linux-dev/nvim/lazy-lock.json b/config/linux-dev/nvim/lazy-lock.json index af593bc..13a1be8 100644 --- a/config/linux-dev/nvim/lazy-lock.json +++ b/config/linux-dev/nvim/lazy-lock.json @@ -1,24 +1,22 @@ { - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "conform.nvim": { "branch": "master", "commit": "d28ccf945374edd9f1c34a82f6c22261dbd8ab98" }, - "fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" }, - "harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" }, + "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, + "conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" }, + "fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" }, + "harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" }, - "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, - "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, - "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, - "nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" }, - "nvim-lspconfig": { "branch": "master", "commit": "bc6ada4b0892b7f10852c0b8ca7209fd39a6d754" }, - "nvim-treesitter": { "branch": "master", "commit": "7dc8aabe86db8c2f23520e8334f7584f83e84342" }, - "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, - "nvim-web-devicons": { "branch": "master", "commit": "e87554285f581047b1bf236794b0eb812b444b87" }, - "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "rose-pine": { "branch": "main", "commit": "91548dca53b36dbb9d36c10f114385f759731be1" }, - "schemastore.nvim": { "branch": "main", "commit": "f8d6e9068861888651f68958521b1958314aac41" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, + "mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" }, + "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, + "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, + "nvim-lspconfig": { "branch": "master", "commit": "d9879110d0422a566fa01d732556f4d5515e1738" }, + "nvim-tree.lua": { "branch": "master", "commit": "321bc61580fd066b76861c32de3319c3a6d089e7" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" }, + "nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "schemastore.nvim": { "branch": "main", "commit": "0fccf9234acfd981867cbd42c4101829e6808790" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" } } diff --git a/config/linux-dev/nvim/lua/config/autocmds.lua b/config/linux-dev/nvim/lua/config/autocmds.lua new file mode 100644 index 0000000..dd2f7da --- /dev/null +++ b/config/linux-dev/nvim/lua/config/autocmds.lua @@ -0,0 +1,128 @@ +-- Highlight when yanking (copying) text +vim.api.nvim_create_autocmd("TextYankPost", { + callback = function() + vim.highlight.on_yank() + end, +}) + +---------------------------------------------- + +-- Reload ColorScheme by clearing cached modules +vim.api.nvim_create_user_command("ReloadColorscheme", function() + local current = vim.g.colors_name + if not current then + vim.notify("No colorscheme is currently set", vim.log.levels.WARN) + return + end + + -- clear only the cached modules for this theme + for k in pairs(package.loaded) do + if k:match("^themes%." .. current) then + package.loaded[k] = nil + end + end + + -- reload it + vim.cmd("colorscheme " .. current) + vim.notify("Reloaded " .. current .. " colorscheme", vim.log.levels.INFO) +end, { desc = "Reload the current colorscheme" }) + +---------------------------------------------- + +--[[ +Command :TSHighlightRoots (works but uncomment only when used) + +Description: + Collects all Tree-sitter highlight groups, resolves their links, + and outputs the unique root groups actually used (for theming/debugging). + +Usage: + :TSHighlightRoots -> prints roots in the command line + :TSHighlightRoots -> writes roots into (overwrites) + (filename supports ~ and tab-completion) +]] +-- local function resolve_link(name) +-- local seen = {} +-- while name and not seen[name] do +-- seen[name] = true +-- local hl = vim.api.nvim_get_hl(0, { name = name }) +-- if hl.link then +-- name = hl.link +-- else +-- return name +-- end +-- end +-- end +-- +-- vim.api.nvim_create_autocmd("VimEnter", { +-- callback = function() +-- vim.api.nvim_create_user_command("TSHighlightRoots", function(opts) +-- local roots = {} +-- for _, group in ipairs(vim.fn.getcompletion("@", "highlight")) do +-- local root = resolve_link(group) +-- if root then +-- roots[root] = true +-- end +-- end +-- +-- local output = { "Unique root highlight groups used by Tree-sitter:" } +-- for root in pairs(roots) do +-- table.insert(output, " " .. root) +-- end +-- +-- if opts.args ~= "" then +-- -- write to file +-- local filename = vim.fn.expand(opts.args) +-- local fd = assert(io.open(filename, "w")) +-- fd:write(table.concat(output, "\n")) +-- fd:close() +-- print("Wrote roots to " .. filename) +-- else +-- -- default: print to command line +-- for _, line in ipairs(output) do +-- print(line) +-- end +-- end +-- end, { +-- nargs = "?", -- allow 0 or 1 argument +-- complete = "file", -- tab-complete filenames +-- }) +-- end, +-- }) + +---------------------------------------------- +-- Useful tricks that do not fully work +---------------------------------------------- + +-- -- Show cursorline only in the active window +-- +-- vim.api.nvim_create_autocmd({ "WinEnter", "BufEnter" }, { +-- callback = function() +-- local ft = vim.bo.filetype +-- vim.notify("enter: " .. ft .. " - " .. vim.bo.buftype) +-- -- if not ft:match("^Telescope") and ft ~= "NvimTree" then +-- -- vim.wo.cursorline = true +-- -- end +-- end, +-- }) + +-- vim.api.nvim_create_autocmd({ "WinLeave", "BufLeave" }, { +-- callback = function() +-- local ft = vim.bo.filetype +-- vim.notify("exit: " .. ft .. " - " .. vim.bo.buftype) +-- -- if not ft:match("^Telescope") and ft ~= "NvimTree" then +-- -- vim.wo.cursorline = false +-- -- end +-- end, +-- }) + +---------------------------------------------- + +-- -- Associate filetype +-- +-- vim.api.nvim_create_autocmd("FileType", { +-- pattern = "text", +-- callback = function() +-- vim.bo.filetype = "markdown" +-- end, +-- }) diff --git a/config/linux-dev/nvim/lua/config/lazy.lua b/config/linux-dev/nvim/lua/config/lazy.lua index 26e5007..81c94d1 100644 --- a/config/linux-dev/nvim/lua/config/lazy.lua +++ b/config/linux-dev/nvim/lua/config/lazy.lua @@ -8,4 +8,11 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then end ---@diagnostic disable-next-line: undefined-field vim.opt.rtp:prepend(lazypath) -require('lazy').setup('plugins') +require("lazy").setup({ + spec = { { import = "plugins" } }, + ui = { + backdrop = 100, + border = "rounded" + }, +}) + diff --git a/config/linux-dev/nvim/lua/config/options.lua b/config/linux-dev/nvim/lua/config/options.lua index 3d15a57..8cc412d 100644 --- a/config/linux-dev/nvim/lua/config/options.lua +++ b/config/linux-dev/nvim/lua/config/options.lua @@ -3,19 +3,16 @@ vim.g.mapleader = " " vim.g.maplocalleader = " " -- Use Nerd Font -vim.g.have_nerd_font = true +vim.g.have_nerd_font = false -- Add vertical line -- vim.opt.colorcolumn = "100" +vim.opt.laststatus = 3 vim.opt.signcolumn = "no" -- Enable TrueColor -vim.opt.termguicolors = true - --- Disable Neovim background -vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) -vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) +vim.opt.termguicolors = false -- Scroll lines/columns vim.opt.mousescroll = "hor:1,ver:1" @@ -42,7 +39,8 @@ vim.opt.relativenumber = true vim.opt.mouse = "a" -- Full path on status line -vim.opt.statusline = "%F%m%r%h%w%=%l,%c %P" +vim.opt.statusline = "%= %F%m%r%h%w ─ (%l,%c %P) %=" +vim.opt.fillchars:append({ stl = "─", stlnc = "─" }) -- Sync clipboard between OS and Neovim vim.schedule(function() @@ -78,19 +76,5 @@ vim.opt.guicursor = "n-v-i-c:block" -- Minimal number of screen lines to keep above and below the cursor vim.opt.scrolloff = 10 --- Highlight when yanking (copying) text -vim.api.nvim_create_autocmd("TextYankPost", { - callback = function() - vim.highlight.on_yank() - end, -}) - -vim.diagnostic.config({ - severity_sort = true, - severities = { - [vim.diagnostic.severity.ERROR] = 4, - [vim.diagnostic.severity.WARN] = 3, - [vim.diagnostic.severity.INFO] = 2, - [vim.diagnostic.severity.HINT] = 1, - } -}) +-- Load the colorscheme +vim.cmd.colorscheme("invero") diff --git a/config/linux-dev/nvim/lua/plugins/colorscheme.lua b/config/linux-dev/nvim/lua/plugins/colorscheme.lua deleted file mode 100644 index e1d5dc5..0000000 --- a/config/linux-dev/nvim/lua/plugins/colorscheme.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "rose-pine/neovim", - name = "rose-pine", - config = function() - require("rose-pine").setup({ - disable_background = true, - disable_float_background = true, - }) - vim.cmd("colorscheme rose-pine") - end, -} diff --git a/config/linux-dev/nvim/lua/plugins/lsp.lua b/config/linux-dev/nvim/lua/plugins/lsp.lua index 8da5003..4fbd4eb 100644 --- a/config/linux-dev/nvim/lua/plugins/lsp.lua +++ b/config/linux-dev/nvim/lua/plugins/lsp.lua @@ -21,14 +21,20 @@ return { "neovim/nvim-lspconfig", dependencies = { - { "williamboman/mason.nvim", config = true }, - "williamboman/mason-lspconfig.nvim", + { "williamboman/mason.nvim", version = "1.8.0", config = true }, + { "williamboman/mason-lspconfig.nvim", version = "1.31.0"}, { "j-hui/fidget.nvim", opts = {} }, -- side fidget showing status "hrsh7th/cmp-nvim-lsp", -- completion "b0o/schemastore.nvim", }, config = function() - require("mason").setup() + require("mason").setup({ + ui = { + border = "rounded", + backdrop = 0 + }, + }) + require("mason-lspconfig").setup() local lspconfig = require("lspconfig") diff --git a/config/linux-dev/nvim/lua/plugins/neo-tree.lua b/config/linux-dev/nvim/lua/plugins/neo-tree.lua deleted file mode 100644 index 93f0cd2..0000000 --- a/config/linux-dev/nvim/lua/plugins/neo-tree.lua +++ /dev/null @@ -1,33 +0,0 @@ -return { - "nvim-neo-tree/neo-tree.nvim", - version = "*", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - cmd = "Neotree", - keys = { - { "et", ":Neotree position=left toggle", desc = "Explorer Toggle", silent = true }, - { "E", ":Neotree focus", desc = "Explorer Focus", silent = true }, - { "ef", ":Neotree float", desc = "Explorer Float", silent = true }, - { "eb", ":Neotree buffers", desc = "Explorer Buffers", silent = true }, - { "eg", ":Neotree git_status", desc = "Explorer Git", silent = true }, - }, - opts = { - filesystem = { - follow_current_file = { - enabled = true, -- Enable this feature - leave_dirs_open = true, -- Leave directories open when following - }, - filtered_items = { - visible = true, - }, - window = { - mappings = { - ["e"] = "close_window", - }, - }, - }, - }, -} diff --git a/config/linux-dev/nvim/lua/plugins/nvim-tree.lua b/config/linux-dev/nvim/lua/plugins/nvim-tree.lua new file mode 100644 index 0000000..9bca678 --- /dev/null +++ b/config/linux-dev/nvim/lua/plugins/nvim-tree.lua @@ -0,0 +1,188 @@ +return { + "nvim-tree/nvim-tree.lua", + version = "*", + lazy = false, + keys = { + { "et", ":NvimTreeToggle", desc = "Explorer Toggle", silent = true }, + }, + config = function() + require("nvim-tree").setup({ + hijack_cursor = true, + disable_netrw = true, + hijack_netrw = true, + hijack_unnamed_buffer_when_opening = true, + root_dirs = { ".git", "package.json" }, + prefer_startup_root = true, + sync_root_with_cwd = true, + reload_on_bufenter = true, + respect_buf_cwd = true, + view = { + centralize_selection = false, + cursorline = true, + cursorlineopt = "both", + debounce_delay = 15, + side = "left", + preserve_window_proportions = false, + number = false, + relativenumber = false, + signcolumn = "no", + width = 30, + }, + renderer = { + add_trailing = false, + group_empty = false, + full_name = false, + root_folder_label = false, + -- special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" }, + special_files = {}, -- keep to overwrite defaults + symlink_destination = true, + icons = { + padding = "", + glyphs = { + folder = { + arrow_closed = "+", + arrow_open = "-", + }, + }, + show = { + file = false, + folder = false, + folder_arrow = true, + git = false, + modified = false, + hidden = false, + diagnostics = false, + bookmarks = false, + }, + }, + }, + hijack_directories = { + enable = true, + auto_open = true, + }, + update_focused_file = { + enable = true, + update_root = { + enable = true, + ignore_list = {}, + }, + exclude = false, + }, + filters = { + enable = true, + git_ignored = true, + dotfiles = false, + git_clean = false, + no_buffer = false, + no_bookmark = false, + custom = {}, + exclude = {}, + }, + live_filter = { + prefix = "[FILTER]: ", + always_show_folders = true, + }, + filesystem_watchers = { + enable = true, + debounce_delay = 50, + ignore_dirs = { + -- C / C++ + "/.ccls-cache", + "/build", + "/out", + "/cmake-build-*", + + -- Node.js / Web + "/node_modules", + "/dist", + "/.next", + "/.nuxt", + "/coverage", + "/storybook-static", + + -- Rust + "/target", + + -- Java / JVM + "/target", -- (Maven) + "/build", -- (Gradle) + "/out", -- (IDEA / javac) + + -- Python + "/.venv", + "/venv", + "/__pycache__", + "/.mypy_cache", + "/.pytest_cache", + + -- Go + "/bin", + "/pkg", + + -- General + "/tmp", + "/.cache", + "/.idea", + "/.vscode", + "/logs", + }, + }, + trash = { + cmd = "gio trash", + }, + }) + end, +} + +-- return { +-- "nvim-neo-tree/neo-tree.nvim", +-- version = "*", +-- dependencies = { +-- "nvim-lua/plenary.nvim", +-- "nvim-tree/nvim-web-devicons", +-- "MunifTanjim/nui.nvim", +-- }, +-- cmd = "Neotree", +-- keys = { +-- { "et", ":Neotree position=left toggle", desc = "Explorer Toggle", silent = true }, +-- { "E", ":Neotree focus", desc = "Explorer Focus", silent = true }, +-- { "ef", ":Neotree float", desc = "Explorer Float", silent = true }, +-- { "eb", ":Neotree buffers", desc = "Explorer Buffers", silent = true }, +-- { "eg", ":Neotree git_status", desc = "Explorer Git", silent = true }, +-- }, +-- opts = { +-- event_handlers = { +-- { +-- event = require("neo-tree.ui.events").NEO_TREE_WINDOW_AFTER_OPEN, +-- handler = function(args) +-- if args and args.winid and vim.api.nvim_win_is_valid(args.winid) then +-- vim.api.nvim_win_set_option(args.winid, "colorcolumn", "") +-- vim.api.nvim_win_set_option(args.winid, "signcolumn", "no") +-- end +-- end, +-- }, +-- }, +-- popup_border_style = "single", +-- window = { +-- mappings = { +-- ["e"] = "close_window", +-- }, +-- }, +-- default_component_configs = { +-- icon = { enabled = false }, +-- git_status = { symbols = {}, align = "none" }, +-- name = { trailing_slash = true } +-- }, +-- enable_git_status = false, +-- enable_diagnostics = false, +-- filesystem = { +-- follow_current_file = { +-- enabled = true, -- Enable this feature +-- leave_dirs_open = true, -- Leave directories open when following +-- }, +-- filtered_items = { +-- visible = true, +-- } +-- }, +-- }, +-- } diff --git a/config/linux-dev/nvim/lua/plugins/telescope.lua b/config/linux-dev/nvim/lua/plugins/telescope.lua index d2f9359..937cd95 100644 --- a/config/linux-dev/nvim/lua/plugins/telescope.lua +++ b/config/linux-dev/nvim/lua/plugins/telescope.lua @@ -1,69 +1,30 @@ local remap = require("utils.remap") -return { -- Fuzzy Finder (files, lsp, etc) +return { "nvim-telescope/telescope.nvim", event = "VimEnter", branch = "0.1.x", dependencies = { "nvim-lua/plenary.nvim", - { -- If encountering errors, see telescope-fzf-native README for installation instructions + { "nvim-telescope/telescope-fzf-native.nvim", - - -- `build` is used to run some command when the plugin is installed/updated. - -- This is only run then, not every time Neovim starts up. build = "make", - - -- `cond` is a condition used to determine whether this plugin should be - -- installed and loaded. cond = function() return vim.fn.executable("make") == 1 end, }, { "nvim-telescope/telescope-ui-select.nvim" }, - - -- Useful for getting pretty icons, but requires a Nerd Font. - { "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font }, + -- { "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font }, }, config = function() - -- Telescope is a fuzzy finder that comes with a lot of different things that - -- it can fuzzy find! It's more than just a "file finder", it can search - -- many different aspects of Neovim, your workspace, LSP, and more! - -- - -- The easiest way to use Telescope, is to start by doing something like: - -- :Telescope help_tags - -- - -- After running this command, a window will open up and you're able to - -- type in the prompt window. You'll see a list of `help_tags` options and - -- a corresponding preview of the help. - -- - -- Two important keymaps to use while in Telescope are: - -- - Insert mode: - -- - Normal mode: ? - -- - -- This opens a window that shows you all of the keymaps for the current - -- Telescope picker. This is really useful to discover what Telescope can - -- do as well as how to actually do it! - - -- [[ Configure Telescope ]] - -- See `:help telescope` and `:help telescope.setup()` require("telescope").setup({ - -- You can put your default mappings / updates / etc. in here - -- All the info you're looking for is in `:help telescope.setup()` - -- - -- defaults = { - -- mappings = { - -- i = { [''] = 'to_fuzzy_refine' }, - -- }, - -- }, - -- pickers = {} defaults = { layout_strategy = "vertical", layout_config = { - -- vertical = { width = 0.5 } - -- horizontal = { - -- width = 0.9, - -- preview_width = 0.5, - -- }, + width = { 0.95, max = 100 }, + height = 0.95, + preview_cutoff = 1, + preview_height = 0.7, }, mappings = { n = { @@ -73,7 +34,6 @@ return { -- Fuzzy Finder (files, lsp, etc) }, }) - -- Enable Telescope extensions if they are installed pcall(require("telescope").load_extension, "fzf") pcall(require("telescope").load_extension, "ui-select") diff --git a/config/linux-dev/nvim/lua/plugins/treesitter.lua b/config/linux-dev/nvim/lua/plugins/treesitter.lua index 253dc20..990e98c 100644 --- a/config/linux-dev/nvim/lua/plugins/treesitter.lua +++ b/config/linux-dev/nvim/lua/plugins/treesitter.lua @@ -1,34 +1,32 @@ return { - 'nvim-treesitter/nvim-treesitter', - build = 'TSUpdate', - main = 'nvim-treesitter.configs', - opts = { - ensure_installed = { - 'diff', - 'lua', - 'html', - 'css', - 'javascript', - 'typescript', - 'tsx', - 'markdown', - 'markdown_inline' - }, - auto_install = true, - highlight = { - enable = true, - }, - indent = { enable = true } - }, - config = function(_, opts) - require('nvim-treesitter.configs').setup(opts) - -- Add MDX filetype detection - vim.filetype.add({ - extension = { - mdx = 'markdown.mdx', - }, - }) - end, - + "nvim-treesitter/nvim-treesitter", + build = "TSUpdate", + main = "nvim-treesitter.configs", + opts = { + ensure_installed = { + "diff", + "lua", + "html", + "css", + "javascript", + "typescript", + "tsx", + "markdown", + "markdown_inline", + }, + auto_install = true, + highlight = { + enable = true, + }, + indent = { enable = true }, + }, + config = function(_, opts) + require("nvim-treesitter.configs").setup(opts) + -- Add MDX filetype detection + vim.filetype.add({ + extension = { + mdx = "markdown.mdx", + }, + }) + end, } - diff --git a/config/linux-dev/nvim/lua/themes/invero/colors.lua b/config/linux-dev/nvim/lua/themes/invero/colors.lua new file mode 100644 index 0000000..e3758b5 --- /dev/null +++ b/config/linux-dev/nvim/lua/themes/invero/colors.lua @@ -0,0 +1,19 @@ +local M = {} + +function M.get(P) + local colors = { + base = P.white, + surface = P.gray_light, + outline = P.gray_dark, + text = P.black, + muted = P.gray, + accent = P.blue, + accent_light = P.blue_light, + syntax = P.slate_indigo, + none = "NONE", + } + + return vim.tbl_extend("force", P, colors) +end + +return M diff --git a/config/linux-dev/nvim/lua/themes/invero/groups/editor.lua b/config/linux-dev/nvim/lua/themes/invero/groups/editor.lua new file mode 100644 index 0000000..3adae6b --- /dev/null +++ b/config/linux-dev/nvim/lua/themes/invero/groups/editor.lua @@ -0,0 +1,32 @@ +local M = {} + +function M.get(C) + return { + Normal = { fg = C.text, bg = C.none }, + Directory = { fg = C.accent }, + Question = { fg = C.text }, + LineNr = { fg = C.muted }, + CursorLineNr = { fg = C.accent, bold = true }, + CursorLine = { bg = C.surface }, + Visual = { bg = C.accent_light }, + + Search = { fg = C.yellow }, + CurSearch = { fg = C.yellow, bg = C.none, bold = true }, + IncSearch = { fg = C.yellow, bg = C.none, bold = true }, + + MatchParen = { fg = C.accent, bg = C.accent_light, bold = true }, + EndOfBuffer = { fg = C.base }, -- End-of-buffer marker (~ lines) + + WinSeparator = { fg = C.outline }, + StatusLine = { fg = C.outline, bg = C.none }, -- Active statusline (where filename) + MsgArea = { fg = C.text, bg = C.none }, -- Command-line / message area + MsgSeparator = { fg = C.text, bg = C.surface }, -- Separator for messages + ModeMsg = { fg = C.text }, + + TabLine = { fg = C.muted }, -- Unselected tab + TabLineSel = { fg = C.text, bold = true }, -- Selected tab + TabLineFill = { bg = C.none }, -- Empty space in the tabline + } +end + +return M diff --git a/config/linux-dev/nvim/lua/themes/invero/groups/integrations/nvim-tree.lua b/config/linux-dev/nvim/lua/themes/invero/groups/integrations/nvim-tree.lua new file mode 100644 index 0000000..707adf2 --- /dev/null +++ b/config/linux-dev/nvim/lua/themes/invero/groups/integrations/nvim-tree.lua @@ -0,0 +1,7 @@ +local M = {} + +function M.get(C) + return {} +end + +return M diff --git a/config/linux-dev/nvim/lua/themes/invero/groups/integrations/telescope.lua b/config/linux-dev/nvim/lua/themes/invero/groups/integrations/telescope.lua new file mode 100644 index 0000000..d5618b3 --- /dev/null +++ b/config/linux-dev/nvim/lua/themes/invero/groups/integrations/telescope.lua @@ -0,0 +1,9 @@ +local M = {} + +function M.get(C) + return { + TelescopeMatching = { fg = C.yellow, bg = C.none, bold = true }, + } +end + +return M diff --git a/config/linux-dev/nvim/lua/themes/invero/groups/integrations/tree-sitter.lua b/config/linux-dev/nvim/lua/themes/invero/groups/integrations/tree-sitter.lua new file mode 100644 index 0000000..b791f65 --- /dev/null +++ b/config/linux-dev/nvim/lua/themes/invero/groups/integrations/tree-sitter.lua @@ -0,0 +1,20 @@ +local M = {} + +function M.get(C) + return { + ["@constant.macro"] = { fg = C.syntax }, + ["@function.method"] = { fg = C.syntax }, + ["@type.qualifier"] = { fg = C.syntax }, + ["@variable.parameter"] = { fg = C.syntax }, + ["@variable"] = { fg = C.syntax }, + ["@type.definition"] = { fg = C.syntax }, + ["@markup.italic"] = { fg = C.syntax }, + ["@markup.strong"] = { fg = C.syntax }, + ["@markup.underline"] = { fg = C.syntax }, + ["@markup.strikethrough"] = { fg = C.syntax }, + + ["@_jsx_attribute"] = { link = "Constant" }, + } +end + +return M diff --git a/config/linux-dev/nvim/lua/themes/invero/groups/syntax.lua b/config/linux-dev/nvim/lua/themes/invero/groups/syntax.lua new file mode 100644 index 0000000..e34bec4 --- /dev/null +++ b/config/linux-dev/nvim/lua/themes/invero/groups/syntax.lua @@ -0,0 +1,38 @@ +local M = {} + +function M.get(C) + return { + Comment = { fg = C.muted, italic = true }, + String = { fg = C.green }, + Boolean = { fg = C.accent, bold = true, italic = true }, + Number = { fg = C.accent }, + + -- syntax color + Constant = { fg = C.syntax }, + Function = { fg = C.syntax }, + Type = { fg = C.syntax }, + Statement = { fg = C.syntax }, + Identifier = { fg = C.syntax }, + Operator = { fg = C.syntax }, + PreProc = { fg = C.syntax }, + Special = { fg = C.syntax }, + Delimiter = { fg = C.syntax }, + Todo = { fg = C.syntax }, + Title = { fg = C.syntax }, + Underlined = { fg = C.syntax }, + + -- diffs + Added = { fg = C.green }, + Removed = { fg = C.red }, + Changed = { fg = C.yellow }, + + -- diagnostics + DiagnosticInfo = { fg = C.blue }, + DiagnosticWarn = { fg = C.yellow }, + DiagnosticError = { fg = C.red }, + DiagnosticDeprecated = { fg = C.magenta }, + DiagnosticUnderlineError = { fg = C.syntax, underline = true }, + } +end + +return M diff --git a/config/linux-dev/nvim/lua/themes/invero/groups/terminal.lua b/config/linux-dev/nvim/lua/themes/invero/groups/terminal.lua new file mode 100644 index 0000000..919f81f --- /dev/null +++ b/config/linux-dev/nvim/lua/themes/invero/groups/terminal.lua @@ -0,0 +1,31 @@ +local M = {} + +function M.get(C) + return { + terminal_color_0 = { fg = C.black }, + terminal_color_8 = { fg = C.black }, + + terminal_color_1 = { fg = C.red }, + terminal_color_9 = { fg = C.red }, + + terminal_color_2 = { fg = C.green }, + terminal_color_10 = { fg = C.green }, + + terminal_color_3 = { fg = C.yellow }, + terminal_color_11 = { fg = C.yellow }, + + terminal_color_4 = { fg = C.blue }, + terminal_color_12 = { fg = C.blue }, + + terminal_color_5 = { fg = C.magenta }, + terminal_color_13 = { fg = C.magenta }, + + terminal_color_6 = { fg = C.cyan }, + terminal_color_14 = { fg = C.cyan }, + + terminal_color_7 = { fg = C.white }, + terminal_color_15 = { fg = C.white }, + } +end + +return M diff --git a/config/linux-dev/nvim/lua/themes/invero/init.lua b/config/linux-dev/nvim/lua/themes/invero/init.lua new file mode 100644 index 0000000..c6f0068 --- /dev/null +++ b/config/linux-dev/nvim/lua/themes/invero/init.lua @@ -0,0 +1,14 @@ +local M = { + name = "invero", + variant = "light", + mode = "ansi", + exclude_integrations = {}, +} + +function M.load() + local setup = require("themes." .. M.name .. ".setup") + setup.reset(M) + setup.apply(M) +end + +return M diff --git a/config/linux-dev/nvim/lua/themes/invero/palette.lua b/config/linux-dev/nvim/lua/themes/invero/palette.lua new file mode 100644 index 0000000..8ab1836 --- /dev/null +++ b/config/linux-dev/nvim/lua/themes/invero/palette.lua @@ -0,0 +1,53 @@ +local M = {} + +local modes = { + ansi = { + black = 0, + red = 1, + green = 2, + yellow = 3, + blue = 4, + magenta = 5, + cyan = 6, + white = 7, + }, + default = { + black = 238, + red = 196, + green = 35, + yellow = 221, + blue = 27, + magenta = 125, + cyan = 30, + white = 255, + }, +} + +local shared_palette = { + gray_dark = 245, + gray = 247, + gray_light = 253, + orange = 166, + orange_light = 180, + yellow_light = 180, + blue_light = 153, + slate_indigo = 60, +} + +---Get color palette +---@param mode '"ansi"'|'"default"' +---@return table +function M.get(mode) + local mode_palette = modes[mode] + if not mode_palette then + vim.notify( + string.format('Invalid palette mode: "%s" (valid: ansi, default)', tostring(mode)), + vim.log.levels.WARN, + { title = "palette" } + ) + mode_palette = modes.default + end + return vim.tbl_extend("force", mode_palette, shared_palette) +end + +return M diff --git a/config/linux-dev/nvim/lua/themes/invero/setup.lua b/config/linux-dev/nvim/lua/themes/invero/setup.lua new file mode 100644 index 0000000..bf8bc05 --- /dev/null +++ b/config/linux-dev/nvim/lua/themes/invero/setup.lua @@ -0,0 +1,72 @@ +local M = {} + +function M.reset(theme) + vim.opt.background = (theme.variant == "light") and "light" or "dark" + vim.g.colors_name = theme.name +end + +local function list_integrations(theme_name) + local path = vim.fn.stdpath("config") .. "/lua/themes/" .. theme_name .. "/groups/integrations/" + + local files = {} + for name, type in vim.fs.dir(path) do + if type == "file" then + local mod_name = vim.fn.fnamemodify(name, ":r") + table.insert(files, mod_name) + end + end + return files +end + +function M.apply(theme) + local base = "themes." .. theme.name + local P = require(base .. ".palette").get(theme.mode) + local C = require(base .. ".colors").get(P) + + local modules = { + require(base .. ".groups.editor"), + require(base .. ".groups.syntax"), + require(base .. ".groups.terminal"), + } + + local exclude = theme.exclude_integrations or {} + + local function should_load(name) + return not vim.tbl_contains(exclude, name) + end + + -- auto-discover integrations + for _, plugin in ipairs(list_integrations(theme.name)) do + if should_load(plugin) then + local ok_mod, mod = pcall(require, base .. ".groups.integrations." .. plugin) + if ok_mod then + table.insert(modules, mod) + end + end + end + + -- Apply highlights + for _, mod in ipairs(modules) do + local groups = mod.get(C) or {} + for group, opts in pairs(groups) do + if type(opts) ~= "table" then + print("Non-table opts detected in group:", group, "value:", vim.inspect(opts)) + end + local hl = {} + + for k, v in pairs(opts) do + if k == "fg" then + hl.ctermfg = v + elseif k == "bg" then + hl.ctermbg = v + else + hl[k] = v -- bold, italic, underline, sp, etc. + end + end + + vim.api.nvim_set_hl(0, group, hl) + end + end +end + +return M diff --git a/config/linux-dev/tmux b/config/linux-dev/tmux new file mode 100644 index 0000000..13fa2bb --- /dev/null +++ b/config/linux-dev/tmux @@ -0,0 +1,71 @@ +# Change the prefix from 'C-b' to 'C-Space' +unbind C-b +set-option -g prefix C-Space +bind-key C-Space send-prefix +set-option -g set-clipboard on + + +set -g default-terminal "xterm-256color" +#set -as terminal-features ",*:RGB" +# set-option -a terminal-features 'xterm-256color:RGB' +set-option -sg escape-time 10 +set-option -g repeat-time 0 +set-option -g focus-events on + +# Set the base index for windows and panes to 1 instead of 0 +set -g base-index 1 +setw -g pane-base-index 1 + +# Increase scrollback buffer size +set -g history-limit 10000 + +# Light theme with transparent background +set -g status-style bg=default,fg='#4c4f69' +set -g status-left '#[fg=blue,bold][#S] ' +set -g status-left-length 50 +set -g status-right '' + +# set -g pane-border-status bottom # or 'bottom' if status is at top +# set -g pane-border-format '─' # This will fill the entire width automatically + +# Window status format - light theme with terminal blue +setw -g window-status-format '#[fg=#6c6f85]#I#[fg=#9ca0b0]:#[fg=#4c4f69]#W#[fg=#9ca0b0]#F' +setw -g window-status-current-format '#[fg=blue,bold]#I#[fg=#9ca0b0]:#[fg=blue,bold]#W#[fg=#9ca0b0]#F' + +# Pane border - light theme +set -g pane-border-style fg='#ccd0da' +set -g pane-active-border-style fg=blue + +# Message text - light theme +set -g message-style bg='#eff1f5',fg=blue + +# Copy mode colors - light theme +setw -g mode-style bg='#acb0be',fg='#4c4f69' + +# Enable mouse support +setw -g mouse on + +# Fix scroll. Use N3 instead of N1 to make it quicker +bind-key -T copy-mode-vi WheelUpPane send -N1 -X scroll-up +bind-key -T copy-mode-vi WheelDownPane send -N1 -X scroll-down + +# Update terminal titles +set-option -g set-titles off + +# Use vim keybindings in copy mode +setw -g mode-keys vi + +# Setup 'v' to begin selection as in Vim +bind -T copy-mode-vi v send-keys -X begin-selection + +# Pane navigation using vim-like keys +bind -r k select-pane -U +bind -r j select-pane -D +bind -r h select-pane -L +bind -r l select-pane -R + +# Automatically renumber windows when one is closed +set -g renumber-windows on + +# Reload tmux config +bind r source-file ~/.tmux.conf \; display "Reloaded!" -- 2.45.2 From 0df5ff3199829038e17819689dbc653533dadf29 Mon Sep 17 00:00:00 2001 From: Tomas Mirchev Date: Fri, 26 Sep 2025 05:57:27 +0200 Subject: [PATCH 10/10] zsh,vm-list,karabiner,ghostty --- config/macos/bin/vm | 14 +++- config/macos/bin/vm-switch-daemon | 11 +++ config/macos/bin/vmlist-sync | 3 + config/macos/bin/work | 10 +++ .../automatic_backups/karabiner_20250926.json | 44 ++++++++++++ config/macos/karabiner/karabiner.json | 8 +++ config/shared/ghostty/config | 69 +++++++++---------- config/shared/zsh_config/keybindings | 5 +- 8 files changed, 120 insertions(+), 44 deletions(-) create mode 100755 config/macos/bin/vm-switch-daemon create mode 100755 config/macos/bin/vmlist-sync create mode 100755 config/macos/bin/work create mode 100644 config/macos/karabiner/automatic_backups/karabiner_20250926.json diff --git a/config/macos/bin/vm b/config/macos/bin/vm index 442061c..4cd42a5 100755 --- a/config/macos/bin/vm +++ b/config/macos/bin/vm @@ -13,7 +13,8 @@ # Optional: # --no-tmux -> skips attaching to tmux session -skip_tmux=0 +# TMP: Tmux will be disabled (switch to 0 to enable it again) +skip_tmux=1 # Check for --no-tmux flag if [[ "$1" == "--no-tmux" ]]; then @@ -22,6 +23,8 @@ if [[ "$1" == "--no-tmux" ]]; then fi full="$1" +shift # remove host from args + user="$USER" host="$full" @@ -54,7 +57,7 @@ case "$host" in esac # Build SSH command safely using an array -ssh_cmd=(ssh -t) +ssh_cmd=(ssh -tt) # Include identity file if needed [[ -n "$ssh_identity" ]] && ssh_cmd+=(-i "$ssh_identity" -o IdentitiesOnly=yes) @@ -63,7 +66,12 @@ ssh_cmd=(ssh -t) ssh_cmd+=("$user@$ssh_host") # Add tmux session unless skipped -[[ $skip_tmux -eq 0 ]] && ssh_cmd+=("tmux" "new" "-A" "-s" "$tmux_session") +if [[ $skip_tmux -eq 0 ]]; then + ssh_cmd+=("tmux" "new" "-A" "-s" "$tmux_session") +else + # Pass through any extra args user supplied + ssh_cmd+=("$@") +fi # Replace current shell with SSH command # echo "Executing: ${ssh_cmd[*]}" >&2 diff --git a/config/macos/bin/vm-switch-daemon b/config/macos/bin/vm-switch-daemon new file mode 100755 index 0000000..df6a6d4 --- /dev/null +++ b/config/macos/bin/vm-switch-daemon @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +file=/tmp/vm-switch.txt + +# Ensure the file exists +touch "$file" + +echo "Listening on $file ..." +tail -n0 -F "$file" | while read vm; do + [ -n "$vm" ] && echo "Switch requested: $vm" && ~/bin/work "$vm" & +done + diff --git a/config/macos/bin/vmlist-sync b/config/macos/bin/vmlist-sync new file mode 100755 index 0000000..8557cff --- /dev/null +++ b/config/macos/bin/vmlist-sync @@ -0,0 +1,3 @@ +#!/bin/sh +orbctl list > /tmp/vmlist.txt + diff --git a/config/macos/bin/work b/config/macos/bin/work new file mode 100755 index 0000000..f104f06 --- /dev/null +++ b/config/macos/bin/work @@ -0,0 +1,10 @@ +#!/bin/sh +# Usage: work +vm="$1" +if [ -z "$vm" ]; then + echo "Usage: work " + exit 1 +fi + +exec vm "${vm}-orb" + diff --git a/config/macos/karabiner/automatic_backups/karabiner_20250926.json b/config/macos/karabiner/automatic_backups/karabiner_20250926.json new file mode 100644 index 0000000..52bcba2 --- /dev/null +++ b/config/macos/karabiner/automatic_backups/karabiner_20250926.json @@ -0,0 +1,44 @@ +{ + "global": { "show_in_menu_bar": false }, + "profiles": [ + { + "devices": [ + { + "identifiers": { "is_keyboard": true }, + "simple_modifications": [ + { + "from": { "key_code": "non_us_backslash" }, + "to": [{ "key_code": "grave_accent_and_tilde" }] + } + ] + }, + { + "identifiers": { + "is_keyboard": true, + "product_id": 49164, + "vendor_id": 7276 + }, + "simple_modifications": [ + { + "from": { "key_code": "left_command" }, + "to": [{ "key_code": "left_option" }] + }, + { + "from": { "key_code": "left_option" }, + "to": [{ "key_code": "left_command" }] + } + ] + } + ], + "name": "Default profile", + "selected": true, + "simple_modifications": [ + { + "from": { "key_code": "caps_lock" }, + "to": [{ "key_code": "left_control" }] + } + ], + "virtual_hid_keyboard": { "keyboard_type_v2": "ansi" } + } + ] +} \ No newline at end of file diff --git a/config/macos/karabiner/karabiner.json b/config/macos/karabiner/karabiner.json index 52bcba2..9490271 100644 --- a/config/macos/karabiner/karabiner.json +++ b/config/macos/karabiner/karabiner.json @@ -26,6 +26,14 @@ { "from": { "key_code": "left_option" }, "to": [{ "key_code": "left_command" }] + }, + { + "from": { "key_code": "escape" }, + "to": [{ "key_code": "grave_accent_and_tilde" }] + }, + { + "from": { "key_code": "grave_accent_and_tilde" }, + "to": [{ "key_code": "escape" }] } ] } diff --git a/config/shared/ghostty/config b/config/shared/ghostty/config index 93c839a..9dc9b91 100644 --- a/config/shared/ghostty/config +++ b/config/shared/ghostty/config @@ -1,49 +1,42 @@ -theme = catppuccin-latte - # Terminal -term = "xterm-256color" +term = xterm-256color # Fonts -font-family = "JetBrains Mono NL" -font-size = 14 +font-family = "Maple Mono NF" +#font-size = 14 font-thicken = true - -# Cell width (affects letter spacing) -# adjust-cell-width = -1 -# adjust-cell-height = -1 -# adjust-font-baseline = -1 - -# Cursor -cursor-style-blink = false -cursor-style = block -shell-integration-features = no-cursor - -# Icon -# macos-icon = custom-style -# macos-icon-frame = plastic -# macos-icon-ghost-color = cba6f7 -# macos-icon-screen-color = 181825 +#font-thicken-strength = 2 +adjust-box-thickness = 2 # Window -#background = #181818 -#background = #000000 -#window-theme = dark -window-width = 100 -window-height = 26 -window-padding-x = 4 -window-padding-y = 2 -# window-colorspace = display-p3 -# macos-titlebar-style = native -#macos-titlebar-style = transparent +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 -# Resize by row -#window-step-resize = true -#window-padding-balance = true - -# Background -# background-opacity = 1 -# background-blur-radius = 0 +# Cursor +cursor-style = block +cursor-style-blink = false +mouse-hide-while-typing = true +shell-integration-features = no-cursor +# Font/Cell quality +window-colorspace = srgb +alpha-blending = linear-corrected +macos-titlebar-style = native +adjust-cell-width = -1 +#adjust-cell-height = -2 +# Theme +background = #eeeeee +foreground = #434343 +window-theme = auto +background-opacity = 1 +background-blur = false diff --git a/config/shared/zsh_config/keybindings b/config/shared/zsh_config/keybindings index b6a70ca..031c623 100644 --- a/config/shared/zsh_config/keybindings +++ b/config/shared/zsh_config/keybindings @@ -6,11 +6,10 @@ autoload -U down-line-or-beginning-search zle -N up-line-or-beginning-search zle -N down-line-or-beginning-search -# ----------------------------- -# Bind keys for history 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 + -- 2.45.2