save point
This commit is contained in:
parent
795f72db03
commit
d60d417579
9 changed files with 48 additions and 1 deletions
20
modules/zellij.bash
Normal file
20
modules/zellij.bash
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
config="main" # default config
|
||||
export ZELLIJ_CONFIG="$config"
|
||||
|
||||
# Function to check if zellij is installed
|
||||
is_zellij_installed() {
|
||||
if ! command -v zellij &> /dev/null
|
||||
then
|
||||
echo "This module needs zellij to be installed."
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
is_zellij_installed
|
||||
|
||||
# check if a session is already running
|
||||
if pgrep -x "zellij" > /dev/null
|
||||
then
|
||||
zellij attach "$config"
|
Loading…
Add table
Add a link
Reference in a new issue