RetroFed Forum
Your home away from modern life.
how make prompt PS1 Dynamic ? (battery status)
Post Reply
AuthorMessage
rmc0 lemmy.ml rmc0@lemmy.ml
Joined: 2020-04-10
Quote

HI,

I don't use bar and status, only WM and some apps, so I use PS1 for see clock and battery status, clock change each time I enter a new prompt line but status battery change only with new shell

example :

PS1="$(cat /sys/class/power_supply/BAT0/capacity)% \A"

thanks

1   Original
Post Reply
Back to top