added two scripts for zellij

This commit is contained in:
eeleater 2024-09-27 19:01:08 +02:00
parent 9d21258b7b
commit fd47b9e969
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
ZJ_SESSIONS=$(zellij list-sessions)
NO_SESSIONS=$(echo "${ZJ_SESSIONS}" | wc -l)
if [ "${NO_SESSIONS}" -ge 2 ]; then
zellij attach \
"$(echo "${ZJ_SESSIONS}" | fzf)"
else
zellij attach -c
fi