diff --git a/home/user/nvf.nix b/home/user/nvf.nix index 1f7f354..163c5ec 100644 --- a/home/user/nvf.nix +++ b/home/user/nvf.nix @@ -186,6 +186,12 @@ in { nowait = true; desc = "Notifications"; } + { + key = ""; + mode = ["n"]; + action = ":noh"; + desc = "Clear highlight"; + } # === Tab === # { @@ -209,6 +215,16 @@ in { mode = ["t"]; action = ":ToggleTerm"; } + { + key = ""; + mode = ["t"]; + action = ":ToggleTerm"; + } + { + key = ""; + mode = ["n"]; + action = ":ToggleTerm"; + } { key = ""; mode = ["t"]; diff --git a/system/modules/tmux.nix b/system/modules/tmux.nix index 743b08a..1d9d879 100644 --- a/system/modules/tmux.nix +++ b/system/modules/tmux.nix @@ -1,6 +1,8 @@ -{ pkgs, config, ... }: - -let +{ + pkgs, + config, + ... +}: let getIconScript = pkgs.writeShellScript "get-icon" '' get_icons() { local session_name="$1" @@ -28,21 +30,22 @@ let prefixKey = "C-Space"; tmuxConfigPath = "/etc/tmux.conf"; -in -{ - environment.variables = { - TMUXINATOR_CONFIG = "/etc/tmuxinator"; - }; - environment.etc = { - "tmuxinator/tmux.yaml" = { - source = ../../home/config/tmux.yaml; - mode = "0444"; +in { + environment = { + variables = { + TMUXINATOR_CONFIG = "/etc/tmuxinator"; + }; + etc = { + "tmuxinator/tmux.yaml" = { + source = ../../home/config/tmux.yaml; + mode = "0444"; + }; }; - }; - environment.systemPackages = with pkgs; [ - tmuxinator - ]; + systemPackages = with pkgs; [ + tmuxinator + ]; + }; programs = { tmux = { @@ -61,6 +64,7 @@ in set -g allow-passthrough on set -s set-clipboard on set-option -s set-clipboard on + set-option -g extended-keys on set -g status "on" set -g status-style fg=default,bg=default @@ -83,7 +87,7 @@ in bind-key ${prefixKey} send-prefix # Set Window start at 1 - set -g base-index 1 + 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 @@ -117,7 +121,7 @@ in unbind -T copy-mode-vi MouseDragEnd1Pane - unbind f + unbind f bind-key -r f run-shell "tmux neww tmux-sessionizer" set -g @resurrect-capture-pane-contents 'on'