diff options
| author | jstmax! <maxwasmailed@proton.me> | 2025-10-26 12:50:30 +0100 |
|---|---|---|
| committer | jstmax! <maxwasmailed@proton.me> | 2025-10-26 12:50:30 +0100 |
| commit | 75c92bd100a3b6e8c969a15b762f046672e9c644 (patch) | |
| tree | 65fa9b42b6d016084b975a588a90dee6ee9011ab /cfg/fish/fish_right_prompt.fish | |
| parent | 458248dc24c5e1a0bf0ef54b0802635b533cb720 (diff) | |
updated fish functions + doing some ordering und scheisse
Diffstat (limited to 'cfg/fish/fish_right_prompt.fish')
| -rw-r--r-- | cfg/fish/fish_right_prompt.fish | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/cfg/fish/fish_right_prompt.fish b/cfg/fish/fish_right_prompt.fish new file mode 100644 index 0000000..d9bf744 --- /dev/null +++ b/cfg/fish/fish_right_prompt.fish @@ -0,0 +1,28 @@ +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 %H:%M') + + # set battery capacity in bat + set bat $(cat /sys/class/power_supply/BAT0/capacity) + + # 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)" )" +end |