summaryrefslogtreecommitdiffstats
path: root/modules/desktop/apps/tmux.nix
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-04-29 17:07:29 -0400
committerJon Santmyer <jon@jonsantmyer.com>2024-04-29 17:07:29 -0400
commitb4ffcbe13301291e0d04169a9ac0377d52621c4f (patch)
treed1c52818a26843747b74cb8d16c399e983e934b1 /modules/desktop/apps/tmux.nix
parent69857d405fcc45194b4a4c4bb1f9946c05e50631 (diff)
parent7e1c5f4418a629d6f3bae954dd172ca81e476b3e (diff)
downloadnix-config-b4ffcbe13301291e0d04169a9ac0377d52621c4f.tar.gz
nix-config-b4ffcbe13301291e0d04169a9ac0377d52621c4f.tar.bz2
nix-config-b4ffcbe13301291e0d04169a9ac0377d52621c4f.zip
Merge remote-tracking branch 'origin/master' into desktopHEADmaster
Diffstat (limited to 'modules/desktop/apps/tmux.nix')
-rw-r--r--modules/desktop/apps/tmux.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/modules/desktop/apps/tmux.nix b/modules/desktop/apps/tmux.nix
new file mode 100644
index 0000000..6b58d8d
--- /dev/null
+++ b/modules/desktop/apps/tmux.nix
@@ -0,0 +1,55 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ tmuxConf = config.modules.desktop.apps.tmux;
+in {
+ options.modules.desktop.apps.tmux = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = true;
+ };
+ };
+
+ config = lib.mkIf (tmuxConf.enable) {
+ home.manager.programs.tmux = {
+ enable = true;
+ terminal = "tmux-256color";
+ historyLimit = 10000;
+ plugins = with pkgs.tmuxPlugins;
+ [
+ catppuccin
+ vim-tmux-navigator
+ sensible
+ yank
+ ];
+ shell = "${pkgs.zsh}/bin/zsh";
+ extraConfig = ''
+set-option -sa terminal-overrides ",xterm*:Tc"
+set -g mouse on
+
+unbind C-b
+set -g prefix C-Space
+bind C-Space send-prefix
+
+bind -n M-H previous-window
+bind -n M-L next-window
+
+set -g base-index 1
+set -g pane-base-index 1
+set-window-option -g pane-base-index 1
+set-option -g renumber-windows on
+
+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}"
+ '';
+ };
+ };
+}