-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.nix
53 lines (46 loc) · 1.16 KB
/
tmux.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ config, lib, pkgs, ... }:
let
cfg = config.myTerminal.tmux;
in
{
options.myTerminal.tmux = with lib; {
enable = mkEnableOption "tmux";
};
config = lib.mkIf cfg.enable {
programs.tmux = {
enable = true;
prefix = "C-a";
terminal = "tmux-256color";
keyMode = "vi";
escapeTime = 10;
newSession = true;
plugins = with pkgs; [
tmuxPlugins.yank
{
plugin = tmuxPlugins.power-theme;
extraConfig = ''
set -g @tmux_power_theme '#99C794'
'';
}
];
extraConfig = ''
# TERM override
set terminal-overrides "xterm*:RGB"
# Enable mouse
set -g mouse on
# Pane movement shortcuts (same as vim)
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Copy mode using 'Esc'
unbind [
bind Escape copy-mode
# Start selection with 'v' and copy using 'y'
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Custom
bind-key -r i run-shell "tmux neww ollama run mistral:instruct"
'';
};
};
}