Update tmux

pull/28/head
Alpha Chen 11 years ago
parent c0c8987ed3
commit 284d99bee8

@ -1,16 +1,11 @@
- hosts: all - hosts: dev
tasks:
- group_by: key={{ ansible_distribution }}
- hosts: MacOSX
gather_facts: false
tasks: tasks:
- name: install dependencies - name: install dependencies
homebrew: name={{ item }} state=present homebrew: name={{ item }} state=present
with_items: with_items:
- git - git
- stow - stow
- hosts: Debian - hosts: prgmr
gather_facts: false
tasks: tasks:
- name: install dependencies - name: install dependencies
apt: pkg={{ item }} state=present apt: pkg={{ item }} state=present
@ -18,17 +13,26 @@
- git - git
- stow - stow
- hosts: all - hosts: all
gather_facts: false
vars: vars:
stow_packages: stow_packages:
- git - git
- tmux - tmux
ln_packages:
tmux/.tmux.conf: .tmux.conf
tasks: tasks:
- name: clone dotfiles - name: clone/update dotfiles
git: repo=https://github.com/kejadlen/dotfiles.git dest=~/.dotfiles git: repo=https://github.com/kejadlen/dotfiles.git dest=~/.dotfiles
- shell: hash stow 2> /dev/null
register: stow_exists
ignore_errors: True
- name: stow files - name: stow files
command: chdir={{ ansible_env.HOME }}/.dotfiles stow --target={{ ansible_env.HOME }} --stow {{ item }} command: chdir={{ ansible_env.HOME }}/.dotfiles stow --target={{ ansible_env.HOME }} --stow {{ item }}
with_items: stow_packages with_items: stow_packages
when: stow_exists|success
- name: link files
command: ln -fs {{ ansible_env.HOME }}/.dotfiles/{{ item.key }} {{ ansible_env.HOME }}/{{ item.value }}
with_dict: ln_packages
when: stow_exists|failed
- name: link unstowable files - name: link unstowable files
file: src={{ ansible_env.HOME }}/.dotfiles/{{ item.key }} dest={{ ansible_env.HOME}}/{{ item.value }} state=link file: src={{ ansible_env.HOME }}/.dotfiles/{{ item.key }} dest={{ ansible_env.HOME}}/{{ item.value }} state=link
with_dict: with_dict:

@ -91,11 +91,11 @@ bind -r + resize-pane -U 3
bind -r = resize-pane -U 3 bind -r = resize-pane -U 3
if-shell "[[ `tmux -V` == *1.9 ]]" \ if-shell "[[ `tmux -V` == *1.9 ]]" \
"set-option -g renumber-windows on" \ "set-option -g renumber-windows on; \
"bind c new-window -c '#{pane_current_path}'" \ bind c new-window -c '#{pane_current_path}'; \
"bind C-c new-window -c '#{pane_current_path}'" \ bind C-c new-window -c '#{pane_current_path}'; \
"bind v split-window -h -c '#{pane_current_path}'" \ bind v split-window -h -c '#{pane_current_path}'; \
"bind s split-window -v -c '#{pane_current_path}'" bind s split-window -v -c '#{pane_current_path}';"
unbind r unbind r
bind r source-file ~/.tmux.conf \; display 'Reloaded tmux.conf' bind r source-file ~/.tmux.conf \; display 'Reloaded tmux.conf'

Loading…
Cancel
Save