28 lines
498 B
Bash
Executable File
28 lines
498 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
select_action() {
|
|
action_content=(
|
|
"local"
|
|
"zion"
|
|
"hpc"
|
|
"idlab"
|
|
)
|
|
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" ;;
|
|
"idlab") launch_session "idlab" ;;
|
|
esac
|
|
}
|
|
|
|
select_action "$@"
|