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' {
|
|
|
|
|
display-message "Attach to **IPR** existing session"
|
|
|
|
|
## Attach to the first pane of the first window
|
|
|
|
|
attach-session -t IPR:1.1
|
|
|
|
|
}
|
|
|
|
|
# }}}
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
# Second window named **Ceph**
|
|
|
|
|
new-window -d -nCeph
|
|
|
|
|
|
|
|
|
|
# Third window named **Prox7**
|
|
|
|
|
new-window -d -nProx7
|
|
|
|
|
|
|
|
|
|
# Default window should be jd:1
|
|
|
|
|
#select-window -t 1
|
|
|
|
|
# Default pane should be jd:1.1
|
|
|
|
|
}
|