Skip to content

Instantly share code, notes, and snippets.

@benwtks
Created February 20, 2020 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benwtks/97438a84405d34e84d3c201ab2f3c16c to your computer and use it in GitHub Desktop.
Save benwtks/97438a84405d34e84d3c201ab2f3c16c to your computer and use it in GitHub Desktop.
Tmux scripts
#!/bin/bash
cd ~/blog
tmux new -s Blog -d
tmux send-keys -t Blog 'git s' C-m
tmux rename-window -t Blog Zsh
tmux new-window -t Blog
tmux send-keys -t Blog 'vim' C-m
tmux rename-window -t Blog Vim
tmux new-window -t Blog
tmux send-keys -t Blog 'bundle exec jekyll serve' C-m
tmux rename-window -t Blog Server
tmux select-window -t Blog:1
tmux attach -t Blog
#!/bin/bash
cd $1
tmux new -s Development -d
tmux new-window -t Development
tmux send-keys -t Development 'vim' C-m
tmux new-window -t Development
tmux select-window -t Development:1
session=$(echo $(basename "$PWD") | sed -e "s/\b\(.\)/\u\1/g" | tr "-" " ")
tmux rename-session -t Development "$session"
tmux attach -t "$session"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment