All of my important config files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
3.3 KiB

8 years ago
  1. #set -g default-command "login-shell"
  2. # tmux display things in 256 colors
  3. #set -g default-terminal "tmux-256color-italic"
  4. # enable terminal compability
  5. #set-option -ga terminal-overrides ",tmux-256color-italic:Tc"
  6. set -g history-limit 20000
  7. # automatically renumber tmux windows
  8. set -g renumber-windows on
  9. # unbind default prefix and set it to Ctrl+a
  10. unbind C-b
  11. set -g prefix C-a
  12. bind C-a send-prefix
  13. # for nested tmux sessions
  14. bind-key a send-prefix
  15. # Activity Monitoring
  16. setw -g monitor-activity off
  17. set -g visual-activity off
  18. # Rather than constraining window size to the maximum size of any client
  19. # connected to the *session*, constrain window size to the maximum size of any
  20. # client connected to *that window*. Much more reasonable.
  21. setw -g aggressive-resize on
  22. # make delay shorter
  23. set -sg escape-time 0
  24. # tile all windows
  25. unbind =
  26. bind = select-layout tiled
  27. # cycle through panes
  28. # unbind C-a
  29. # unbind o # this is the default key for cycling panes
  30. # bind ^A select-pane -t:.+
  31. # make window/pane index start with 1
  32. set -g base-index 1
  33. setw -g pane-base-index 1
  34. set-option -g set-titles on
  35. set-option -g set-titles-string "#T - #W"
  36. # set-window-option -g automatic-rename on
  37. ######################
  38. #### Key Bindings ####
  39. ######################
  40. # reload config file
  41. bind r source-file ~/.tmux.conf \; display "Config Reloaded!"
  42. # quickly open a new window
  43. bind N new-window -c "#{pane_current_path}"
  44. # split window and fix path for tmux 1.9
  45. bind | split-window -h -c "#{pane_current_path}"
  46. bind - split-window -v -c "#{pane_current_path}"
  47. # synchronize all panes in a window
  48. bind y setw synchronize-panes
  49. # pane movement shortcuts
  50. bind h select-pane -L
  51. bind j select-pane -D
  52. bind k select-pane -U
  53. bind l select-pane -R
  54. bind -r C-h select-window -t :-
  55. bind -r C-l select-window -t :+
  56. # Resize pane shortcuts
  57. bind -r H resize-pane -L 10
  58. bind -r J resize-pane -D 10
  59. bind -r K resize-pane -U 10
  60. bind -r L resize-pane -R 10
  61. # enable mouse support for switching panes/windows
  62. setw -g mouse on
  63. # set-option -g -q mouse on
  64. bind-key -T root PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage"
  65. bind-key -t vi-copy PPage page-up
  66. bind-key -t vi-copy NPage page-down
  67. bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "select-pane -t =; send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
  68. bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "select-pane -t =; send-keys -M" "select-pane -t =; send-keys -M"
  69. bind-key -t vi-copy WheelUpPane halfpage-up
  70. bind-key -t vi-copy WheelDownPane halfpage-down
  71. # maximizing and restoring windows
  72. unbind Up
  73. bind Up new-window -d -n fullscreen \; swap-pane -s fullscreen.1 \; select-window -t fullscreen
  74. unbind Down
  75. bind Down last-window \; swap-pane -s fullscreen.1 \; kill-window -t fullscreen
  76. # set vi mode for copy mode
  77. setw -g mode-keys vi
  78. # more settings to make copy-mode more vim-like
  79. unbind [
  80. bind Escape copy-mode
  81. unbind p
  82. bind p paste-buffer
  83. bind -t vi-copy 'v' begin-selection
  84. bind -t vi-copy 'y' copy-selection
  85. # Buffers to/from Mac clipboard, yay tmux book from pragprog
  86. #bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
  87. #bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer"
  88. ##############################
  89. ### Color & Style Settings ###
  90. ##############################
  91. source ~/.dotfiles/tmux/theme.sh