From db78fc2289685bf3f7c116a2cb28c140b0c162b4 Mon Sep 17 00:00:00 2001 From: js0ny Date: Fri, 21 Nov 2025 22:57:52 +0000 Subject: [PATCH] tmux: nixify --- home/dot_config/tmux/+qwerty.tmux | 4 +- nixcfgs/users/js0ny/programs/tmux.nix | 56 +++++++++++++++++++++++++++ nixcfgs/users/js0ny/zephyrus.nix | 9 ++++- 3 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 nixcfgs/users/js0ny/programs/tmux.nix diff --git a/home/dot_config/tmux/+qwerty.tmux b/home/dot_config/tmux/+qwerty.tmux index 64b1366..d334652 100644 --- a/home/dot_config/tmux/+qwerty.tmux +++ b/home/dot_config/tmux/+qwerty.tmux @@ -8,5 +8,5 @@ bind -r H resize-pane -L 5 bind -r J resize-pane -D 5 bind -r K resize-pane -U 5 bind -r L resize-pane -R 5 -bind C-h select-window -t :- -bind C-l select-window -t :+ +# bind C-h select-window -t :- +# bind C-l select-window -t :+ diff --git a/nixcfgs/users/js0ny/programs/tmux.nix b/nixcfgs/users/js0ny/programs/tmux.nix new file mode 100644 index 0000000..b515bdc --- /dev/null +++ b/nixcfgs/users/js0ny/programs/tmux.nix @@ -0,0 +1,56 @@ +{pkgs, ...}: { + programs.tmux = { + enable = true; + prefix = "C-q"; + shortcut = "q"; + keyMode = "vi"; + historyLimit = 10000; + mouse = true; + baseIndex = 1; + resizeAmount = 5; + terminal = "tmux-256color"; + tmuxp.enable = true; + plugins = with pkgs.tmuxPlugins; [ + pain-control + yank + extrakto + tmux-which-key + { + plugin = resurrect; + extraConfig = '' + set -g @resurrect-strategy-nvim 'session' + + set -g @resurrect-capture-pane-contents 'on' + ''; + } + { + plugin = continuum; + extraConfig = '' + set -g @continuum-restore 'on' + + set -g @continuum-save-interval '15' + ''; + } + ]; + extraConfig = '' + ### General Options + ### ----------------------------------------------- + set-option -g default-terminal "tmux-256color" + set-option -g allow-rename on + set-option -g alternate-screen on + set-option -g visual-activity on + # set-option -g pane-border-style fg=colour244 + + ### Windows Management + ### ----------------------------------------------- + bind c new-window + unbind '"' + unbind % + bind ` resize-pane -Z + + # use pain-control map + # bind C-h select-window -t :- + # bind C-l select-window -t :+ + ''; + }; +} diff --git a/nixcfgs/users/js0ny/zephyrus.nix b/nixcfgs/users/js0ny/zephyrus.nix index 9d4280a..bb69be8 100644 --- a/nixcfgs/users/js0ny/zephyrus.nix +++ b/nixcfgs/users/js0ny/zephyrus.nix @@ -23,7 +23,7 @@ # Personal Program ./programs/chromium.nix ./programs/firefox - ./programs/emacs.nix + # ./programs/emacs.nix ./programs/vscode.nix ./programs/xilinx.nix ./programs/mime.nix @@ -50,6 +50,8 @@ ./programs/obs-studio.nix ./programs/ghostty.nix ./programs/obsidian + ./programs/aichat.nix + ./programs/tmux.nix # Desktop Linux ./programs/desktop/plasma @@ -79,5 +81,10 @@ keyboardBacklightStep = "1"; }; + xdg.configFile."libvirt/libvirt.conf" = { + text = ''uri_default = "qemu:///system"''; + enable = true; + }; + home.stateVersion = "25.05"; }