My script with uptime, CPU load, battery level (or two, see below), RAM free and (battery) temperature:

Also the temperature display needs the Power Kernel.
The script:
echo -n "Up:";uptime |cut -d " " -f 4- ;
echo "Battery level: `lshal|grep percentage|tr -s " "|cut -d " " -f 4|sort -n|head -1` %";
awk '/mT/ {memttl = $2}; /mF/ {memfre = $2}; /Bu/ {membff = $2}; $1 == "Cached:" {memcch = $2} END {printf ("RAM free: %.1f MB\n",(memttl-memfre-membff-memcch)/1024)}' /proc/meminfo;
echo Temp: `cat /sys/class/power_supply/bq27200-0/temp`
How to:
1. Install Desktop Command Execution Widget using app manager
2. Touch the desktop background, then the gear icon
3. Desktop menu -> Add widget
4. Desktop Command Execution Widget
5. Touch the wrench icon on the new widget that initially shows time and uptime
6. Add Cmd
7. Title="Show all" or whatever you like, script cut'n'paste as above, Save
8. Configure the settings:
- Select the saved command with the "Commands" button, if not already selected
- Width = 0.60(adjust if needed)
- Height = 4.3 (adjust if needed)
- Uncheck "Display Title" (just takes space)
- Check all the "Update" checkboxes
- Update interval = 1 minute, for example
- Network presence = Disabled
9. Save, Done
You should now see the display as in the image above. Only one battery level display and no temperature unless the bq27x00-battery kernel module is loaded.
How to enable the battery kernel module:
1. Install "Enhanced Linux kernel for power users" and "Enhanced Linux kernel for power users (settings)" with app manager
2. Open X-Term with user root
3. Create this file:
/root/startup.sh:
#!/bin/sh
modprobe bq27x00-battery
3. chmod u+x /root/startup.sh
4. Run that file as root. Needs to be run every time the device is restarted, I do it by hitting the "root XTerm" icon on my desktop and "./st
Ei kommentteja:
Lähetä kommentti