mirror of
https://github.com/pnx/dotfiles
synced 2026-06-17 11:30:02 +02:00
adding new tmux session scripts
This commit is contained in:
parent
891ce58272
commit
06293d3a17
6 changed files with 42 additions and 14 deletions
20
scripts/tmuxs/main.sh
Executable file
20
scripts/tmuxs/main.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
BASE_PATH=$(dirname $(readlink -f $BASH_SOURCE))
|
||||
source ${BASE_PATH}/.env
|
||||
|
||||
# Scripts
|
||||
LIST_SESSIONS_SCRIPT=${BASE_PATH}/list-sessions.sh
|
||||
KILL_SCRIPT=${BASE_PATH}/kill.sh
|
||||
|
||||
|
||||
if [[ $# -eq 1 ]]; then
|
||||
if [[ "$1" == "-a" ]]; then
|
||||
selected=$($LIST_SESSIONS_SCRIPT | $FZF --bind "ctrl-d:execute(${KILL_SCRIPT} {})+reload(${LIST_SESSIONS_SCRIPT})" --border-label=Session | sed 's/: .*//g')
|
||||
${BASE_PATH}/new.sh $selected
|
||||
else
|
||||
${BASE_PATH}/new.sh $(realpath $1)
|
||||
fi
|
||||
else
|
||||
${BASE_PATH}/new.sh
|
||||
fi
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue