From 0e1403bdd5eb312053beabbd7bdab6cf4d86a876 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Sat, 4 Jan 2025 13:10:11 +0100 Subject: [PATCH] wezterm: ssh domain user variable --- home/config/wezterm/config.fnl | 4 +++- home/programs/zsh/functions/mediaservercmd | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/home/config/wezterm/config.fnl b/home/config/wezterm/config.fnl index bae8e00..6eb91c7 100644 --- a/home/config/wezterm/config.fnl +++ b/home/config/wezterm/config.fnl @@ -94,7 +94,9 @@ (extract-tab-info (t:gsub "^op%srun%s%-%-%s(.*)" "%1")) _ {: title :icon " " :color colors.shell})) - (fn is-ssh-domain [pane] (= (string.sub pane.domain_name 1 3) :SSH)) + (fn is-ssh-domain [pane] + (or (= (?. pane :user_vars :cmd_domain) :ssh) + (= (string.sub pane.domain_name 1 3) :SSH))) (fn show-tab-activity-indicator [panes] (each [_ pane (ipairs panes)] diff --git a/home/programs/zsh/functions/mediaservercmd b/home/programs/zsh/functions/mediaservercmd index 41da239..ca9b9f9 100755 --- a/home/programs/zsh/functions/mediaservercmd +++ b/home/programs/zsh/functions/mediaservercmd @@ -1 +1,5 @@ +printf "\033]1337;SetUserVar=%s=%s\007" cmd_domain `echo -n ssh | base64` + et -c "$*" mediaserver + +printf "\033]1337;SetUserVar=%s=%s\007" cmd_domain `echo -n local | base64`