Compare commits

..
14 Commits
Author SHA1 Message Date
Fabian IsingandClaude Opus 5.5 1eac402bb2 [RG][ZSH] Add ripgrep config skipping *venv dirs (non-shared only)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:49:37 +02:00
Fabian IsingandClaude Opus 5.5 6522f993e1 [ZSH][NVIM] Treat LC_OSC52=1 as personal
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:19:26 +02:00
Fabian IsingandClaude Opus 5.5 eff5309ae9 [setup] Ask whether this is a VM; install qemu-guest-agent
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:06:00 +02:00
Fabian IsingandClaude Opus 5.5 9951ecf7a4 [ZSH] Pin user@host title in sudo/su shells too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 11:47:14 +02:00
Fabian IsingandClaude Opus 5.5 e4f6b4b6ab [ZSH] Pin terminal title to user@host over ssh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 11:14:48 +02:00
Fabian Ising 327ce21440 [ZSH] Alias ln to safeln
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 93400d68ab)
2026-10-19 08:38:57 +02:00
Fabian IsingandClaude Opus 5.5 88049f8676 [ZSH][NVIM] Treat sudo from ising and fi545621 as personal
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:25:46 +02:00
Fabian IsingandClaude Opus 5.5 aed2f4c5df [ZSH] fzf history search on servers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:18:40 +02:00
Fabian IsingandClaude Opus 5.5 afd4b439c2 [ZSH] No blocking safe-wrapper prompts in agent shells
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 08:57:47 +02:00
Fabian IsingandClaude Opus 5.5 61ff4a8daa [ZSH] Remove duplicate plugins
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 08:57:15 +02:00
Fabian Ising a7a06cd75e [NVIM] Rework folding 2026-10-14 08:56:56 +02:00
Fabian Ising bf77e1486b [NVIM] Make update checker portable 2026-10-14 08:56:56 +02:00
Fabian Ising ee189b408b Fix comment handling in tex files 2026-10-14 08:56:56 +02:00
Fabian Ising c7569e48dc Fix delzip 2026-10-14 08:56:55 +02:00
10 changed files with 152 additions and 21 deletions

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
# Loaded via RIPGREP_CONFIG_PATH (zsh/.zshrc, non-shared only). Hidden dirs
# (.venv, .claude, .codex) are skipped by default. -uu doesn't undo the
# globs: use --no-config.
--smart-case
--glob=!*venv/
--glob=!node_modules/
--glob=!__pycache__/
+1 -1
View File
@@ -1,4 +1,4 @@
set formatoptions+=1rnmBa
setlocal formatoptions+=1rnmBj
" Reformat lines (getting the spacing correct) {{{
fun! TeX_fmt()
+14 -7
View File
@@ -1,7 +1,7 @@
set nocompatible
filetype off
if ((!filereadable(stdpath('config') . "/.shared_config")) || (exists('$SUDO_USER') && $SUDO_USER == 'fabian'))
if ((!filereadable(stdpath('config') . "/.shared_config")) || (index(['fabian', 'ising', 'fi545621'], $SUDO_USER) >= 0) || ($LC_OSC52 == '1'))
let shared_config = 0
else
let shared_config = 1
@@ -96,7 +96,14 @@ local function check_plugin_updates()
local concurrency = 2
local function git_command(args)
local command = { 'ionice', '-c', '3', 'nice', '-n', '10', 'git' }
local command = {}
if vim.fn.executable('ionice') == 1 then
vim.list_extend(command, { 'ionice', '-c', '3' })
end
if vim.fn.executable('nice') == 1 then
vim.list_extend(command, { 'nice', '-n', '10' })
end
table.insert(command, 'git')
vim.list_extend(command, args)
return command
end
@@ -371,16 +378,16 @@ let g:UltiSnipsEditSplit="vertical"
set rtp+=~/.config/nvim/my-snippets
" Folding
set foldmethod=syntax
set foldmethod=indent
set foldlevel=100
" Use F9 to toggle folding
" Use F9 or <Leader>z to toggle folding
inoremap <F9> <C-O>za
nnoremap <F9> za
onoremap <F9> <C-C>za
vnoremap <F9> zf
nnoremap <Leader>a za
onoremap <Leader>a <C-C>za
vnoremap <Leader>a zf
nnoremap <Leader>z za
onoremap <Leader>z <C-C>za
vnoremap <Leader>z zf
try
source ~/.config/nvim/.vimrc_config_expand_region
+1 -1
View File
@@ -8,7 +8,7 @@
sudo pacman --needed -Sy archlinux-keyring --noconfirm
sudo pacman --needed -Syu --noconfirm
sudo pacman --needed -Sy base-devel xorg xorg-xinit gnome gnome-extra neovim zsh tmux openssh alacritty powerline-fonts python-pip --noconfirm
sudo pacman --needed -Sy base-devel xorg xorg-xinit gnome gnome-extra neovim zsh tmux openssh alacritty powerline-fonts python-pip ripgrep --noconfirm
cp $PWD/nvim/scheme.vim.template $PWD/nvim/scheme.vim
cp $PWD/.config/alacritty/schemes.yml.template $PWD/.config/alacritty/schemes.yml
pip3 install neovim
+14 -1
View File
@@ -9,8 +9,21 @@ shopt -s nullglob
sudo apt -y update
sudo apt -y dist-upgrade
sudo apt -y install curl zsh tmux virtualenvwrapper powerline fonts-powerline python3 python3-pip python3-pynvim
sudo apt -y install curl zsh tmux virtualenvwrapper powerline fonts-powerline python3 python3-pip python3-pynvim fzf ripgrep
sudo snap install --classic nvim
# VMs: the guest agent lets the hypervisor read OS info (virsh guestinfo --os)
default=N; [[ $(systemd-detect-virt 2>/dev/null) == @(kvm|qemu) ]] && default=Y
read -r -p "Is this a VM? [$( [[ $default == Y ]] && echo Y/n || echo y/N )] " vm
if [[ ${vm:-$default} == [yY]* ]]; then
sudo apt -y install qemu-guest-agent
# Static unit, started by udev; it only runs if the VM defines the channel
if [[ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]]; then
sudo systemctl start qemu-guest-agent
else
echo "No guest agent channel: add org.qemu.guest_agent.0 to the VM definition" >&2
fi
fi
./clone_and_link.sh; true
if [ $SHELL != "/bin/zsh" ]; then
chsh -s /usr/bin/zsh;
+14 -1
View File
@@ -7,8 +7,21 @@
#
sudo apt -y update
sudo apt -y dist-upgrade
sudo apt -y install curl zsh tmux virtualenvwrapper powerline fonts-powerline python3 python3-pip python3-pynvim
sudo apt -y install curl zsh tmux virtualenvwrapper powerline fonts-powerline python3 python3-pip python3-pynvim fzf
sudo snap install --classic nvim
# VMs: the guest agent lets the hypervisor read OS info (virsh guestinfo --os)
default=N; [[ $(systemd-detect-virt 2>/dev/null) == (kvm|qemu) ]] && default=Y
read -r "vm?Is this a VM? [$( [[ $default == Y ]] && echo Y/n || echo y/N )] "
if [[ ${vm:-$default} == [yY]* ]]; then
sudo apt -y install qemu-guest-agent
# Static unit, started by udev; it only runs if the VM defines the channel
if [[ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]]; then
sudo systemctl start qemu-guest-agent
else
echo "No guest agent channel: add org.qemu.guest_agent.0 to the VM definition" >&2
fi
fi
./clone_and_link.sh shared; true
if [ $SHELL != "/bin/zsh" ]; then
chsh -s /usr/bin/zsh;
-2
View File
@@ -7,14 +7,12 @@ ohmyzsh/ohmyzsh path:plugins/ssh-agent
ohmyzsh/ohmyzsh path:plugins/pip
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/virtualenv
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/docker
ohmyzsh/ohmyzsh path:plugins/docker-compose
ohmyzsh/ohmyzsh path:plugins/command-not-found
romkatv/powerlevel10k
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-autosuggestions
zsh-users/zsh-completions
zsh-users/zsh-history-substring-search
-2
View File
@@ -6,14 +6,12 @@ ohmyzsh/ohmyzsh path:plugins/ssh-agent
ohmyzsh/ohmyzsh path:plugins/pip
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/virtualenv
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/docker
ohmyzsh/ohmyzsh path:plugins/docker-compose
ohmyzsh/ohmyzsh path:plugins/command-not-found
romkatv/powerlevel10k
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-completions
zsh-users/zsh-history-substring-search
urbainvaes/fzf-marks
+26 -4
View File
@@ -4,7 +4,7 @@ export XDG_CONFIG_HOME="$HOME/.config"
[[ -z $SSH_AUTH_SOCK ]] || export FORWARD_SOCK=$SSH_AUTH_SOCK
[[ -f ~/.zsh/.powerline_config ]] && source ~/.zsh/.powerline_config
if [[ -f ~/.zsh/.shared_config && "$SUDO_USER" != "fabian" ]]; then
if [[ -f ~/.zsh/.shared_config && "$SUDO_USER" != (fabian|ising|fi545621) && "$LC_OSC52" != "1" ]]; then
shared_config=1
else
shared_config=0
@@ -49,11 +49,33 @@ export SSH_REAL_SOCK=$SSH_AUTH_SOCK
source "${ZDOTDIR:-$HOME}/.zsh/lib/interactive.zsh"
# fzf keys (Ctrl-R/Ctrl-T/Alt-C, **<Tab>); after antidote, whose vi-mode rebinds ^R.
# --zsh needs fzf >= 0.48; older apt builds ship the scripts instead.
if (( $+commands[fzf] && ! shared_config )); then
if _fzf_init=$(fzf --zsh 2>/dev/null); then
eval "$_fzf_init"
else
for _fzf_init in /usr/share/doc/fzf/examples/{key-bindings,completion}.zsh; do
[[ -r $_fzf_init ]] && source $_fzf_init
done
fi
unset _fzf_init
fi
if (( ! shared_config )) && [[ -r ~/dotfiles/.config/ripgrep/config ]]; then
export RIPGREP_CONFIG_PATH=~/dotfiles/.config/ripgrep/config
fi
export LIBVIRT_DEFAULT_URI="qemu:///system"
if (( ! shared_config )); then
(( $+commands[safecp] )) && alias cp=safecp
(( $+commands[safemv] )) && alias mv=safemv
(( $+commands[safescp] )) && alias scp=safescp
# Agent shells: </dev/null makes the prompt decline (exit 1) instead of blocking.
if [[ -n ${CLAUDECODE:-} || -n ${CODEX_SHELL:-} ]]; then
_safe_redir=' </dev/null'
fi
(( $+commands[safecp] )) && alias cp="safecp${_safe_redir:-}"
(( $+commands[safemv] )) && alias mv="safemv${_safe_redir:-}"
(( $+commands[safeln] )) && alias ln="safeln${_safe_redir:-}"
(( $+commands[safescp] )) && alias scp="safescp${_safe_redir:-}"
unset _safe_redir
fi
[[ -f ~/.zsh/.mac_config ]] && source ~/.zsh/.mac_config
+75 -2
View File
@@ -21,10 +21,77 @@ alias ls='ls --color=always'
alias cgrep='grep --color=always'
alias cdiff='git diff --color-words --no-index'
# Remove the files an archive extracted into the current directory.
# Lists what it will delete and asks first; -f skips the prompt, -n dry-runs.
# Directories are only removed if they end up empty.
delzip() {
unzip -Z -1 "$@" | xargs -I{} rm -rf {}
emulate -L zsh
setopt local_options
local dry=0 force=0
while [[ $1 == -[nf] ]]; do
[[ $1 == -n ]] && dry=1 || force=1
shift
done
(( $# )) || { print -ru2 "usage: delzip [-n|-f] <archive.zip>..."; return 2 }
local zip entry parent
local -a entries files dirs
for zip in "$@"; do
[[ -f $zip ]] || { print -ru2 "delzip: no such file: $zip"; return 1 }
entries=("${(f)$(unzip -Z -1 -- $zip)}") || return 1
for entry in $entries; do
[[ -n $entry ]] || continue
# zip-slip guard: never touch anything outside the cwd
if [[ $entry == (/|~)* || $entry == (|*/)..(|/*) ]]; then
print -ru2 "delzip: refusing unsafe path: $entry"
return 1
fi
[[ $entry == */ ]] && dirs+=(${entry%/}) || files+=($entry)
# many archives omit directory entries, so infer them from the
# paths as well; unzip creates those dirs regardless
parent=${entry%/}
while [[ $parent == */* ]]; do
parent=${parent%/*}
dirs+=($parent)
done
done
done
dirs=(${(u)dirs})
# only keep what is actually on disk, so the list reflects reality;
# -L catches broken symlinks, which -e alone misses
local -a present
present=(); for entry in $files; do [[ -e $entry || -L $entry ]] && present+=($entry); done
files=($present)
present=(); for entry in $dirs; do [[ -d $entry ]] && present+=($entry); done
dirs=($present)
(( $#files + $#dirs )) || { print -ru2 "delzip: nothing to remove here (already gone?)"; return 1 }
if (( dry )); then
print -rl -- ${files} ${(O)dirs}
return 0
fi
if (( ! force )); then
[[ -t 0 ]] || { print -ru2 "delzip: not a terminal, use -f to skip the prompt"; return 1 }
print -r -- "delzip: remove ${#files} file(s) under ${PWD}:"
print -rl -- " "${^files[1,20]}
(( $#files > 20 )) && print -r -- " ... and $(( $#files - 20 )) more"
(( $#dirs )) && print -r -- "plus ${#dirs} directory/ies, if they end up empty."
read -q "?Proceed? [y/N] " || { print -r -- $'\naborted'; return 1 }
print
fi
(( $#files )) && rm -f -- $files
# deepest first, so parents can empty out; rmdir refuses non-empty dirs
for entry in ${(O)dirs}; do
[[ -d $entry ]] && rmdir -- $entry 2>/dev/null
done
return 0
}
export MITMPROXY_SSLKEYLOGFILE='~/.mitmproxy/sslkeylogfile.txt'
export MITMPROXY_SSLKEYLOGFILE="$HOME/.mitmproxy/sslkeylogfile.txt"
unset ZSH_AUTOSUGGEST_USE_ASYNC
export LANG='en_US.UTF-8'
@@ -41,3 +108,9 @@ pastefinish() {
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(bracketed-paste)
# Pin the terminal title to user@host (no cwd, no running command): the local
# tmux labels ssh panes with it (see main's .tmux.conf). Unconditional, as
# sudo -s/su drop $SSH_CONNECTION.
ZSH_THEME_TERM_TITLE_IDLE='%n@%m'
add-zsh-hook -d preexec omz_termsupport_preexec