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.

105 lines
2.8 KiB

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