From a73a5a7df07e2f0acd5e7c56a277db3440b2cfbd Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Thu, 1 Sep 2022 08:21:09 +0200 Subject: [PATCH] feat(zsh): set window title to git repo url basename if available --- home-manager/zsh.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/home-manager/zsh.nix b/home-manager/zsh.nix index f5e3e4f..23e8a1a 100644 --- a/home-manager/zsh.nix +++ b/home-manager/zsh.nix @@ -11,7 +11,8 @@ in initExtra = '' function set_win_title(){ - echo -ne "\033]0; $(basename "$PWD") \007" + local TITLE=$(git config --get remote.origin.url || echo "$PWD") + echo -ne "\033]0; $(basename "$TITLE") \007" } precmd_functions+=(set_win_title)