From 646c43f8d7df66a2f2971f7246ce2715a11b2b16 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Sun, 30 Apr 2023 20:20:26 -0400 Subject: [PATCH] fish: root prompt with # --- src/.config/fish/config.fish | 4 ++++ src/.config/fish/functions/prompts.fish | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/.config/fish/config.fish b/src/.config/fish/config.fish index d2d224b..2d491c6 100644 --- a/src/.config/fish/config.fish +++ b/src/.config/fish/config.fish @@ -1,3 +1,7 @@ +if test -z "$SYSTEM_PROFILE" + set -gx SYSTEM_PROFILE SLIM +end + source ~/.config/fish/aliases.fish # Set GPG_TTY diff --git a/src/.config/fish/functions/prompts.fish b/src/.config/fish/functions/prompts.fish index f2ad31d..20b2452 100644 --- a/src/.config/fish/functions/prompts.fish +++ b/src/.config/fish/functions/prompts.fish @@ -41,5 +41,10 @@ function fish_right_prompt (set_color normal) end function fish_prompt - printf '%s%s%s> ' (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) + if fish_is_root_user + set letter '#' + else + set letter '>' + end + printf '%s%s%s%s ' (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) $letter end