codio / boxparts

Simple package manager
https://codio.com
Other
29 stars 26 forks source link

tmux default config #217

Open ksimuk opened 9 years ago

ksimuk commented 9 years ago

create default tmux config and start tmux session automatically if tmux installed

jondkinney commented 9 years ago

You should be able to have tmux auto started for you by adding the following to your ~/.bash_profile or, in my case, ~/.zshrc (you should really check out zsh if you haven't yet!).

case $- in *i*)
  if [ -z "$TMUX" ]; then
    exec tmux;
  fi
esac

If you add a tmux config file at ~/.tmux.config, then tmux will load that when it launches. Here's an example one that I use - https://gist.github.com/jondkinney/2040114#file-tmux-conf

If you want to load specific layouts within multiple windows, then I'd recommend checking out the tmuxinator ruby gem here: https://github.com/tmuxinator/tmuxinator. If you get going with tmuxinator then you'd need to change the command in the above code snippet from exec tmux; to exec tmuxinator start project_name_here;.

PS to get zsh working on codio - see here http://forum.codio.com/t/zsh-terminal-shell/780/4 and here http://www.fluidbyte.net/quickly-setup-oh-my-zsh-on-codio/

Cheers!

fmay commented 9 years ago

Thanks @jondkinney you've saved me some painful research. And thanks for the zsh links. Been meaning to add something to the Docs on that.

jondkinney commented 9 years ago

No prob @fmay! ...now can you add my vim box part?!? :tongue: JK... but seriously, if you could that'd be awesome.