Skip to content

Instantly share code, notes, and snippets.

@changemewtf
Created May 8, 2014 19:09
Show Gist options
  • Save changemewtf/daaf02b5beeb2ac03efa to your computer and use it in GitHub Desktop.
Save changemewtf/daaf02b5beeb2ac03efa to your computer and use it in GitHub Desktop.
baffling tmux titles
### ~/.tmux.conf ###
set-option -g default-command "tmux rename-window bash; reattach-to-user-namespace -l bash"
### ~/bin/tmux-project ###
#!/bin/bash
export SESSION=$(basename $PWD)
# set window title
echo -ne "\033]0;${SESSION}\007"
tmux new-session -s $SESSION \; source-file ~/.common-public/sh/.tmux-project.tmux
### ~/.common-public/sh/.tmux-project.tmux ###
unbind-key q
bind-key q send-keys -t lib ":Q" C-m \; kill-session
set-window-option -g automatic-rename off
rename-window git
send-keys "git status" C-m
new-window -n lib
send-keys "if [ -e .session.vim ]; then vim -S .session.vim; else vim; fi" C-m
new-window -n bash
select-window -t git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment