move tmux config to nix

This commit is contained in:
Grigory Shipunov 2023-02-14 22:13:52 +01:00
parent db45fa3633
commit c4aefa0182
Signed by: 0xa
GPG key ID: 91FA5E5BF9AA901C
3 changed files with 72 additions and 2 deletions

19
flake.lock generated
View file

@ -127,7 +127,8 @@
"microvm": "microvm",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix"
"sops-nix": "sops-nix",
"tmux-yank": "tmux-yank"
}
},
"rust-analyzer-src": {
@ -167,6 +168,22 @@
"repo": "sops-nix",
"type": "github"
}
},
"tmux-yank": {
"flake": false,
"locked": {
"lastModified": 1601619684,
"narHash": "sha256-hRvkBf+YrWycecnDixAsD4CAHg3KsioomfJ/nLl5Zgs=",
"owner": "tmux-plugins",
"repo": "tmux-yank",
"rev": "1b1a436e19f095ae8f825243dbe29800a8acd25c",
"type": "github"
},
"original": {
"owner": "tmux-plugins",
"repo": "tmux-yank",
"type": "github"
}
}
},
"root": "root",

View file

@ -20,6 +20,11 @@
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
tmux-yank = {
url = "github:tmux-plugins/tmux-yank";
flake = false;
};
};
outputs =

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: {
{ pkgs, inputs, ... }: {
programs.tmux = {
enable = true;
keyMode = "vi";
@ -6,6 +6,54 @@
historyLimit = 500000;
aggressiveResize = true;
terminal = "tmux-256color";
extraConfig = ''
# all the colors we can get
set-option -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",foot*:Tc"
# emacs keys in status
set -g status-keys emacs
# set focus events
set-option -g focus-events on
# title
set -g set-titles on
set -g set-titles-string "#T"
# mouse
set -g mouse on
# theming
# modes
setw -g clock-mode-colour white
# panes
set -g pane-border-style 'fg=colour244'
set -g pane-active-border-style 'fg=colour03'
#bind b break-pane -d
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=default fg=colour15'
set -g status-right '[#S][@#H][%H:%M][%Y-%m-%d]'
set -g status-left '(^_^)'
#set -g status-right-length 50
set -g status-left-length 40
setw -g window-status-current-style 'fg=brightgreen bg=default bold'
setw -g window-status-current-format ' #I#[fg=colour15]:#W#[fg=brightgreen]#F '
setw -g window-status-style 'fg=gray bg=default'
setw -g window-status-format ' #I#[fg=colour15]:#W#[fg=gray bold]#F '
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
# messages
set -g message-style 'fg=black bg=white bold'
# copy to clipboard support
run-shell ${inputs.self.inputs.tmux-yank}/yank.tmux
'';
};
programs.zsh.interactiveShellInit = ''