20 lines
401 B
Bash
20 lines
401 B
Bash
#!/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"
|