Rename layout file, allow for layout to be specified by envar

This commit is contained in:
2023-03-24 15:45:42 -05:00
parent a1dd3a635a
commit baf106d5c9
2 changed files with 3 additions and 90 deletions

6
zshrc
View File

@ -107,9 +107,9 @@ if (( $+commands[zellij] )); then
eval "$(zellij setup --generate-auto-start zsh)"
ide() {
local layout="${HOME}/.config/zellij/layouts/ide.kdl"
local name=${PWD##*/}
local name=${name:-/}
local layout="${ZELLIJ_LAYOUT:-${HOME}/.config/zellij/layouts/project.kdl}"
local name="${PWD##*/}"
local name="${name:-/}"
if (( ${+ZELLIJ} )); then
zellij action new-tab --layout "${layout}" --cwd "${PWD}" --name "${name}"