diff options
| author | czjstmax <jstmaxlol@disroot.org> | 2026-05-16 17:13:57 +0200 |
|---|---|---|
| committer | czjstmax <jstmaxlol@disroot.org> | 2026-05-16 17:13:57 +0200 |
| commit | fcd2c8c3de5778632f023d95ba55d9a9067ae2f2 (patch) | |
| tree | 56c3ab3bc89fa5e798cea122a163a840458d474e /cfg/fish/fish_right_prompt.fish.old | |
| parent | 882d198df77701a16e94f6c6f3766f299abbaced (diff) | |
new prompt
Signed-off-by: czjstmax <jstmaxlol@disroot.org>
Diffstat (limited to 'cfg/fish/fish_right_prompt.fish.old')
| -rw-r--r-- | cfg/fish/fish_right_prompt.fish.old | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cfg/fish/fish_right_prompt.fish.old b/cfg/fish/fish_right_prompt.fish.old new file mode 100644 index 0000000..df41686 --- /dev/null +++ b/cfg/fish/fish_right_prompt.fish.old @@ -0,0 +1,32 @@ +function fish_right_prompt + set last_status $status + + # check for which color to use + if test $last_status -eq 0 + set color white + else + set color red + end + + # set inverse color + if test $color = "white" + set colorInverse red + else + set color white + end + + # set date in dt + #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)"stat.$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 |