From f34a495341e6b16de2dc9762c53021e1d4130ce2 Mon Sep 17 00:00:00 2001 From: holly sparkles Date: Wed, 24 Apr 2024 21:24:59 +0200 Subject: [PATCH] add zellij launcher --- .scripts/zellij-launcher.zsh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 .scripts/zellij-launcher.zsh 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 " + 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" -- libgit2 1.7.2