Having great fun playing with the gameshell however just got a little miffed when I just completed a boss fight and was about to save when the battery gave out. Arrrg
So is there a chance that there can be some sort of audible warning or a quick flash on screen when the battery is say 10% or 5% and needs charging sooner not later?
Would certainly cut down on frustration , trust me.
Thanks for such a compelling product.
PS. I did post this as a git issue first cause I completely forgot about the forum. Doh! my bad… and I can remove it from git if you want.
There’s a thread on here for some Git code to display a battery indicator. You could put this kind of update into that thread. For me I don’t think it’ll work as I use the battery indicator but the console just turned off at a fairly high percentage. The first time it turned off about 19%. It’s likely my battery needing charged more as I never gave it a long charge but still have a look for the thread and that might help.
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 ]
then
rm -f /tmp/autologin
mpd ~/.mpd.conf
startx /home/cpi/launcher/.xinitrc -- -nocursor > /dev/null 2>&1
fi
Though the readme of gsnotify ,there are 3 examples
one of them is the battery notify script
#!/bin/bash
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%"}'
fi
if [ "$BAT_PNT" -lt "10" ]; then
echo "keydown" | socat - UNIX-CONNECT:/tmp/gameshell
echo '{"type":"repeat","content":"Power<10%,will poweroff soon"}'
fi
echo "keydown" | socat - UNIX-CONNECT:/tmp/gameshell
echo '{"type":"once","content":"Power<20%"}'
else
echo $BAT_PNT
fi
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/sys.py/gsnotify/Jobs now
The gsnotify will do a round-robin check every 30s for the scripts under /home/cpi/launcher/sys.py/gsnotify/Jobs 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
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
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.
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…
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?
Yes, that’s no problem. If I run your command, it says:
cpi@clockworkpi:~$ cd /home/cpi/launcher
cpi@clockworkpi:~/launcher$ DISPLAY=:0 ./load.sh
Traceback (most recent call last):
File "run.py", line 526, in <module>
setup_dbus()
File "/home/cpi/launcher/sys.py/libs/DBUS/__init__.py", line 49, in setup_dbus
proxy_obj = bus.get_object("org.bluez", "/")
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", 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