Remove custom zellij layouts; auto-rename new tabs to cwd
This commit is contained in:
@@ -1,20 +1,25 @@
|
||||
# zellij
|
||||
if (( $+commands[zellij] )); then
|
||||
# Uncomment to start zellij automatically
|
||||
# Uncomment to start/exit zellij automatically
|
||||
# ZELLIJ_AUTO_ATTACH=true
|
||||
# ZELLIJ_AUTO_EXIT=true
|
||||
# eval "$(zellij setup --generate-auto-start zsh)"
|
||||
|
||||
if (( $+commands[sk] )); then
|
||||
za() {
|
||||
function za {
|
||||
local zj_sessions=$(zellij list-sessions -ns)
|
||||
local no_sessions=$(echo "${zj_sessions}" | wc -l)
|
||||
|
||||
if [ "${no_sessions}" -ge 2 ]; then
|
||||
zellij attach \
|
||||
"$(echo "${zj_sessions}" | sk)"
|
||||
zellij attach \
|
||||
"$(echo "${zj_sessions}" | sk)"
|
||||
else
|
||||
zellij attach -c
|
||||
zellij attach -c
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
if [[ -v ZELLIJ ]]; then
|
||||
zellij action rename-tab "${PWD##*/}"
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user