From 3cf43fb8f472c05f0a8b86ae54a5c50f15d44b62 Mon Sep 17 00:00:00 2001 From: Ariel Barreiro Date: Thu, 4 Apr 2024 14:02:33 -0300 Subject: [PATCH] window title tweaks and also on starship now --- .ddev/addon-metadata/pimp-my-shell/manifest.yaml | 2 +- .ddev/homeadditions/.bashrc.d/pimp-my-shell.sh | 5 +++++ .ddev/homeadditions/.config/fish/conf.d/pimp-my-shell.fish | 2 +- homeadditions/.bashrc.d/pimp-my-shell.sh | 5 +++++ homeadditions/.config/fish/conf.d/pimp-my-shell.fish | 2 +- 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.ddev/addon-metadata/pimp-my-shell/manifest.yaml b/.ddev/addon-metadata/pimp-my-shell/manifest.yaml index b656d86..2256c23 100644 --- a/.ddev/addon-metadata/pimp-my-shell/manifest.yaml +++ b/.ddev/addon-metadata/pimp-my-shell/manifest.yaml @@ -1,7 +1,7 @@ name: pimp-my-shell repository: . version: "" -install_date: "2024-04-03T15:36:03-03:00" +install_date: "2024-04-04T14:01:25-03:00" project_files: - web-build/Dockerfile.pimp-my-shell - homeadditions/.bashrc.d/pimp-my-shell.sh diff --git a/.ddev/homeadditions/.bashrc.d/pimp-my-shell.sh b/.ddev/homeadditions/.bashrc.d/pimp-my-shell.sh index 6e6e122..ea7838c 100644 --- a/.ddev/homeadditions/.bashrc.d/pimp-my-shell.sh +++ b/.ddev/homeadditions/.bashrc.d/pimp-my-shell.sh @@ -26,4 +26,9 @@ if [[ "$BASHOPTS" =~ login_shell ]]; then fi # starship prompt +function set_win_title(){ + echo -ne "\033]0; ddev[$DDEV_PROJECT]@$PWD - $@\007" +} +starship_precmd_user_func="set_win_title" eval "$(starship init bash)" +trap "set_win_title \${BASH_COMMAND}" DEBUG diff --git a/.ddev/homeadditions/.config/fish/conf.d/pimp-my-shell.fish b/.ddev/homeadditions/.config/fish/conf.d/pimp-my-shell.fish index 3625481..1ba7676 100644 --- a/.ddev/homeadditions/.config/fish/conf.d/pimp-my-shell.fish +++ b/.ddev/homeadditions/.config/fish/conf.d/pimp-my-shell.fish @@ -1,4 +1,4 @@ #ddev-generated function fish_title - echo "ddev[$DDEV_PROJECT]@"(fish_prompt_pwd_dir_length=1 prompt_pwd) $argv + echo "ddev[$DDEV_PROJECT]@"(fish_prompt_pwd_dir_length=1 prompt_pwd) - $argv end diff --git a/homeadditions/.bashrc.d/pimp-my-shell.sh b/homeadditions/.bashrc.d/pimp-my-shell.sh index 6e6e122..ea7838c 100644 --- a/homeadditions/.bashrc.d/pimp-my-shell.sh +++ b/homeadditions/.bashrc.d/pimp-my-shell.sh @@ -26,4 +26,9 @@ if [[ "$BASHOPTS" =~ login_shell ]]; then fi # starship prompt +function set_win_title(){ + echo -ne "\033]0; ddev[$DDEV_PROJECT]@$PWD - $@\007" +} +starship_precmd_user_func="set_win_title" eval "$(starship init bash)" +trap "set_win_title \${BASH_COMMAND}" DEBUG diff --git a/homeadditions/.config/fish/conf.d/pimp-my-shell.fish b/homeadditions/.config/fish/conf.d/pimp-my-shell.fish index 3625481..1ba7676 100644 --- a/homeadditions/.config/fish/conf.d/pimp-my-shell.fish +++ b/homeadditions/.config/fish/conf.d/pimp-my-shell.fish @@ -1,4 +1,4 @@ #ddev-generated function fish_title - echo "ddev[$DDEV_PROJECT]@"(fish_prompt_pwd_dir_length=1 prompt_pwd) $argv + echo "ddev[$DDEV_PROJECT]@"(fish_prompt_pwd_dir_length=1 prompt_pwd) - $argv end