From 9c026b26c27e91ca547de310d0e79ea5247788fb Mon Sep 17 00:00:00 2001 From: Dennis Date: Tue, 9 Sep 2025 23:08:45 +0200 Subject: [PATCH] vterm setup --- hosts/dnsc-air/default.nix | 3 +++ modules/fish/default.nix | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/hosts/dnsc-air/default.nix b/hosts/dnsc-air/default.nix index d658cb6..2d259c1 100644 --- a/hosts/dnsc-air/default.nix +++ b/hosts/dnsc-air/default.nix @@ -61,6 +61,9 @@ imagemagick restic coreutils-prefixed + # Packages necessary for vterm + cmake + libtool ]; # Homebrew diff --git a/modules/fish/default.nix b/modules/fish/default.nix index c33aa49..8059ecf 100644 --- a/modules/fish/default.nix +++ b/modules/fish/default.nix @@ -77,6 +77,18 @@ if test -d (brew --prefix)"/share/fish/vendor_completions.d" set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d end + + function vterm_printf; + if begin; [ -n "$TMUX" ] ; and string match -q -r "screen|tmux" "$TERM"; end + # tell tmux to pass the escape sequences through + printf "\ePtmux;\e\e]%s\007\e\\" "$argv" + else if string match -q -- "screen*" "$TERM" + # GNU screen (screen, screen-256color, screen-256color-bce) + printf "\eP\e]%s\007\e\\" "$argv" + else + printf "\e]%s\e\\" "$argv" + end + end ''; shellAbbrs = {