2014-08-31 23:59:02 +02:00
|
|
|
|
#### Session --------------------------------------------------------------
|
|
|
|
|
# -sX : numéro de la session
|
|
|
|
|
# -nNOM_TERMINAL : nom du terminal
|
|
|
|
|
# -d : indique à tmux de ne pas attacher la session et de ne pas prendre les
|
|
|
|
|
# nouvelles fenêtres comme une fenêtre courante
|
2022-12-12 12:06:13 +01:00
|
|
|
|
# -tX:Y : modifier les paramètres de la fenêtre Y de la session X. !Attention
|
2014-08-31 23:59:02 +02:00
|
|
|
|
# la fenêtre doit exister avant de pouvoir modifier ses paramètres!
|
|
|
|
|
# monitor-activity : permet de mettre en avant une fenêtre quand son contenu reçoit un événement
|
2022-12-12 12:06:13 +01:00
|
|
|
|
# 'exec ${SHELL}' : Allow to keep the pane running after the program exists
|
2014-08-31 23:59:02 +02:00
|
|
|
|
|
2022-12-12 12:06:13 +01:00
|
|
|
|
# New session for work
|
2014-09-08 10:12:58 +02:00
|
|
|
|
|
2022-12-12 12:06:13 +01:00
|
|
|
|
# Manage session named **IPR** for work
|
2016-02-17 09:46:04 +01:00
|
|
|
|
|
2022-12-12 12:06:13 +01:00
|
|
|
|
# If a session already exists {{{
|
|
|
|
|
if-shell -b 'tmux has-session -t IPR' {
|
2022-12-21 11:39:57 +01:00
|
|
|
|
# If file was source from a running tmux
|
|
|
|
|
#if-shell -b 'test -n $TMUX' {
|
2022-12-12 12:06:13 +01:00
|
|
|
|
display-message "Attach to **IPR** existing session"
|
|
|
|
|
## Attach to the first pane of the first window
|
|
|
|
|
attach-session -t IPR:1.1
|
2022-12-21 11:39:57 +01:00
|
|
|
|
#}
|
2022-12-12 12:06:13 +01:00
|
|
|
|
}
|
|
|
|
|
# }}}
|
|
|
|
|
|
2022-12-21 11:39:57 +01:00
|
|
|
|
# If file was source from a running tmux
|
|
|
|
|
# This allow to run tmux source-file command outside of Tmux…
|
|
|
|
|
if-shell -b 'test -n $TMUX' {
|
|
|
|
|
# If no session already exists
|
|
|
|
|
if-shell '! tmux has-session -t IPR' {
|
|
|
|
|
display-message "Create a new session for Work"
|
|
|
|
|
# A first window named **DeLL**
|
|
|
|
|
new-session -A -sIPR -nDeLL
|
2022-12-12 12:06:13 +01:00
|
|
|
|
|
2022-12-21 11:39:57 +01:00
|
|
|
|
# Second window named **Ceph**
|
|
|
|
|
new-window -d -nCeph
|
2022-12-12 12:06:13 +01:00
|
|
|
|
|
2023-08-11 08:03:00 +02:00
|
|
|
|
# Third window named **cProx**
|
|
|
|
|
new-window -d -ncProx
|
2022-12-21 11:39:57 +01:00
|
|
|
|
|
|
|
|
|
# Default pane should be IPR:1.1
|
|
|
|
|
#select-pane -tIPR:1.1
|
|
|
|
|
}
|
2022-12-12 12:06:13 +01:00
|
|
|
|
}
|