Compare commits
5 commits
2e1f408dbf
...
3f1840b42c
| Author | SHA1 | Date | |
|---|---|---|---|
| 3f1840b42c | |||
| 773d26598e | |||
| cc1a4b0d4c | |||
| 09b4b47fb2 | |||
| 1f3e435947 |
4 changed files with 33 additions and 2 deletions
|
|
@ -29,6 +29,8 @@
|
||||||
terminalFeatures = {
|
terminalFeatures = {
|
||||||
# HTerm uses `xterm-256color` as its `$TERM`, so use that here
|
# HTerm uses `xterm-256color` as its `$TERM`, so use that here
|
||||||
xterm-256color = { };
|
xterm-256color = { };
|
||||||
|
# Terminal app uses `xterm.js`, not HTerm
|
||||||
|
"xterm.js" = { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@
|
||||||
terminalFeatures = {
|
terminalFeatures = {
|
||||||
# HTerm uses `xterm-256color` as its `$TERM`, so use that here
|
# HTerm uses `xterm-256color` as its `$TERM`, so use that here
|
||||||
xterm-256color = { };
|
xterm-256color = { };
|
||||||
|
# Terminal app uses `xterm.js`, not HTerm
|
||||||
|
"xterm.js" = { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,16 @@ let
|
||||||
(config.my.home.wm.windowManager != null)
|
(config.my.home.wm.windowManager != null)
|
||||||
];
|
];
|
||||||
|
|
||||||
mkTerminalFeature = opt: flag:
|
mkTerminalFlag = tmuxVar: opt: flag:
|
||||||
let
|
let
|
||||||
mkFlag = term: ''set -as terminal-features ",${term}:${flag}"'';
|
mkFlag = term: ''set -as ${tmuxVar} ",${term}:${flag}"'';
|
||||||
enabledTerminals = lib.filterAttrs (_: v: v.${opt}) cfg.terminalFeatures;
|
enabledTerminals = lib.filterAttrs (_: v: v.${opt}) cfg.terminalFeatures;
|
||||||
terminals = lib.attrNames enabledTerminals;
|
terminals = lib.attrNames enabledTerminals;
|
||||||
in
|
in
|
||||||
lib.concatMapStringsSep "\n" mkFlag terminals;
|
lib.concatMapStringsSep "\n" mkFlag terminals;
|
||||||
|
|
||||||
|
mkTerminalFeature = mkTerminalFlag "terminal-features";
|
||||||
|
mkTerminalOverride = mkTerminalFlag "terminal-overrides";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.home.tmux = with lib; {
|
options.my.home.tmux = with lib; {
|
||||||
|
|
@ -28,6 +31,8 @@ in
|
||||||
hyperlinks = my.mkDisableOption "hyperlinks through OSC8";
|
hyperlinks = my.mkDisableOption "hyperlinks through OSC8";
|
||||||
|
|
||||||
trueColor = my.mkDisableOption "24-bit (RGB) color support";
|
trueColor = my.mkDisableOption "24-bit (RGB) color support";
|
||||||
|
|
||||||
|
underscoreStyle = my.mkDisableOption "underscore style/color support";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -54,6 +59,20 @@ in
|
||||||
terminal = "tmux-256color"; # I want accurate termcap info
|
terminal = "tmux-256color"; # I want accurate termcap info
|
||||||
aggressiveResize = true; # Automatic resize when switching client size
|
aggressiveResize = true; # Automatic resize when switching client size
|
||||||
|
|
||||||
|
# FIXME
|
||||||
|
# * Sixel support
|
||||||
|
# * OSC 133 prompt integration
|
||||||
|
# FIXME: when sensible-on-top is disabled: check if any of those are unset
|
||||||
|
# * tmux bind-key $prefix_without_ctrl last-window
|
||||||
|
# *
|
||||||
|
# * tmux bind-key C-b send-prefix: included
|
||||||
|
# * aggressive resize? done
|
||||||
|
# * tmux bind-key C-p previous-window: done
|
||||||
|
# * tmux bind-key C-n next-window: done
|
||||||
|
# * C-r to refresh my config: done
|
||||||
|
# * tmux set-option -g focus-events on: done
|
||||||
|
|
||||||
|
# FIXME: make PRs for `bind-key` description
|
||||||
plugins = with pkgs.tmuxPlugins; builtins.filter (attr: attr != { }) [
|
plugins = with pkgs.tmuxPlugins; builtins.filter (attr: attr != { }) [
|
||||||
# Open high-lighted files in copy mode
|
# Open high-lighted files in copy mode
|
||||||
open
|
open
|
||||||
|
|
@ -126,6 +145,11 @@ in
|
||||||
${mkTerminalFeature "hyperlinks" "hyperlinks"}
|
${mkTerminalFeature "hyperlinks" "hyperlinks"}
|
||||||
# Force 24-bit color for each relevant $TERM
|
# Force 24-bit color for each relevant $TERM
|
||||||
${mkTerminalFeature "trueColor" "RGB"}
|
${mkTerminalFeature "trueColor" "RGB"}
|
||||||
|
# Force underscore style/color for each relevant $TERM
|
||||||
|
${mkTerminalFeature "underscoreStyle" "usstyle"}
|
||||||
|
# FIXME: see https://github.com/folke/tokyonight.nvim#fix-undercurls-in-tmux for additional overrides
|
||||||
|
# ${mkTerminalOverride "underscoreStyle" "Smulx=\\E[4::%p1%dm"}
|
||||||
|
# ${mkTerminalOverride "underscoreStyle" "Setulc=\\E[58::2::::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m"}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,4 +56,7 @@ in
|
||||||
XCOMPOSECACHE = "${dataHome}/X11/xcompose";
|
XCOMPOSECACHE = "${dataHome}/X11/xcompose";
|
||||||
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${configHome}/java";
|
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${configHome}/java";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Some modules *optionally* use `XDG_*_HOME` when told to
|
||||||
|
config.home.preferXdgDirectories = lib.mkIf cfg.enable true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue