dotfiles/zsh.d/zellij.zsh

19 lines
503 B
Bash
Raw Normal View History

# zellij
if (( $+commands[zellij] )); then
ZELLIJ_AUTO_ATTACH=true
eval "$(zellij setup --generate-auto-start zsh)"
ide() {
local layout="${ZELLIJ_LAYOUT:-${HOME}/.config/zellij/layouts/project.kdl}"
local name="${PWD##*/}"
local name="${name:-/}"
if (( ${+ZELLIJ} )); then
# FIXME: https://github.com/zellij-org/zellij/issues/2299
zellij action new-tab --layout "${layout}" --cwd "${PWD}" --name "${name}"
else
zellij --layout "${layout}" $@
fi
}
fi