diff options
| author | jstmax! <maxwasmailed@proton.me> | 2025-11-02 15:04:34 +0100 |
|---|---|---|
| committer | jstmax! <maxwasmailed@proton.me> | 2025-11-02 15:04:34 +0100 |
| commit | 3a261c77c2ad696c37036d69a0f414eeb2d37d0e (patch) | |
| tree | 083f66828d4f42bade84922375eba3b6b79e3e46 | |
| parent | 599e5e60d6d1364ccf1e2c2358b49fdee126f470 (diff) | |
fixed fish prompts / now the right one is up one line
| -rw-r--r-- | cfg/fish/fish_right_prompt.fish | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cfg/fish/fish_right_prompt.fish b/cfg/fish/fish_right_prompt.fish index d9bf744..aa38473 100644 --- a/cfg/fish/fish_right_prompt.fish +++ b/cfg/fish/fish_right_prompt.fish @@ -16,13 +16,17 @@ function fish_right_prompt end # set date in dt - set dt $(date '+%Y-%m-%d %H:%M') + set dt $(date '+%Y-%m-%d') # set battery capacity in bat set bat $(cat /sys/class/power_supply/BAT0/capacity) - + + # move up a line + echo -e "\e[1A" # print prompt echo -e (set_color $colorInverse)"( "(set_color $color)"$last_status"(set_color $colorInverse)" | " \ (set_color $color)"bat.$bat%"(set_color $colorInverse) " | " \ (set_color $color)"$dt"(set_color $colorInverse)" )" + # go back one line so the user doesn't overwrite fish_prompt + echo -e "\e[1B" end |