reorganization
This commit is contained in:
parent
bc44678dac
commit
91b5421848
46 changed files with 47 additions and 51 deletions
61
home/modules/tmux.nix
Normal file
61
home/modules/tmux.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
escapeTime = 0;
|
||||
mouse = true;
|
||||
newSession = true;
|
||||
shell = "${pkgs.fish}/bin/fish";
|
||||
extraConfig = ''
|
||||
# Key bindings
|
||||
bind C-l next-window
|
||||
bind C-h previous-window
|
||||
bind C-b last-window
|
||||
bind n new-window
|
||||
bind C-n new-window -c '#{pane_current_path}'
|
||||
bind v split-window -h
|
||||
bind C-v split-window -hc '#{pane_current_path}'
|
||||
bind s split-window -v
|
||||
bind C-s split-window -vc '#{pane_current_path}'
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
bind -r H resize-pane -L 5
|
||||
bind -r J resize-pane -D 5
|
||||
bind -r K resize-pane -U 5
|
||||
bind -r L resize-pane -R 5
|
||||
bind c command-prompt -I "#{b:pane_current_path}" "rename-window '%%'"
|
||||
bind C-c command-prompt -I "#{b:pane_current_path}" "rename-window '%%'"
|
||||
|
||||
# Layouts
|
||||
bind f new-window -c '#{pane_current_path}' vifm
|
||||
bind R source ${ pkgs.writeText "tmux-rloft" ''
|
||||
split-window -c '#{pane_current_path}' -h R -q --no-save --no-restore;
|
||||
select-pane -l
|
||||
''}
|
||||
|
||||
# Unbind
|
||||
unbind p
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# Eye candy
|
||||
set-option -g status-right ""
|
||||
set-option -g status-left ""
|
||||
set-option -g status-justify "centre"
|
||||
set-option -g status-style fg=magenta
|
||||
set-option -g pane-border-style fg=brightwhite
|
||||
set-option -g pane-active-border-style fg=magenta
|
||||
set-option -g window-status-current-style bg=brightwhite
|
||||
|
||||
# Some more specifics
|
||||
set-option -g focus-events on
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -as terminal-features ",xterm-256color:RGB"
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue