PINE64
Bash prompt temp batery Mobian ppp - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone Pro (https://forum.pine64.org/forumdisplay.php?fid=177)
+--- Forum: PinePhone Pro Software (https://forum.pine64.org/forumdisplay.php?fid=179)
+--- Thread: Bash prompt temp batery Mobian ppp (/showthread.php?tid=16026)



Bash prompt temp batery Mobian ppp - iopser - 02-08-2022

Hi .
Well i was trying Mobian  and i love the little tweak of adding on .bashrc the battery prompted when ssh connection.
and i realize the path have change and  variables and so, and still there is no wiki so i will share here.
The new thing is just adding and change a couple of things, here we go:
I just create a var.  CAPACI and call it with the new  path.

Code:
# -= start battery prompt =-
battery_status(){
BATTERY=/sys/class/power_supply/rk818-charger/ #meu ppp ficar vari CAPACI nou path
CAPACI=/sys/class/power_supply/battery/ # mee ppp crido CAPACI nou path
BATSTATE=$(cat ${BATTERY}/status)
CHARGE=$(cat ${CAPACI}/capacity)
rest of the code dont change.




note:  powersuply app happens the same.
that's it. Should work with this.

ello.