From 05973b93ffcacf864793b53ac0b4c143dd8c8769 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 16 Mar 2023 15:45:15 +0000 Subject: [PATCH] home: tmux: add 'enabledPassthrough' This is useful for cases where some programs expect to be able to use the tmux passthrough escape sequences by using the tmux passthrough sequence. One such example is `osc52` script I packaged. However I like the idea of tmux filtering all escape sequences by default, so it's not enabled by default. --- home/tmux/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/home/tmux/default.nix b/home/tmux/default.nix index 7234bb2..8e673b1 100644 --- a/home/tmux/default.nix +++ b/home/tmux/default.nix @@ -9,6 +9,8 @@ in { options.my.home.tmux = with lib; { enable = my.mkDisableOption "tmux terminal multiplexer"; + + enabledPassthrough = mkEnableOption "tmux DCS passthrough sequence"; }; config.programs.tmux = lib.mkIf cfg.enable { @@ -63,6 +65,13 @@ in # Allow any application to send OSC52 escapes to set the clipboard set -s set-clipboard on + + ${ + lib.optionalString cfg.enabledPassthrough '' + # Allow any application to use the tmux DCS for passthrough + set -g allow-passthrough on + '' + } ''; }; }