BatMon is a Clockwork Pi app that creates an overlay with the battery percentage on top of emulators or games, because you can only see that information in the main menu, this is my attempt on solving that issue.
Changelog:
2020-01-16T23:00:00Z
- Ported to Qt5.
- Even less steps to install.
- Optimization and improvements (Less CPU Cycles).
- Code cleaning and refactoring.
Apr 23, '19 3:59 PM
- Now supports OS v0.3.
- Now it only runs once and stays alive, previosly a script called and killed the process which was unefficient.
- User can set a custom update interval from the caller script, previosly you had to recompile.
- Can be toggled on and off from menu, previosly once you ran it it stayed until reboot.
- Now includes a clock feature
- Easier to install.
- Removed the pseudo transparency and replaced it with black background.
How to install?
You need to go to Releases · Mihaylov93/BatMon · GitHub and get the latest release. (currently its the 0.5)
You can download BatMon.tar.gz to your computer and copy it to your gameshell or download it from the gameshell.
Once you have BatMon.tar.gz on your gameshell, you need to execute the following commands:
tar -zxvf BatMon-0.5.tar.gz -C /home/cpi/apps/Menu/
Then you need to reload the launcher and it will appear there thats all.
How to use?
There are 3 modes, battery only, battery and clock in horizontal layout and battery and clock in vertical layout. The default mode is battery only with 30 seconds interval, if you want to customize that you need to change the launcher script located in /home/cpi/apps/Menu/BatMon
The content of the script looks like this:
#!/bin/bash
APP_ID=$(ps -C BatMon --no-header --format 'pid')
if [ -n "${APP_ID}" ]; then
echo "Stopping instance $APP_ID"
kill "${APP_ID}"
else
# You can change the refresh time in seconds and/or the mode
./BatMon 30 &
fi
exit
The line you need to change is this: ./BatMon 30 &
Examples:
- Default mode (Mode 0):
There are 4 ways that the app will enter in default mode:
- You call it without arguments, for example: ./BatMon &
- You call it with 1 argument setting up the refresh seconds, for exampe: ./BatMon 30 &
- You call it with 2 arguments, setting the seconds and the mode 0 (Default) ./BatMon 30 0 &
- You enter wrong arguments and the app entered default mode with 30 seconds. For example ./BatMon bla bla &
-
Battery and clock in horizontal (Mode 1):
To enter this mode you need to set the second argument to 1, for example: ./BatMon 30 1 & -
Battery and clock in vertical (Mode 2):
To enter this mode you need to set the second argument to 1, for example: ./BatMon 30 2 &
But I want to compile it myself!
Fair enough, if you want to compile it yourself clone the repository with git clone https://github.com/Mihaylov93/BatMon.git
This was made with Qt5, check your version of Qt with qmake --version
qmake BatmMon.pro
make
If make ran succesfully you don’t need to do anything else, BatMon will be installed in your launcher.
Links:
Source code: GitHub - Mihaylov93/BatMon: Battery monitoring widget for Clockwork Pi
Releases: Releases · Mihaylov93/BatMon · GitHub