Skip to content

Instantly share code, notes, and snippets.

@tastywheat
Created May 7, 2019 11:11
Show Gist options
  • Save tastywheat/1480811a704fd58c73c6282ceb0a731a to your computer and use it in GitHub Desktop.
Save tastywheat/1480811a704fd58c73c6282ceb0a731a to your computer and use it in GitHub Desktop.
tmux start up script
#!/bin/bash
# create session in background, name the session "first"
tmux new-session -d
# echo something
tmux send-keys "echo 'woot woot'" C-m
# name the window "foo"
tmux rename-window "foo"
# split the pane vertically, at 70% top, 30% bottom
tmux split-window -v -p 30
# split the pane horizontally
tmux split-window -h
### window 1
# create new window
tmux new-window
# name the window "bar"
tmux rename-window "bar"
# split the pane vertically
tmux split-window -v -p 30
# split the pane horizontally
tmux split-window -h
tmux send-keys "ls" C-m
# connect to session
tmux attach-session -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment