From 85ea42768ee77cb3ad72e0c2c39cdc3fb18dfd10 Mon Sep 17 00:00:00 2001 From: Arne Schauf Date: Wed, 23 Apr 2014 21:46:53 +0200 Subject: [PATCH] init_server.sh --- init_server.sh | 6 ++++ tmux.server.conf | 79 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100755 init_server.sh create mode 100644 tmux.server.conf diff --git a/init_server.sh b/init_server.sh new file mode 100755 index 0000000..59b769c --- /dev/null +++ b/init_server.sh @@ -0,0 +1,6 @@ +mkdir -p ~/.backup +ln -snf `pwd`/vimrc ~/.vimrc +ln -snf `pwd`/tmux.server.conf ~/.tmux.conf +ln -snf `pwd`/zshrc.local ~/.zshrc.local +ln -snf `pwd`/zshrc ~/.zshrc +ln -snf `pwd`/gitconfig ~/.gitconfig diff --git a/tmux.server.conf b/tmux.server.conf new file mode 100644 index 0000000..663dcf6 --- /dev/null +++ b/tmux.server.conf @@ -0,0 +1,79 @@ +# ncurses not polluting scroll history +set -g alternate-screen on +# dont respect smaller windows +setw -g aggressive-resize on + +# command prefix +unbind C-b +set -g prefix C-w +bind w send-prefix +bind-key C-w last-window + +# basic settings +set -g history-limit 30000 +set-option -g default-shell /usr/bin/zsh +set-window-option -g utf8 on +set -g base-index 1 + +# vi mode +set-window-option -g mode-keys vi +bind-key -t vi-copy 'v' begin-selection +bind-key -t vi-copy 'y' copy-selection + +# escape mode +unbind [ +bind Escape copy-mode +set -s escape-time 0 + +# switch windows +bind -r j previous-window +bind -r k next-window +bind -r h swap-window -t -1 +bind -r l swap-window -t +1 + +# fixes redraw bugs +set -g default-terminal screen-256color + +# splitting +unbind % +unbind '"' +bind = split-window -h +bind - split-window -v +bind -r C-h run "tmux select-pane -L" +bind -r C-j run "tmux select-pane -D" +bind -r C-k run "tmux select-pane -U" +bind -r C-l run "tmux select-pane -R" +bind [ resize-pane -L 5 +bind ] resize-pane -R 5 +bind < resize-pane -D 5 +bind > resize-pane -U 5 +bind-key b command-prompt -p "create pane from:" "join-pane -s ':%%'" +bind-key v command-prompt -p "send pane to:" "join-pane -t ':%%'" + +# window title +set-option -g set-titles on +set-option -g set-titles-string '[#H]: #W' +set-window-option -g automatic-rename on + +# no visual activity +setw -g monitor-activity off +set -g visual-activity on +set -g visual-bell off + +# status bar +bind-key z set -g status +set-option -g status-utf8 on +set-option -g status-justify left +set-option -g status-bg black +set-option -g status-fg cyan +set-option -g status-interval 5 +set-option -g status-left-length 0 +set-option -g status-right-length 80 +set-option -g status-left '' +set-option -g status-right '#[fg=blue,bold]#H #[fg=green,bold]|#[fg=black,bold]#(uptime | rev | cut -d":" -f1 | rev | sed s/,//g ) #[fg=green,bold]| #[fg=blue,bold]%d.%m.%y %H:%M' +set-window-option -g window-status-current-fg black +set-window-option -g window-status-current-bg green + +# clock +set-window-option -g clock-mode-colour cyan +set-window-option -g clock-mode-style 24