index : dotfiles.git

ascending towards madness

author holly sparkles <sparkles@holly.sh> 2024-04-24 19:24:59.0 +00:00:00
committer holly sparkles <sparkles@holly.sh> 2024-04-24 19:24:59.0 +00:00:00
commit
f34a495341e6b16de2dc9762c53021e1d4130ce2 [patch]
tree
dd0a38066870b52f7d21eaed8daaf08e8b9099f7
parent
83302d8bd99fc943edea84b2d49b757675245bea
download
f34a495341e6b16de2dc9762c53021e1d4130ce2.tar.gz

add zellij launcher



Diff

 .scripts/zellij-launcher.zsh | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/.scripts/zellij-launcher.zsh b/.scripts/zellij-launcher.zsh
new file mode 100755
index 0000000..446ae19
--- /dev/null
+++ b/.scripts/zellij-launcher.zsh
@@ -0,0 +1,20 @@
#!/usr/bin/env zsh

ZELLIJ_LAYOUT_DIR="$HOME/.config/zellij"

# check required args
if [[ $# -ne 2 ]]; then
    echo "Usage: $0 <path> <layout>"
    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"