Advertisement
Guest User

Untitled

a guest
May 25th, 2015
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. # use UTF8
  2. set -g utf8
  3. set-window-option -g utf8 on
  4.  
  5. # make tmux display things in 256 colors
  6. set -g default-terminal "screen-256color"
  7.  
  8. # set scrollback history to 10000 (10k)
  9. set -g history-limit 10000
  10.  
  11. # set Ctrl-a as the default prefix key combination
  12. # and unbind C-b to free it up
  13. set -g prefix C-a
  14. unbind C-b
  15.  
  16. # use send-prefix to pass C-a through to application
  17. bind C-a send-prefix
  18.  
  19. # shorten command delay
  20. set -sg escape-time 1
  21.  
  22. # set window and pane index to 1 (0 by default)
  23. set-option -g base-index 1
  24. setw -g pane-base-index 1
  25.  
  26. # reload ~/.tmux.conf using PREFIX r
  27. bind r source-file ~/.tmux.conf \; display "Reloaded!"
  28.  
  29. # use PREFIX | to split window horizontally and PREFIX - to split vertically
  30. bind | split-window -h
  31. bind - split-window -v
  32.  
  33. # Make the current window the first window
  34. bind T swap-window -t 1
  35.  
  36. # map Vi movement keys as pane movement keys
  37. bind h select-pane -L
  38. bind j select-pane -D
  39. bind k select-pane -U
  40. bind l select-pane -R
  41.  
  42. # and use C-h and C-l to cycle thru panes
  43. bind -r C-h select-window -t :-
  44. bind -r C-l select-window -t :+
  45.  
  46. # resize panes using PREFIX H, J, K, L
  47. bind H resize-pane -L 5
  48. bind J resize-pane -D 5
  49. bind K resize-pane -U 5
  50. bind L resize-pane -R 5
  51.  
  52. # ---------------------
  53. # Copy & Paste
  54. # ---------------------
  55. # provide access to the clipboard for pbpaste, pbcopy
  56. set-option -g default-command "reattach-to-user-namespace -l zsh"
  57. set-window-option -g automatic-rename on
  58.  
  59. # use vim keybindings in copy mode
  60. setw -g mode-keys vi
  61.  
  62. # setup 'v' to begin selection as in Vim
  63. bind-key -t vi-copy v begin-selection
  64. bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
  65.  
  66. # update default binding of 'Enter' to also use copy-pipe
  67. unbind -t vi-copy Enter
  68. bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
  69.  
  70. bind y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
  71. bind C-y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
  72.  
  73. # ----------------------
  74. # Status Bar
  75. # -----------------------
  76. set-option -g status on # turn the status bar on
  77. set -g status-utf8 on # set utf-8 for the status bar
  78. set -g status-interval 5 # set update frequencey (default 15 seconds)
  79. set -g status-justify centre # center window list for clarity
  80. # set-option -g status-position top # position the status bar at top of screen
  81.  
  82. # visual notification of activity in other windows
  83. setw -g monitor-activity on
  84. set -g visual-activity on
  85.  
  86. # set color for status bar
  87. #set-option -g status-bg colour235 #base02
  88. #set-option -g status-fg yellow #yellow
  89. #set-option -g status-attr dim
  90.  
  91. # set window list colors - red for active and cyan for inactive
  92. #set-window-option -g window-status-fg brightblue #base0
  93. #set-window-option -g window-status-bg colour236
  94. #set-window-option -g window-status-attr dim
  95. #
  96. #set-window-option -g window-status-current-fg brightred #orange
  97. #set-window-option -g window-status-current-bg colour236
  98. #set-window-option -g window-status-current-attr bright
  99.  
  100.  
  101. #Evil mouse settings
  102. ##scroll buffer
  103. #setw -g mode-mouse on
  104. #set -g mouse-select-pane on
  105. #set -g mouse-resize-pane on
  106. #set -g mouse-select-window on
  107. setw -g mode-mouse off
  108.  
  109. run-shell "powerline-daemon -q"
  110. source /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf
  111.  
  112. # show host name and IP address on left side of status bar
  113. set -g status-left-length 70
  114. #set -g status-left "#[fg=green]: #h : #[fg=brightblue]#(curl icanhazip.com) #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print \"en0 \" $2}') #(ifconfig en1 | grep 'inet ' | awk '{print \"en1 \" $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') "
  115.  
  116. # show session name, window & pane number, date and time on right side of
  117. # status bar
  118. set -g status-right-length 60
  119. #set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]:: %d %b %Y #[fg=green]:: #(date | awk '{print $4}') ::"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement