From fcd2c8c3de5778632f023d95ba55d9a9067ae2f2 Mon Sep 17 00:00:00 2001 From: czjstmax Date: Sat, 16 May 2026 17:13:57 +0200 Subject: new prompt Signed-off-by: czjstmax --- cfg/fish/fish_prompt.fish.old | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 cfg/fish/fish_prompt.fish.old (limited to 'cfg/fish/fish_prompt.fish.old') diff --git a/cfg/fish/fish_prompt.fish.old b/cfg/fish/fish_prompt.fish.old new file mode 100644 index 0000000..916e276 --- /dev/null +++ b/cfg/fish/fish_prompt.fish.old @@ -0,0 +1,25 @@ +function fish_prompt + set -l user $USER + set -l cwd $PWD + set -l home $HOME + + if test "$cwd" = "$home" + # if in ~ + echo -e (set_color white)"╭"(set_color red)"("(set_color white)"$user" \ + (set_color red)"⮞"(set_color white)"⮞"(set_color red)"⮞" \ + (set_color white)"~"(set_color red)")"(set_color red)"\n╰"(set_color normal)"⮞ " + # ╭(max⮞⮞⮞~) + # ╰⮞ + else if string match -q "$home/*" $cwd + set -l relative (string replace "$home/" "~/" $cwd) + # if in a ~ subdir + echo -e (set_color white)"╭"(set_color red)"("(set_color white)"$user" \ + (set_color red)"⮞"(set_color white)"⮞"(set_color red)"⮞" \ + (set_color white)$relative(set_color red)")"(set_color red)"\n╰"(set_color normal)"⮞ " + else + # if in any other dir + echo -e (set_color white)"╭"(set_color red)"("(set_color white)"$user" \ + (set_color red)"⮞"(set_color white)"⮞"(set_color red)"⮞" \ + (set_color white)$cwd(set_color red)")"(set_color red)"\n╰"(set_color normal)"⮞ " + end +end -- cgit v1.3.1