131 lines
3.5 KiB
Nix
131 lines
3.5 KiB
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
environment.defaultPackages = with pkgs; [
|
|
fbterm
|
|
kitty
|
|
starship
|
|
];
|
|
|
|
# TODO: switch to home manager
|
|
# FIXME: do not embed our entire tmux config into this
|
|
programs.fish.enable = true;
|
|
programs.tmux = {
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
|
# use <C-a> as leader
|
|
unbind C-b
|
|
set-option -g prefix C-a
|
|
bind-key C-a send-prefix
|
|
|
|
bind ? list-keys
|
|
|
|
# window/pane management
|
|
bind s split-window -h -c "#{pane_current_path}"
|
|
bind C-s select-layout main-horizontal \; swap-pane -t 0 \; select-pane -t 0
|
|
bind S select-layout even-horizontal
|
|
bind v split-window -v -c "#{pane_current_path}"
|
|
bind C-v select-layout main-vertical \; swap-pane -t 0 \; select-pane -t 0
|
|
bind V select-layout even-vertical
|
|
bind c new-window -c "#{pane_current_path}"
|
|
# move pane to new tab
|
|
bind b break-pane
|
|
# swap active pane and first pane
|
|
bind a swap-pane -t 0 \; select-pane -t 0
|
|
unbind '"'
|
|
unbind %
|
|
|
|
# vim-style pane switching with <A-j> through <A-l>
|
|
bind -n M-h select-pane -L
|
|
bind -n M-j select-pane -D
|
|
bind -n M-k select-pane -U
|
|
bind -n M-l select-pane -R
|
|
bind h select-pane -L
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
bind l select-pane -R
|
|
# Resize using caps
|
|
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
|
|
|
|
# vim-style copy mode
|
|
set-window-option -g mode-keys vi
|
|
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
|
|
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel
|
|
bind-key p paste-buffer
|
|
|
|
# window traversal
|
|
bind -n M-n next-window
|
|
bind tab next-window
|
|
|
|
|
|
# reload config with r
|
|
bind r source-file ~/.config/tmux/tmux.conf
|
|
# dont rename windows automatically
|
|
# set-option -g allow-rename off
|
|
|
|
# bind m send-keys -R M-k C-a '[kV' C-m M-j 'Pd/[\.ACFGV]' C-m 'Ax'
|
|
bind m source-file ~/.config/tmux/copy.tmux
|
|
|
|
|
|
# ----- UI/UX -----
|
|
|
|
# don't do anything when a 'bell' rings
|
|
set -g visual-activity off
|
|
set -g visual-bell off
|
|
set -g visual-silence off
|
|
setw -g monitor-activity off
|
|
set -g bell-action none
|
|
|
|
# copy mode
|
|
setw -g mode-style 'fg=black bg=red bold'
|
|
|
|
# panes
|
|
set -g pane-border-style 'fg=black'
|
|
set -g pane-active-border-style 'fg=white'
|
|
|
|
# status
|
|
set -g status-position bottom
|
|
set -g status-justify left
|
|
set -g status-style 'bg=black fg=white'
|
|
|
|
set -g status-left ""
|
|
set -g status-right ""
|
|
|
|
# window status
|
|
setw -g window-status-current-style 'bg=blue fg=black'
|
|
setw -g window-status-current-format '◤ #W ◢'
|
|
|
|
setw -g window-status-style 'fg=white bg=black'
|
|
setw -g window-status-format '#[fg=black]◤ #[fg=white]#W #[fg=black]◢' # todo: styling
|
|
setw -g window-status-bell-style 'fg=yellow bg=red bold'
|
|
|
|
# messages
|
|
set -g message-style 'fg=black bg=blue'
|
|
'';
|
|
|
|
plugins = with pkgs.tmuxPlugins; [
|
|
sensible
|
|
resurrect
|
|
];
|
|
};
|
|
|
|
# home-manager.users.djai = {
|
|
# programs.fish.enable = true;
|
|
# programs.tmux.enable = true;
|
|
#
|
|
# programs.kitty = {
|
|
# enable = true;
|
|
# settings = {
|
|
# shell = "${pkgs.tmux}/bin/tmux";
|
|
# font_family = "Iosevka Nerd Font";
|
|
# };
|
|
# extraConfig = ""; # TODO theming
|
|
# };
|
|
#
|
|
# };
|
|
}
|