fixed zellij layout script

This commit is contained in:
Nikolas Weger 2024-10-23 12:15:24 +02:00
parent e7322f20a9
commit 2eb1adeed6

View file

@ -3,6 +3,6 @@ set -euo pipefail
ZJ_LAYOUT_DIR=$(zellij setup --check | grep "LAYOUT DIR" - | grep -o '".*"' - | tr -d '"')
if [[ -d "${ZJ_LAYOUT_DIR}" ]]; then
ZJ_LAYOUT="$(fd --type file . "${ZJ_LAYOUT_DIR}" | sed 's|.*/||' | fzf || exit)"
ZJ_LAYOUT="$ZJ_LAYOUT_DIR/$(fd --type file . "${ZJ_LAYOUT_DIR}" | sed 's|.*/||' | fzf || exit)"
zellij --layout "${ZJ_LAYOUT}"
fi