Skip to content

The “╭─'” prompt can be too dark #28

@alexislefebvre

Description

@alexislefebvre

I use the dark GNOME theme in gnome-terminal.

Capture d’écran du 2023-12-31 20-12-11

Lines 1 and 2 use the default theme, so hostcolor is used:

set -l hostcolor (set_color (uname -n | md5sum | cut -f1 -d' ' | tr -d '\n' | tail -c6))

As you can see on the screenshot, the name of the machine is “serveur”, and it causes the issue.

The colour of the prompt is the same as the result of this command:

echo "serveur" | md5sum | cut -f1 -d' ' | tr -d '\n' | tail -c6
1d410f

Lines 3 and 4 use a patch

I forced the colour on this environment:

diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish
index 68b8125..7de249f 100644
--- a/functions/fish_prompt.fish
+++ b/functions/fish_prompt.fish
@@ -16,7 +16,7 @@ function fish_prompt
   end
 
   # Setup colors
-  set -l hostcolor (set_color (uname -n | md5sum | cut -f1 -d' ' | tr -d '\n' | tail -c6))
+  set -l hostcolor (set_color 803080)

Proposals

I don't have any idea to solve this, hostcolor may only use a color than is not too light or dark. Or a background may be used so that the prompt always have some contrast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions