Added tmux
This commit is contained in:
parent
99ea7423de
commit
4536235669
3 changed files with 63 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
[
|
[
|
||||||
./modules/nixvim
|
./modules/nixvim
|
||||||
./modules/fastfetch
|
./modules/fastfetch
|
||||||
|
./modules/tmux/home.nix
|
||||||
] ++ lib.optional (hwconfig.useImpermanence) (import ./modules/impermanence/home.nix { inherit username; inherit inputs; } )
|
] ++ lib.optional (hwconfig.useImpermanence) (import ./modules/impermanence/home.nix { inherit username; inherit inputs; } )
|
||||||
++ lib.optional (config.programs.hyprland.enable) ./modules/hyprland/home.nix
|
++ lib.optional (config.programs.hyprland.enable) ./modules/hyprland/home.nix
|
||||||
++ lib.optional (builtins.pathExists ./homes/${username}) ./homes/${username};
|
++ lib.optional (builtins.pathExists ./homes/${username}) ./homes/${username};
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
colorschemes.catppuccin.enable = true;
|
colorschemes.catppuccin.enable = true;
|
||||||
plugins = {
|
plugins = {
|
||||||
|
tmux-navigator = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
cmp = {
|
cmp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoEnableSources = true;
|
autoEnableSources = true;
|
||||||
|
|
|
||||||
59
nixos/modules/tmux/home.nix
Normal file
59
nixos/modules/tmux/home.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
terminal = "tmux-256color";
|
||||||
|
prefix = "C-Space";
|
||||||
|
clock24 = true;
|
||||||
|
mouse = true;
|
||||||
|
keyMode = "vi";
|
||||||
|
baseIndex = 1;
|
||||||
|
sensibleOnTop = true;
|
||||||
|
disableConfirmationPrompt = true;
|
||||||
|
plugins = with pkgs.tmuxPlugins; [
|
||||||
|
vim-tmux-navigator
|
||||||
|
{
|
||||||
|
plugin = catppuccin;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g @catppuccin_flavour 'mocha'
|
||||||
|
set -g @catppuccin_date_time "%H:%M"
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = resurrect;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g @resurrect-strategy-vim 'session'
|
||||||
|
set -g @resurrect-strategy-nvim 'session'
|
||||||
|
set -g @resurrect-capture-pane-contents 'on'
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = continuum;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g @continuum-restore 'on'
|
||||||
|
set -g @continuum-boot 'on'
|
||||||
|
set -g @continuum-save-interval '10'
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
yank
|
||||||
|
];
|
||||||
|
extraConfig = ''
|
||||||
|
# Shift Alt vim keys to switch windows
|
||||||
|
bind -n M-H previous-window
|
||||||
|
bind -n M-L next-window
|
||||||
|
# Use Alt-arrow keys without prefix key to switch panes
|
||||||
|
bind -n M-Left select-pane -L
|
||||||
|
bind -n M-Right select-pane -R
|
||||||
|
bind -n M-Up select-pane -U
|
||||||
|
bind -n M-Down select-pane -D
|
||||||
|
|
||||||
|
# keybindings
|
||||||
|
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||||
|
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||||
|
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||||
|
|
||||||
|
bind '"' split-window -v -c "#{pane_current_path}"
|
||||||
|
bind % split-window -h -c "#{pane_current_path}"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue