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.

109 lines
3.0 KiB

8 years ago
  1. set -g default-command "zsh"
  2. set -g default-terminal "tmux-256color"
  3. set -g history-limit 20000
  4. set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
  5. # automatically renumber tmux windows
  6. set -g renumber-windows on
  7. # something for nvim
  8. set -g focus-events 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. set-option -g set-titles on
  32. set-option -g set-titles-string "#T - #W"
  33. set-window-option -g automatic-rename on
  34. ######################
  35. #### Key Bindings ####
  36. ######################
  37. # reload config file
  38. bind r source-file ~/.tmux.conf \; display "Config Reloaded!"
  39. # quickly open a new window
  40. bind N new-window -c "#{pane_current_path}"
  41. # split window and fix path for tmux 1.9
  42. bind | split-window -h -c "#{pane_current_path}"
  43. bind - split-window -v -c "#{pane_current_path}"
  44. # synchronize all panes in a window
  45. bind y setw synchronize-panes
  46. # pane movement shortcuts
  47. bind h select-pane -L
  48. bind j select-pane -D
  49. bind k select-pane -U
  50. bind l select-pane -R
  51. bind -r C-h select-window -t :-
  52. bind -r C-l select-window -t :+
  53. # Resize pane shortcuts
  54. bind -r H resize-pane -L 10
  55. bind -r J resize-pane -D 10
  56. bind -r K resize-pane -U 10
  57. bind -r L resize-pane -R 10
  58. # enable mouse support for switching panes/windows
  59. setw -g mouse on
  60. # set-option -g -q mouse on
  61. bind-key -T root PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage"
  62. 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"
  63. bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "select-pane -t =; send-keys -M" "select-pane -t =; send-keys -M"
  64. # maximizing and restoring windows
  65. unbind Up
  66. bind Up new-window -d -n fullscreen \; swap-pane -s fullscreen.1 \; select-window -t fullscreen
  67. unbind Down
  68. bind Down last-window \; swap-pane -s fullscreen.1 \; kill-window -t fullscreen
  69. # set vi mode for copy mode
  70. setw -g mode-keys vi
  71. # more settings to make copy-mode more vim-like
  72. unbind [
  73. bind Escape copy-mode
  74. unbind p
  75. bind p paste-buffer
  76. # Buffers to/from Mac clipboard, yay tmux book from pragprog
  77. #bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
  78. #bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer"
  79. ##############################
  80. ### Color & Style Settings ###
  81. ##############################
  82. source ~/.dotfiles/tmux/theme.sh