Skip to content

Instantly share code, notes, and snippets.

@franhb
Last active November 30, 2016 10:40
Show Gist options
  • Select an option

  • Save franhb/ed6718e2ea6c31bc574100d4c30a6f79 to your computer and use it in GitHub Desktop.

Select an option

Save franhb/ed6718e2ea6c31bc574100d4c30a6f79 to your computer and use it in GitHub Desktop.
Script de inicio de tmux
#!/usr/bin/env bash
SESSION_NAME="sesion"
tmux has-session -t $SESSION_NAME 2>/dev/null
if [ "$?" -eq 1 ] ; then
tmux new-session -d -s $SESSION_NAME
tmux send-keys -t $SESSION_NAME:0 "cd /ruta1" C-m
# divide la pantalla en dos panele horizontales
tmux split-window -v
# redimensiona el panel 15 unidades hacia arriba
tmux resize-pane -U 15
tmux send-keys -t $SESSION_NAME:0 "cd /ruta2/logs" C-m
fi
tmux attach-session -t $SESSION_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment