aboutsummaryrefslogtreecommitdiff
path: root/cfg/fish/fish_prompt.fish
diff options
context:
space:
mode:
authorczjstmax <jstmaxlol@disroot.org>2026-05-16 17:13:57 +0200
committerczjstmax <jstmaxlol@disroot.org>2026-05-16 17:13:57 +0200
commitfcd2c8c3de5778632f023d95ba55d9a9067ae2f2 (patch)
tree56c3ab3bc89fa5e798cea122a163a840458d474e /cfg/fish/fish_prompt.fish
parent882d198df77701a16e94f6c6f3766f299abbaced (diff)
new prompt
Signed-off-by: czjstmax <jstmaxlol@disroot.org>
Diffstat (limited to 'cfg/fish/fish_prompt.fish')
-rw-r--r--cfg/fish/fish_prompt.fish41
1 files changed, 30 insertions, 11 deletions
diff --git a/cfg/fish/fish_prompt.fish b/cfg/fish/fish_prompt.fish
index 916e276..b14256f 100644
--- a/cfg/fish/fish_prompt.fish
+++ b/cfg/fish/fish_prompt.fish
@@ -5,21 +5,40 @@ function fish_prompt
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⮞⮞⮞~)
- # ╰⮞
+ echo -e (set_color white)"("(set_color red)"$user"(set_color white)" at "(set_color red)"~"(set_color white)")\n" \
+ (set_color white)"λ "(set_color normal)
+ # max at ~
+ # λ
else if string match -q "$home/*" $cwd
set -l relative (string replace "$home/" "~/" $cwd)
+ set -l parts (string split "/" $relative)
+ set -l colored ""
+
+ for p in $parts
+ if test -n "$p"
+ set colored $colored(set_color white)$p(set_color red)"/"
+ end
+ end
+
+ set colored (string trim -r -c "/" $colored)
+
# 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)"⮞ "
+ echo -e (set_color white)"("(set_color red)"$user"(set_color white)" at "(set_color red)"$colored"(set_color white)")\n" \
+ (set_color white)"λ "(set_color normal)
else
+ set -l parts (string split "/" $cwd)
+ set -l colored ""
+
+ for p in $parts
+ if test -n "$p"
+ set colored $colored(set_color white)$p(set_color red)"/"
+ end
+ end
+
+ set colored (string trim -r -c "/" $colored)
+ set colored (set_color red)"#"$colored
# 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)"⮞ "
+ echo -e (set_color white)"("(set_color red)"$user"(set_color white)" at "(set_color red)"$colored"(set_color white)")\n" \
+ (set_color white)"λ "(set_color normal)
end
end