From d944b3933220070434bebf7741ec440f85ed9119 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sat, 11 Jun 2022 18:59:02 +0200 Subject: common/tmux: use plugins option --- common/commandline/tmux.nix | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/common/commandline/tmux.nix b/common/commandline/tmux.nix index 84d2cc8..b355662 100644 --- a/common/commandline/tmux.nix +++ b/common/commandline/tmux.nix @@ -1,8 +1,8 @@ -inputs: - -{ config, pkgs, ... } : - -let +inputs: { + config, + pkgs, + ... +}: let # Thanks: https://github.com/DanielFGray/dotfiles/blob/master/tmux.remote.conf remoteConf = builtins.toFile "tmux.remote.conf" '' unbind C-q @@ -21,13 +21,9 @@ in { terminal = "tmux-256color"; historyLimit = 50000; - extraConfig = with config.theme; with pkgs.tmuxPlugins; - '' - # Plugins - run-shell '${copycat}/share/tmux-plugins/copycat/copycat.tmux' - run-shell '${sensible}/share/tmux-plugins/sensible/sensible.tmux' - run-shell '${urlview}/share/tmux-plugins/urlview/urlview.tmux' + plugins = with pkgs.tmuxPlugins; [copycat sensible urlview]; + extraConfig = with config.theme; '' bind-key R run-shell ' \ tmux source-file /etc/tmux.conf > /dev/null; \ tmux display-message "sourced /etc/tmux.conf"' @@ -38,7 +34,9 @@ in { set-option -g status-left-length 20 set-option -g @prefix_highlight_fg '${colors.background}' set-option -g @prefix_highlight_bg '${colors.dominant}' - run-shell '${prefix-highlight}/share/tmux-plugins/prefix-highlight/prefix_highlight.tmux' + + # Add plugin here because it needs its configuration + run-shell '${pkgs.tmuxPlugins.prefix-highlight}/share/tmux-plugins/prefix-highlight/prefix_highlight.tmux' # Be faster switching windows bind C-n next-window -- cgit v1.2.3