feat: add tmux hm module
This commit is contained in:
parent
45c94a4aff
commit
2be731d5d2
6 changed files with 26 additions and 29 deletions
|
@ -46,8 +46,9 @@
|
|||
imports = [
|
||||
nur.hmModules.nur
|
||||
./modules/bash
|
||||
./modules/git
|
||||
./modules/git.nix
|
||||
./modules/neovim
|
||||
./modules/tmux.nix
|
||||
|
||||
./hostvars.nix
|
||||
({ osConfig, ... }: {
|
||||
|
|
|
@ -22,28 +22,4 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
# TODO: install plugins through nix
|
||||
tmux = {
|
||||
enable = true;
|
||||
keyMode = "vi";
|
||||
terminal = "screen-256color";
|
||||
newSession = true;
|
||||
historyLimit = 30000;
|
||||
extraConfig = ''
|
||||
bind-key -n Home send Escape "OH"
|
||||
bind-key -n End send Escape "OF"
|
||||
set -g mouse on
|
||||
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
|
||||
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
|
||||
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
|
||||
|
||||
set -g @plugin 'dracula/tmux'
|
||||
run 'bash -c "$HOME/.tmux/plugins/tpm/tpm ||
|
||||
${pkgs.git}/bin/git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm &&
|
||||
$HOME/.tmux/plugins/tpm/tpm"'
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
24
common/modules/tmux.nix
Normal file
24
common/modules/tmux.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, ... }: {
|
||||
programs = {
|
||||
tmux = {
|
||||
enable = true;
|
||||
keyMode = "vi";
|
||||
terminal = "screen-256color";
|
||||
newSession = true;
|
||||
historyLimit = 30000;
|
||||
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
dracula
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
bind-key -n Home send Escape "OH"
|
||||
bind-key -n End send Escape "OF"
|
||||
set -g mouse on
|
||||
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
|
||||
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
|
||||
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -28,8 +28,6 @@
|
|||
"libvirtd"
|
||||
];
|
||||
};
|
||||
|
||||
# TODO: use hm for tmux
|
||||
home-manager.users = {
|
||||
matt = {
|
||||
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
"libvirtd"
|
||||
];
|
||||
};
|
||||
|
||||
# TODO: use hm for tmux
|
||||
home-manager.users = {
|
||||
matt = {
|
||||
imports = [
|
||||
|
|
Loading…
Reference in a new issue