#!/usr/bin/env zsh ZELLIJ_LAYOUT_DIR="$HOME/.config/zellij" # check required args if [[ $# -ne 2 ]]; then echo "Usage: $0 " exit 1 fi target_dir="$1" layout="$2" # exit if target doesnt exist cd "$target_dir" || exit # required to make sure path loads. without this, nothing works. sleep 0.3 zellij --layout "${ZELLIJ_LAYOUT_DIR}/${layout}.kdl"