Audible or Visual warning if the batttery is about to give out

You could try this: [APP] Battery status on emulators

1 Like

Perfect. That should be installed and run by default I think and toggled off if you want to.

On the new version you can toggle it on and off but I haven´t released that version

Edit:2019-10-19T22:00:00Z BatMon - Battery Status on emulators for Clockwork OS v0.3

Good to know. Really helps to see the battery level when I start a game, you’d be surprised how quickly you forget you are playing.


Yeah, and your question why isnt by default installed is because its not an app from clockwork, they were trying their own option I think, on update 1.22 but something went wrong and they reverted that update

In launcher after 1.22
we switch TWM to Awesome for global notification window and prevent focus-stealing and maybe other features

This is an introduction to the pre-trial. if you are not good at linux console
Later, there will be an official release.
So do it on your own risk


Manually, you need ssh into gameshell

make sure you have launcher >= 1.21 running with bluetooth support(sudo apt-get install bluez bluetooth)

Upgrade launcher

currently there is no release hash for launcher ,so you just need to

cd /home/cpi/apps/launcher
git pull

then move launcher out of /home/cpi/apps/ to /home/cpi/

The launcher will become more independent so that we can backup the user data easier in the future

mkdir /home/cpi/apps/Menu

Create a folder named Menu , this folder is for games/apps

We can put our games/apps, which was previously needed to place in the /home/cpi/apps/launcher/Menu/GameShell , into this directory (not belong to launcher`s)

and the games/apps folder is the all-in-one style
the icon ,the startup script, and others be in one simple folder, no need to put icon and script apart like before(
scripts in /home/cpi/apps/launcher/Menu/GameShell and icons in /home/cpi/apps/launcher/skin/default/Menu/GameShell/)

games/apps folder examples:

All of the above examples come from the forum players, thank you all, I just borrowed , I hope you wouldn’t mind


Then change the bottom of /home/cpi/.bashrc to point X to use new .xinitrc inside launcher

if [ -f /tmp/autologin ]
        rm -f /tmp/autologin
        mpd ~/.mpd.conf
        startx /home/cpi/launcher/.xinitrc -- -nocursor > /dev/null 2>&1 


feh --bg-center ~/launcher/ 
exec ~/launcher/ &
exec ~/launcher/ &
exec awesome -c ~/launcher/awesome/rc.lua

Here is , new .xinitrc invoked a small widget called gsnotify


Though the readme of gsnotify ,there are 3 examples
one of them is the battery notify script


BAT_PNT=`upower -i $(upower -e | grep 'battery') | grep -E "state|to\ full|percentage" | awk '/perc/{print $2}' | cut -d % -f1 `

if [ "$BAT_PNT" -lt "20" ]; then
	if [ "$BAT_PNT" -lt "15" ]; then
			echo '{"type":"once","content":"Power<15%"}'

	if [ "$BAT_PNT" -lt "10" ]; then
		echo "keydown" | socat - UNIX-CONNECT:/tmp/gameshell
		echo '{"type":"repeat","content":"Power<10%,will poweroff soon"}'

	echo "keydown" | socat - UNIX-CONNECT:/tmp/gameshell
	echo '{"type":"once","content":"Power<20%"}'

	echo $BAT_PNT

the script use upower to check the battery ,get percent
and use socat to communicate launcher’s unix socket under /tmp/ to light the screen if the screen is in dark
and of cause ,print the message to gsnotify to show up

you can put the script into /home/cpi/launcher/ now

The gsnotify will do a round-robin check every 30s for the scripts under /home/cpi/launcher/ directory in simple json return formatted and
show a small window that slides down from the top, reminding the battery that it is nearly exhausted, etc.
and freely configurable

Install awesome and upower

sudo apt-get install awesome socat upower


Fix RetroArch issue

Even All is done ,you will not see any notifications while retroarch is running,because
the retroarch in GS ,is kind a wild window for X11 currently now
so change config to fix this issue by two lines:

in top of /home/cpi/.config/retroarch/retroarch.cfg

video_fullscreen = "false"
video_windowed_fullscreen = "true"



upgrade to debian buster to get newer software

in /etc/apt/source.list
change all source to buster
then upgrade the debian system

sudo apt-get update
sudo apt-get upgrade

sudo apt-get install awesome socat upower


At end:

In the new launcher , we use Awesome to deal on-top windows ,even the battery monitor widget can work better , no need to kill and re-launch it time by time

I apologize for my bad English. If you have any accidents during the actual operation or do not understand my explanation, please let me know, let’s do more tests together.


Currently the limitations of the battery widget come from the twm limitations, cant wait for awesome :smiley:

no need to kill and re-launch it time by time

In a version that I haven´t released yet, I dealt with that but lost transparency. It has a solid background.

Edit: Released BatMon - Battery Status on emulators

Glad to hear that you like it

you can try awesome , the new launcher now


I tried following the step by step until I got to the above instruction. I could not figure out what had to change to buster. So I carefully backtracked and returned everything to it’s previous state. Thank goodness I’m good at that! Back to normal…

yeah,that seems a risk

Though it’s ok to upgrade to buster, I’ve tested already

I found out that debian buster has python 3.6.5+,which is a requirement for

but Even not with buster, all steps and the launcher should works ,too

Change above instruction now, thanks @lasvegas

What do we change to buster in source.list? This is what I couldn’t figure out.

I’m stuck at the loading screen. :frowning:

Have done all the recent steps, added the line to .bashrc, checked .xinitrc (looks like your’s, upgraded my system like you told and moved the launcher.

Have any idea how to figure out what’s going wrong?

you can still ssh into gs right now,right?

if you can see the loading screen, means X is up ,that’s a good news

the lines in .bashrc should be replaced ,not add

and you can test the launcher by ssh if the launcher did not up,find out the reason

cpi@clockworkpi:~$ cd /home/cpi/launcher  
cpi@clockworkpi:~$ DISPLAY=:0 ./

Yes, that’s no problem. If I run your command, it says:

cpi@clockworkpi:~$ cd /home/cpi/launcher
cpi@clockworkpi:~/launcher$ DISPLAY=:0 ./
Traceback (most recent call last):
  File "", line 526, in <module>
  File "/home/cpi/launcher/", line 49, in setup_dbus
proxy_obj = bus.get_object("org.bluez", "/")
  File "/usr/lib/python2.7/dist-packages/dbus/", line 241, in get_object
  File "/usr/lib/python2.7/dist-packages/dbus/", line 248, in __init__
self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/", line 180, in activate_name_owner
  File "/usr/lib/python2.7/dist-packages/dbus/", line 278, in start_service_by_name
'su', (bus_name, flags)))
  File "/usr/lib/python2.7/dist-packages/dbus/", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files

it seems that there is no bluetooth on your GS

Sorry for that
I forgot to explicitly mention Bluetooth support in above instruction

did u update the kernel to support bluetooth?


sudo apt-get install bluez bluetooth

Install bluez to get the launcher up and running

But I suggest see wiki to enable bluetooth

and auto setup bluetooth script:

1 Like

Okay, that’s it. Thansk! Now I’m stuck with updating kernel and ulmage. ._.

if you don’t know how to update kernel ,you can leave it alone
just don’t get into bluetooth
I think the rest will work as same

soon will be an image contains new kernel and etc

Try here The GameShell runs debian.

Thanks Develroo!

I finally got the update to take and it worked beautifully… Until I updated the source.list and installed the update via apt-get. What resulted was an updated system, but all network connections disabled. No WiFi or USB-ETH. I ended up having to start from scratch and try again.

This time, when I got to the final update process, I fixed the source.list with:

sudo sed -i – ‘s/[us]’ /etc/apt/sources.list

And then I used aptitude to successfully update:

sudo aptitude update
sudo aptitude full-upgrade


Anyone interested in making up a GSNotify script for when you are at 100% charge!?