28 lines
513 B
Bash
Executable File
28 lines
513 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
select_action() {
|
|
action_content=(
|
|
"local"
|
|
"zion"
|
|
"hpc"
|
|
"kermit-gpu"
|
|
)
|
|
action=$(printf '%s\n' "${action_content[@]}" | rofi -no-auto-select -i "$@" -dmenu -p "Choose a session")
|
|
execute_action "$action"
|
|
}
|
|
|
|
launch_session() {
|
|
bash -c "tmuxp load ~/.tmuxp/$1.yaml"
|
|
}
|
|
|
|
execute_action() {
|
|
case "$1" in
|
|
"local") launch_session "local" ;;
|
|
"zion") launch_session "zion" ;;
|
|
"hpc") launch_session "hpc" ;;
|
|
"kermit-gpu") launch_session "kermit-gpu" ;;
|
|
esac
|
|
}
|
|
|
|
select_action "$@"
|