From 34c54c5bf40251eef344ad1cffab3b4429116657 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Thu, 1 Sep 2022 08:05:04 +0200 Subject: [PATCH] feat(zsh): set window title to current directory name --- home-manager/zsh.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/home-manager/zsh.nix b/home-manager/zsh.nix index 8d9d4da..f5e3e4f 100644 --- a/home-manager/zsh.nix +++ b/home-manager/zsh.nix @@ -9,6 +9,14 @@ in enableCompletion = true; history.size = 10000; + initExtra = '' + function set_win_title(){ + echo -ne "\033]0; $(basename "$PWD") \007" + } + + precmd_functions+=(set_win_title) + ''; + sessionVariables = { ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = zsh_autosuggest_highlight_style; };