Git push test
This commit is contained in:
parent
d60d417579
commit
77dece5c9c
5 changed files with 67 additions and 12 deletions
|
@ -8,4 +8,8 @@ One uses JQ the other awk,grep and sed. They basically achieve the same thing th
|
|||
|
||||
# Where did the name come from?
|
||||
|
||||
Well, one day I was watching a youtube video about a new type of scam that was discovered by the youtuber Pleasent Green. Which dealt with becoming a reseller / middle man for a fictiious herb called lactozora. I basically just stole the name.
|
||||
Well, one day I was watching a youtube video about a new type of scam that was discovered by the youtuber Pleasent Green. Which dealt with becoming a reseller / middle man for a fictiious herb called lactozora. I basically just stole the name.
|
||||
|
||||
# Push test
|
||||
|
||||
Ignore this block its for testing a new git setup
|
||||
|
|
0
config.json
Normal file → Executable file
0
config.json
Normal file → Executable file
0
modules/gui.bash
Normal file → Executable file
0
modules/gui.bash
Normal file → Executable file
|
@ -65,6 +65,6 @@ check_redis_cli
|
|||
|
||||
# Code goes here
|
||||
|
||||
redis_save "bashini" "new"
|
||||
redis_get "bashini"
|
||||
#redis_save "bashini" "new"
|
||||
#redis_get "bashini"
|
||||
|
||||
|
|
69
modules/zellij.bash
Normal file → Executable file
69
modules/zellij.bash
Normal file → Executable file
|
@ -1,20 +1,71 @@
|
|||
#!/bin/bash
|
||||
|
||||
config="main" # default config
|
||||
# Default configuration
|
||||
config="main"
|
||||
export ZELLIJ_CONFIG="$config"
|
||||
|
||||
# Function to check if zellij is installed
|
||||
is_zellij_installed() {
|
||||
if ! command -v zellij &> /dev/null
|
||||
then
|
||||
if ! command -v zellij &> /dev/null; then
|
||||
echo "This module needs zellij to be installed."
|
||||
exit
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
is_zellij_installed
|
||||
# Function to check if a session is running
|
||||
is_session_running() {
|
||||
if pgrep -x "zellij" > /dev/null; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# check if a session is already running
|
||||
if pgrep -x "zellij" > /dev/null
|
||||
then
|
||||
zellij attach "$config"
|
||||
# Function to list all zellij sessions
|
||||
list_sessions() {
|
||||
zellij list-sessions
|
||||
}
|
||||
|
||||
# Function to create a new session
|
||||
create_session() {
|
||||
local session_name="${1:-$config}"
|
||||
zellij -s "$session_name"
|
||||
}
|
||||
|
||||
# Function to attach to a session
|
||||
attach_session() {
|
||||
local session_name="${1:-$config}"
|
||||
zellij attach "$session_name"
|
||||
}
|
||||
|
||||
# Function to kill a session
|
||||
kill_session() {
|
||||
local session_name="${1:-$config}"
|
||||
zellij kill-session "$session_name"
|
||||
}
|
||||
|
||||
# Function to load a layout
|
||||
load_layout() {
|
||||
local layout_name="$1"
|
||||
if [ -z "$layout_name" ]; then
|
||||
echo "Please specify a layout name."
|
||||
return 1
|
||||
fi
|
||||
zellij --layout "$layout_name"
|
||||
}
|
||||
|
||||
# Main function to handle session management
|
||||
zellij_main() {
|
||||
is_zellij_installed
|
||||
|
||||
if is_session_running; then
|
||||
attach_session
|
||||
else
|
||||
create_session
|
||||
fi
|
||||
}
|
||||
|
||||
# Execute main function if script is run directly
|
||||
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
||||
zellij_main
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue