Compare commits
9
Commits
61ff4a8daa
...
server
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1eac402bb2 | ||
|
|
6522f993e1 | ||
|
|
eff5309ae9 | ||
|
|
9951ecf7a4 | ||
|
|
e4f6b4b6ab | ||
|
|
327ce21440 | ||
|
|
88049f8676 | ||
|
|
aed2f4c5df | ||
|
|
afd4b439c2 |
No files matched your search
@@ -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
@@ -1,7 +1,7 @@
|
|||||||
set nocompatible
|
set nocompatible
|
||||||
filetype off
|
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
|
let shared_config = 0
|
||||||
else
|
else
|
||||||
let shared_config = 1
|
let shared_config = 1
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
sudo pacman --needed -Sy archlinux-keyring --noconfirm
|
sudo pacman --needed -Sy archlinux-keyring --noconfirm
|
||||||
sudo pacman --needed -Syu --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/nvim/scheme.vim.template $PWD/nvim/scheme.vim
|
||||||
cp $PWD/.config/alacritty/schemes.yml.template $PWD/.config/alacritty/schemes.yml
|
cp $PWD/.config/alacritty/schemes.yml.template $PWD/.config/alacritty/schemes.yml
|
||||||
pip3 install neovim
|
pip3 install neovim
|
||||||
|
|||||||
+14
-1
@@ -9,8 +9,21 @@ shopt -s nullglob
|
|||||||
|
|
||||||
sudo apt -y update
|
sudo apt -y update
|
||||||
sudo apt -y dist-upgrade
|
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
|
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
|
./clone_and_link.sh; true
|
||||||
if [ $SHELL != "/bin/zsh" ]; then
|
if [ $SHELL != "/bin/zsh" ]; then
|
||||||
chsh -s /usr/bin/zsh;
|
chsh -s /usr/bin/zsh;
|
||||||
|
|||||||
+14
-1
@@ -7,8 +7,21 @@
|
|||||||
#
|
#
|
||||||
sudo apt -y update
|
sudo apt -y update
|
||||||
sudo apt -y dist-upgrade
|
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
|
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
|
./clone_and_link.sh shared; true
|
||||||
if [ $SHELL != "/bin/zsh" ]; then
|
if [ $SHELL != "/bin/zsh" ]; then
|
||||||
chsh -s /usr/bin/zsh;
|
chsh -s /usr/bin/zsh;
|
||||||
|
|||||||
+26
-4
@@ -4,7 +4,7 @@ export XDG_CONFIG_HOME="$HOME/.config"
|
|||||||
[[ -z $SSH_AUTH_SOCK ]] || export FORWARD_SOCK=$SSH_AUTH_SOCK
|
[[ -z $SSH_AUTH_SOCK ]] || export FORWARD_SOCK=$SSH_AUTH_SOCK
|
||||||
[[ -f ~/.zsh/.powerline_config ]] && source ~/.zsh/.powerline_config
|
[[ -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
|
shared_config=1
|
||||||
else
|
else
|
||||||
shared_config=0
|
shared_config=0
|
||||||
@@ -49,11 +49,33 @@ export SSH_REAL_SOCK=$SSH_AUTH_SOCK
|
|||||||
|
|
||||||
source "${ZDOTDIR:-$HOME}/.zsh/lib/interactive.zsh"
|
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"
|
export LIBVIRT_DEFAULT_URI="qemu:///system"
|
||||||
if (( ! shared_config )); then
|
if (( ! shared_config )); then
|
||||||
(( $+commands[safecp] )) && alias cp=safecp
|
# Agent shells: </dev/null makes the prompt decline (exit 1) instead of blocking.
|
||||||
(( $+commands[safemv] )) && alias mv=safemv
|
if [[ -n ${CLAUDECODE:-} || -n ${CODEX_SHELL:-} ]]; then
|
||||||
(( $+commands[safescp] )) && alias scp=safescp
|
_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
|
fi
|
||||||
|
|
||||||
[[ -f ~/.zsh/.mac_config ]] && source ~/.zsh/.mac_config
|
[[ -f ~/.zsh/.mac_config ]] && source ~/.zsh/.mac_config
|
||||||
|
|||||||
@@ -108,3 +108,9 @@ pastefinish() {
|
|||||||
zstyle :bracketed-paste-magic paste-init pasteinit
|
zstyle :bracketed-paste-magic paste-init pasteinit
|
||||||
zstyle :bracketed-paste-magic paste-finish pastefinish
|
zstyle :bracketed-paste-magic paste-finish pastefinish
|
||||||
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(bracketed-paste)
|
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
|
||||||
Reference in new issue
Block a user