Merge branch 'master' of https://git.101010.fr/gardouille-dotfiles/tmux
This commit is contained in:
commit
699690deac
|
@ -1,30 +1,51 @@
|
||||||
#### Session --------------------------------------------------------------
|
### Session --------------------------------------------------------------
|
||||||
# -sX : numéro de la session
|
# -sXX : XX session ID or name
|
||||||
# -nNOM_TERMINAL : nom du terminal
|
# -nWINDOW_NAME : Name of the window…
|
||||||
# -d : indique à tmux de ne pas attacher la session et de ne pas prendre les
|
# -d : Don't attache to the new session/window/pane/…
|
||||||
# nouvelles fenêtres comme une fenêtre courante
|
# -tXX:YY.ZZ :
|
||||||
# -tX:Y : modifier les paramètres de la fenêtre Y de la session X. !Attention
|
# XX : session ID or name
|
||||||
# la fenêtre doit exister avant de pouvoir modifier ses paramètres!
|
# YY : (optional) Window ID
|
||||||
|
# ZZ : (optional) Pane ID
|
||||||
|
# YY and ZZ should exists to be able to change the parameters,…
|
||||||
# monitor-activity : permet de mettre en avant une fenêtre quand son contenu reçoit un événement
|
# monitor-activity : permet de mettre en avant une fenêtre quand son contenu reçoit un événement
|
||||||
# 'exec ${SHELL}' : Allow to keep the pane running after the program exists
|
# 'exec ${SHELL}' : Allow to keep the pane running after the program exists
|
||||||
|
|
||||||
# New session for working station
|
# Manage session named **jd** for working station
|
||||||
|
|
||||||
# New session with a first window with 2 panes in 42 debops project
|
# If a session already exists {{{
|
||||||
new -A -sjd -n42
|
if-shell -b 'tmux has-session -t jd' {
|
||||||
splitw -h -t1 -c '/home/jegardai/repos/101010.debops'
|
display-message "Attach to **jd** existing session"
|
||||||
select-pane -t 1
|
## Attach to the first pane of the first window
|
||||||
# Second window with 2 panes in IPR debops project
|
attach-session -t jd:1.1
|
||||||
neww -d -nIPR -c '/home/jegardai/repos/ipr.debops'
|
}
|
||||||
select-window -t 2
|
# }}}
|
||||||
splitw -h -c '/home/jegardai/repos/ipr.debops'
|
# If no session already exists
|
||||||
select-pane -t 1
|
if-shell '! tmux has-session -t jd' {
|
||||||
|
display-message "Create a new session for Workstation"
|
||||||
|
# A first window named **42**
|
||||||
|
new-session -A -sjd -n42
|
||||||
|
## Split the first window and move to 42 debops project
|
||||||
|
split-window -d -h -tjd:1.1 -c '/home/jegardai/repos/101010.debops'
|
||||||
|
## Split again the first window and move to 42 debops project
|
||||||
|
split-window -v -tjd:1.1 -c '/home/jegardai/repos/101010.debops'
|
||||||
|
# Kill first pane of the first window
|
||||||
|
# Little trick to avoid to set this directory as default for any new pane…
|
||||||
|
kill-pane -tjd:1.1
|
||||||
|
|
||||||
|
# Second window named **IPR**
|
||||||
|
new-window -d -nIPR -c '/home/jegardai/repos/ipr.debops'
|
||||||
|
# with 2 panes in IPR debops project
|
||||||
|
split-window -d -h -tjd:2.1 -c '/home/jegardai/repos/ipr.debops'
|
||||||
# Third window in home
|
# Third window in home
|
||||||
#neww -d -c '/home/jegardai/'
|
#new-window -d
|
||||||
|
|
||||||
# Default window: jd:0
|
# Default window should be jd:1
|
||||||
select-window -t 1
|
#select-window -t 1
|
||||||
select-pane -t 1
|
# Default pane should be jd:1.1
|
||||||
|
}
|
||||||
# Kill default created session
|
# If a default session still exists {{{
|
||||||
|
if-shell -b 'tmux has-session -t 0' {
|
||||||
|
# Kill it
|
||||||
kill-session -t 0
|
kill-session -t 0
|
||||||
|
}
|
||||||
|
# }}}
|
||||||
|
|
|
@ -243,7 +243,7 @@ set -g lock-after-time 1800
|
||||||
if 'command -v cmatrix' 'set -g lock-command "cmatrix -s && physlock"' 'set -g lock-command physlock'
|
if 'command -v cmatrix' 'set -g lock-command "cmatrix -s && physlock"' 'set -g lock-command physlock'
|
||||||
|
|
||||||
# Initialize sessions
|
# Initialize sessions
|
||||||
bind I source-file ~/.tmux/splitWORKSTATION\; display-message "tmux split for Work"
|
bind I source-file ~/.tmux/splitWORKSTATION
|
||||||
bind V source-file ~/.tmux/split101010\; display-message "tmux split for 101010"
|
bind V source-file ~/.tmux/split101010\; display-message "tmux split for 101010"
|
||||||
|
|
||||||
### }}}
|
### }}}
|
||||||
|
|
Loading…
Reference in New Issue