Compare commits

...

2 commits

Author SHA1 Message Date
Bruno BELANYI 05973b93ff home: tmux: add 'enabledPassthrough'
All checks were successful
continuous-integration/drone/push Build is passing
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.
2023-03-16 16:42:55 +00:00
Bruno BELANYI 20341a3129 refactor: 'with lib.my' -> 'with lib' 2023-03-16 16:42:55 +00:00
12 changed files with 38 additions and 29 deletions

View file

@ -3,8 +3,8 @@ let
cfg = config.my.home.bat;
in
{
options.my.home.bat = with lib.my; {
enable = mkDisableOption "bat configuration";
options.my.home.bat = with lib; {
enable = my.mkDisableOption "bat configuration";
};
config.programs.bat = lib.mkIf cfg.enable {

View file

@ -3,8 +3,8 @@ let
cfg = config.my.home.documentation;
in
{
options.my.home.documentation = with lib.my; {
enable = mkDisableOption "documentation integration";
options.my.home.documentation = with lib; {
enable = my.mkDisableOption "documentation integration";
};
# Add documentation for user packages

View file

@ -5,8 +5,8 @@ let
inherit (lib.my) mkMailAddress;
in
{
options.my.home.git = with lib.my; {
enable = mkDisableOption "git configuration";
options.my.home.git = with lib; {
enable = my.mkDisableOption "git configuration";
};
config.home.packages = with pkgs; lib.mkIf cfg.enable [

View file

@ -3,8 +3,8 @@ let
cfg = config.my.home.htop;
in
{
options.my.home.htop = with lib.my; {
enable = mkDisableOption "htop configuration";
options.my.home.htop = with lib; {
enable = my.mkDisableOption "htop configuration";
};
config.programs.htop = lib.mkIf cfg.enable {

View file

@ -3,8 +3,8 @@ let
cfg = config.my.home.jq;
in
{
options.my.home.jq = with lib.my; {
enable = mkDisableOption "jq configuration";
options.my.home.jq = with lib; {
enable = my.mkDisableOption "jq configuration";
};
config.programs.jq = lib.mkIf cfg.enable {

View file

@ -3,8 +3,8 @@ let
cfg = config.my.home.nix-index;
in
{
options.my.home.nix-index = with lib.my; {
enable = mkDisableOption "nix-index configuration";
options.my.home.nix-index = with lib; {
enable = my.mkDisableOption "nix-index configuration";
};
config.programs.nix-index = lib.mkIf cfg.enable {

View file

@ -3,8 +3,8 @@ let
cfg = config.my.home.pager;
in
{
options.my.home.pager = with lib.my; {
enable = mkDisableOption "pager configuration";
options.my.home.pager = with lib; {
enable = my.mkDisableOption "pager configuration";
};

View file

@ -3,8 +3,8 @@ let
cfg = config.my.home.ssh;
in
{
options.my.home.ssh = with lib.my; {
enable = mkDisableOption "ssh configuration";
options.my.home.ssh = with lib; {
enable = my.mkDisableOption "ssh configuration";
};
config.programs.ssh = lib.mkIf cfg.enable {

View file

@ -7,8 +7,10 @@ let
];
in
{
options.my.home.tmux = with lib.my; {
enable = mkDisableOption "tmux terminal multiplexer";
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
''
}
'';
};
}

View file

@ -18,8 +18,8 @@ let
];
in
{
options.my.home.vim = with lib.my; {
enable = mkDisableOption "vim configuration";
options.my.home.vim = with lib; {
enable = my.mkDisableOption "vim configuration";
};
config.programs.neovim = lib.mkIf cfg.enable {

View file

@ -3,8 +3,8 @@ let
cfg = config.my.home.xdg;
in
{
options.my.home.xdg = with lib.my; {
enable = mkDisableOption "XDG configuration";
options.my.home.xdg = with lib; {
enable = my.mkDisableOption "XDG configuration";
};
config.xdg = lib.mkIf cfg.enable {

View file

@ -3,20 +3,20 @@ let
cfg = config.my.system.documentation;
in
{
options.my.system.documentation = with lib.my; {
enable = mkDisableOption "Documentation integration";
options.my.system.documentation = with lib; {
enable = my.mkDisableOption "Documentation integration";
dev.enable = mkDisableOption "Documentation aimed at developers";
dev.enable = my.mkDisableOption "Documentation aimed at developers";
info.enable = mkDisableOption "Documentation aimed at developers";
info.enable = my.mkDisableOption "Documentation aimed at developers";
man = {
enable = mkDisableOption "Documentation aimed at developers";
enable = my.mkDisableOption "Documentation aimed at developers";
linux = mkDisableOption "Linux man pages (section 2 & 3)";
linux = my.mkDisableOption "Linux man pages (section 2 & 3)";
};
nixos.enable = mkDisableOption "NixOS documentation";
nixos.enable = my.mkDisableOption "NixOS documentation";
};
config = lib.mkIf cfg.enable {