tmux, organize
This commit is contained in:
parent
d6a288da0f
commit
83232cc22a
4 changed files with 77 additions and 3 deletions
|
|
@ -5,6 +5,7 @@
|
|||
imports = [
|
||||
inputs.zen-browser.homeModules.twilight
|
||||
../../modules/home-manager/zsh.nix
|
||||
../../modules/home-manager/tmux.nix
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
|
|
|||
74
modules/home-manager/tmux.nix
Normal file
74
modules/home-manager/tmux.nix
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
baseIndex = 1;
|
||||
prefix = "C-Space";
|
||||
plugins = with pkgs; [
|
||||
tmuxPlugins.vim-tmux-navigator
|
||||
tmuxPlugins.resurrect
|
||||
tmuxPlugins.continuum
|
||||
];
|
||||
shell = "${pkgs.zsh}/bin/zsh";
|
||||
extraConfig = ''
|
||||
unbind r
|
||||
bind r source-file ~/.tmux.conf
|
||||
|
||||
unbind-key C-b
|
||||
set -g prefix C-Space
|
||||
|
||||
unbind %
|
||||
bind '=' split-window -h
|
||||
|
||||
unbind '"'
|
||||
bind - split-window -v
|
||||
|
||||
set -s escape-time 0
|
||||
|
||||
|
||||
# Act like vim
|
||||
setw -g mode-keys vi
|
||||
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection # start selecting text with "v"
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y"
|
||||
|
||||
unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode after dragging with mouse
|
||||
|
||||
bind-key -r j resize-pane -D 5
|
||||
bind-key -r k resize-pane -U 5
|
||||
bind-key -r l resize-pane -R 5
|
||||
bind-key -r h resize-pane -L 5
|
||||
|
||||
bind -r m resize-pane -Z
|
||||
|
||||
set -g mouse on
|
||||
|
||||
bind S command-prompt -p "New Session:" "new-session -A -s '%%'"
|
||||
bind K confirm kill-session
|
||||
|
||||
#List of plugins
|
||||
#set -g @plugin 'tmux-plugins/tpm'
|
||||
#set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||
## set -g @plugin 'jimeh/tmux-themepack'
|
||||
#set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
#set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
## set -g @plugin 'dracula/tmux'
|
||||
|
||||
# Powerline (I prefer default tmux powerline)
|
||||
# set -g @themepack 'powerline/default/cyan'
|
||||
set -g @resurrect-capture-pane-contents 'on' # allow tmux-ressurect to capture pane contents
|
||||
set -g @continuum-restore 'on' # enable tmux-continuum functionality
|
||||
|
||||
set -g default-terminal "screen-256color"
|
||||
|
||||
set -g status-position bottom
|
||||
set -g status-left-length 50
|
||||
set -g status-right-length 140
|
||||
set -g status-justify centre # center align window list
|
||||
set -g status-bg "colour8"
|
||||
set -g status-fg "colour7"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
shellAliases = {
|
||||
rebuild-nix = "sudo nixos-rebuild switch --flake /home/jack/nixos/#t480";
|
||||
|
|
@ -26,4 +26,3 @@ in
|
|||
inherit shellAliases;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
users.users.jack = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user.
|
||||
packages = with pkgs; [ zed-editor cargo ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue