Commit 06a069fe765a
Changed files (3)
envs
tmux
envs/tmux/keybindings
@@ -0,0 +1,50 @@
+set -g history-limit 500000
+# Be sure to deactive the mode
+# set -g mode-mouse off
+# By default tmux adds a small delay when sending commands.
+# Reducing this delay by setting escape-time.
+set -sg escape-time 1
+bind v paste-buffer
+# Vim-behavior for moving between panes
+bind c select-pane -L
+bind t select-pane -D
+bind s select-pane -U
+bind r select-pane -R
+# Re-binding new-window and kill-pane to something more bepo-ish
+bind x new-window
+unbind c
+bind y kill-pane
+# Re-binding list-of-session
+bind u list-sessions
+# Vim-behavior for moving between windows
+bind -r C-t select-window -t :-
+bind -r C-s select-window -t :+
+# Vim-behavior for resizing panes
+bind -r C resize-pane -L 5
+bind -r T resize-pane -D 5
+bind -r S resize-pane -U 5
+bind -r R resize-pane -R 5
+# vi-mode for copy.
+set -g mode-key vi
+# `PREFIX`-`ESCAPE` for going into copy mode
+bind-key ESCAPE copy-mode
+# Rebinding some vi-copy keys in a more bepoish fashion.
+bind-key -t vi-copy 'v' begin-selection
+bind-key -t vi-copy 'y' copy-selection
+bind-key -t vi-copy 'C' top-line
+bind-key -t vi-copy 'T' scroll-down
+bind-key -t vi-copy 'S' scroll-up
+bind-key -t vi-copy 'R' bottom-line
+bind-key -t vi-copy 'c' cursor-left
+bind-key -t vi-copy 't' cursor-down
+bind-key -t vi-copy 's' cursor-up
+bind-key -t vi-copy 'r' cursor-right
+# Telling childs that this is a 256 terminal multiplexer
+set -g default-terminal "screen-256color"
+# Maximizing/Restoring panes (useful for *a lot* of workflows)
+unbind Up
+bind Up new-window -d -n tmp \; swap-pane -s tmp \; select-window -t tmp
+unbind Down
+bind Down last-window \; swap-pane -s tmp \; kill-window -t tmp
+# Recording pane content to a file. (This is crasy !)
+bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"
envs/tmux/tmux.conf
@@ -0,0 +1,132 @@
+# Tmux configuration file
+# Documented by Vincent Demeester.
+# Note that I am using bepo keyboard (that why key binding might be a
+# little weird for you).
+# First thing first, quickly reload $HOME/.tmux.conf
+#bind o source-file ~/.tmux.conf; display "tmux configuration reloaded."
+source-file $HOME/.config/tmux/commons/keybindings
+
+# titles
+# set -g show -g says
+set -g set-titles on
+set -g set-titles-string "tmux - #S:#I.#P (#W)"
+# Set window notifications
+setw -g monitor-activity on
+set -g visual-activity on
+# Rather than constraining window size to the maximum size of any client
+# connected to the *session*, constrain window size to the maximum size of any
+# client connected to *that window*. Much more reasonable.
+setw -g aggressive-resize on
+# binding
+bind-key C-a last-window
+bind-key C-r command-prompt 'rename-window %%'
+bind-key '"' split-window -v -c '#{pane_current_path}'
+bind-key '%' split-window -h -c '#{pane_current_path}'
+
+######################
+### DESIGN CHANGES ###
+######################
+
+# panes
+set -g pane-border-fg black
+set -g pane-active-border-fg brightred
+
+## Status bar design
+# status line
+set -g status-justify left
+set -g status-bg default
+set -g status-fg colour12
+set -g status-interval 2
+
+# messaging
+set -g message-fg black
+set -g message-bg yellow
+set -g message-command-fg blue
+set -g message-command-bg black
+
+#window mode
+setw -g mode-bg colour6
+setw -g mode-fg colour0
+
+# window status
+setw -g window-status-format " #F#I:#W#F "
+setw -g window-status-current-format " #F#I:#W#F "
+setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
+setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
+setw -g window-status-current-bg colour0
+setw -g window-status-current-fg colour11
+setw -g window-status-current-attr dim
+setw -g window-status-bg green
+setw -g window-status-fg black
+setw -g window-status-attr reverse
+
+# Info on left (I don't have a session display for now)
+set -g status-left ''
+
+# loud or quiet?
+set-option -g visual-activity off
+set-option -g visual-bell on
+set-option -g visual-silence off
+set-window-option -g monitor-activity on
+set-option -g bell-action none
+
+set -g default-terminal "screen-256color"
+
+# The modes {
+setw -g clock-mode-colour colour135
+setw -g mode-attr bold
+setw -g mode-fg colour196
+setw -g mode-bg colour238
+
+# }
+# The panes {
+
+set -g pane-border-bg colour232
+set -g pane-border-fg colour240
+set -g pane-active-border-bg colour232
+set -g pane-active-border-fg colour250
+
+# }
+# The statusbar {
+
+set -g status-position bottom
+set -g status-bg colour234
+set -g status-fg colour137
+set -g status-attr dim
+set -g status-left ''
+set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
+set -g status-right-length 50
+set -g status-left-length 20
+
+setw -g window-status-current-fg colour81
+setw -g window-status-current-bg colour238
+setw -g window-status-current-attr bold
+setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
+
+setw -g window-status-fg colour138
+setw -g window-status-bg colour235
+setw -g window-status-attr none
+setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
+
+setw -g window-status-bell-attr bold
+setw -g window-status-bell-fg colour255
+setw -g window-status-bell-bg colour1
+
+# }
+# The messages {
+
+set -g message-attr bold
+set -g message-fg colour232
+set -g message-bg colour166
+
+# }
+set-environment -g TMUX_PLUGIN_MANAGER_PATH '$HOME/.config/tmux/plugins'
+
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-resurrect'
+set -g @plugin 'tmux-plugins/tmux-continuum'
+set -g @plugin 'tmux-plugins/tmux-copycat'
+
+set -g @continuum-restore 'on'
+
+run '~/.config/tmux/plugins/tpm/tpm'
envs/base.nix
@@ -11,10 +11,13 @@ rec {
path = "${home_directory}/src/nix/home-manager";
};
};
+ home.file.".tmux.conf".source = ./tmux/tmux.conf;
+ xdg.configFile."tmux/commons/keybindings".source = ./tmux/keybindings;
home.packages = with pkgs; [
jq
htop
pass
tree
+ tmux
];
}