Compare commits

..

2 Commits

Author SHA1 Message Date
3ec45a7082 zshrc: don't auto update 2026-04-17 16:42:53 +02:00
0fe2b5ab9a zellij: fix stale ssh env, auto tab names, hx scrollback 2026-04-17 16:42:28 +02:00
3 changed files with 19 additions and 13 deletions

View File

@@ -41,6 +41,11 @@ t() {
tmux new-session -A -s ${1:-tmux}
}
z() {
# if remote, link agent so a stale zellij env doesn't hurt agent
if [[ $SSH_AUTH_SOCK =~ ^"/tmp/ssh-" ]]; then
ln -sf $SSH_AUTH_SOCK /tmp/agent.sock
export SSH_AUTH_SOCK=/tmp/agent.sock
fi
zellij attach ${1:-$HOST} 2> /dev/null || zellij -s ${1:-$HOST}
}

View File

@@ -2,23 +2,12 @@ export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="afowler"
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
plugins=(git colored-man-pages rust ssh-agent)
zstyle :omz:plugins:ssh-agent helper sshaskpass
zstyle :omz:update mode disabled
bindkey ^F forward-word
bindkey ^B backward-word
@@ -29,3 +18,15 @@ source $ZSH/oh-my-zsh.sh
[ -f ~/.shellrc.alias ] && source ~/.shellrc.alias
[ -f ~/.shellrc.local ] && source ~/.shellrc.local
function set_zellij_tab_to_working_dir() {
local current_dir=$PWD
if [[ $current_dir == $HOME ]]; then
current_dir="~"
else
current_dir=${current_dir##*/}
fi
command nohup zellij action rename-tab $current_dir >/dev/null 2>&1
}
[[ -n $ZELLIJ ]] && add-zsh-hook precmd set_zellij_tab_to_working_dir

View File

@@ -403,7 +403,7 @@ default_layout "compact"
// Path to the default editor to use to edit pane scrollbuffer
// Default: $EDITOR or $VISUAL
// scrollback_editor "/usr/bin/vim"
scrollback_editor "hx"
// A fixed name to always give the Zellij session.
// Consider also setting `attach_to_session true,`