first
This commit is contained in:
commit
e65ba78cc8
22
zellij_ps.fish
Executable file
22
zellij_ps.fish
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env fish
|
||||
# This is a small zellij project switcher
|
||||
#
|
||||
# Please add additiones folders to the folders variable
|
||||
|
||||
set folders ~/projects ~/Projekte
|
||||
|
||||
if count $argv > 1
|
||||
set selected $argv[1]
|
||||
else
|
||||
set selected (fd --type d --max-depth 1 . $folders | fzf)
|
||||
end
|
||||
|
||||
set selected_name (basename "$selected" | tr . _)
|
||||
set zellij_running (pgrep -c zellij)
|
||||
|
||||
if test -n "$ZELLIJ_SESSION_NAME"
|
||||
echo -e "You are in a Zellij Session!\nPlease use the session manager to switch sessions.">&2
|
||||
else
|
||||
cd $selected; zellij --layout prog attach -c $selected_name options
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user