blob: 8346fb5fb94920792325fb913653a064db8600c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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 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 red)"( "(set_color $color)"$last_status"(set_color red)" |" \
(set_color white)"$bat%"(set_color red)" )"(set_color normal)
echo -e "\e[1B"
end
|