maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   [Support thread] Battery Overlay (https://talk.maemo.org/showthread.php?t=94717)

coderus 2015-03-10 16:51

[Support thread] Battery Overlay
 
Simple colored line on top of everything to display battery charge percentage.

Github: https://github.com/CODeRUS/harbour-batteryoverlay2
Openrepos: https://openrepos.net/content/coderus/battery-overlay-2

mousse04 2015-03-11 08:11

Re: [Support thread] Battery Overlay
 
Hi Coderus,

as discussed on Twitter, for me what will be useful is :

-1- To get transparency on either charged or uncharged part. Because we don't need to have information on charged level and uncharged level as both of them are connected (charged = 100 - uncharged).
So, from my point of view, I would set charged as transparent, and uncharged as red, then when my device will be uncharged a lot, a big red line will appear.

-2- Getting this red line only when battery is under a certain threshold. Finally I don't care about my battery being at 60% (so 40% discharged).
But what I want is a line showing that my battery is under, let say, 30%.

-3- Being able to put the line at the bottom instead of top

This is only some ideas, maybe some of them are stupid or not useful :)

coderus 2015-03-12 08:19

Re: [Support thread] Battery Overlay
 
Application updated to v0.2.0 with many new features!

mousse04 2015-03-12 08:43

Re: [Support thread] Battery Overlay
 
Thanks Coderus,, you've implemented all my ideas :).

az2111 2015-03-12 16:29

Re: [Support thread] Battery Overlay
 
what about autostart of battery overlay?

coderus 2015-03-12 16:38

Re: [Support thread] Battery Overlay
 
Quote:

Originally Posted by az2111 (Post 1463873)
what about autostart of battery overlay?

application also publishing in Harbour, so i can't make autostarrt for it and also don't want to make separate version for openrepos :)

ejjoman 2015-03-12 16:46

Re: [Support thread] Battery Overlay
 
This really needs to be fixed by Jolla... It is so annoying that services / auto starting apps are not allowed in harbour :mad:

n900user259 2015-03-12 16:49

Re: [Support thread] Battery Overlay
 
Very nice App! However the pulley menu always shows 'start Overlay'. Is this intentional? How do I stop Overlay?

Also I don't exactly know what the 'Apply gradient opacity fade' is supposed to do but it doesn't seem to be doing anything. Could you perhaps explain the function?

coderus 2015-03-12 17:19

Re: [Support thread] Battery Overlay
 
Quote:

Originally Posted by n900user259 (Post 1463877)
Very nice App! However the pulley menu always shows 'start Overlay'. Is this intentional? How do I stop Overlay?

Also I don't exactly know what the 'Apply gradient opacity fade' is supposed to do but it doesn't seem to be doing anything. Could you perhaps explain the function?

killall harbour-batteryoverlay if you didn't closed overlay before upgrade. and to see how function works increase height of line.

n900user259 2015-03-12 21:55

Re: [Support thread] Battery Overlay
 
Great stuff! Works like a charm. Thanks!

hlev80 2015-04-03 10:18

Re: [Support thread] Battery Overlay
 
Does no more, no less, than what it should, great app.

I understand harbour apps cannot autostart, but I was thinking maybe it would be possible to be done manually with systemd. No success so far.

I created a .service file

/etc/systemd/system/batteryoverlay.service
Code:

[Unit]
Description=Start Battery Overlay

[Service]
ExecStart=/usr/bin/harbour-batteryoverlay

[Install]
WantedBy=multi-user.target

Tried enabling it, then reboot, but it fails.
As a second attempt I created a .timer for it.

/etc/systemd/system/batteryoverlay.timer
Code:

[Unit]
Description=Start Battery Overlay

[Timer]
OnStartupSec=45

[Install]
WantedBy=multi-user.target

After disabling the service, enabling the timer + reboot, it still fails.
Being new to systemd I'm probably missing something, but maybe someone can improve this approach.

juiceme 2015-04-03 17:23

Re: [Support thread] Battery Overlay
 
Without trying it myself, I'd rather guess you want to invoke it as user service rather than system service.
Also, make sure it starts after UI session, either it probably fails.

Schturman 2015-04-03 19:39

Re: [Support thread] Battery Overlay
 
hlev80, try this:
Code:

[Unit]
Description=Start Battery Overlay
After=ofono.service

[Service]
Type=simple
Environment="DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/100000/dbus/user_bus_socket"
ExecStart=/usr/bin/harbour-batteryoverlay

[Install]
WantedBy=multi-user.target

Give to this name like: overlayautostrat.service
and put it to: /lib/systemd/system
run as ROOT:
Code:

systemctl enable overlayautostrat.service

UPDATE:
Just now tested and it also not work :D

coderus 2015-04-03 21:04

Re: [Support thread] Battery Overlay
 
will try to add some hidden hack for enabling autostart. fooling harbour QA should be easy :)

hlev80 2015-04-04 11:23

Re: [Support thread] Battery Overlay
 
Thank you all!

As said, I haven't been too familiar with systemd. I looked up how to deploy a user service and it works that way. :)

/etc/systemd/user/batteryoverlay.service
Code:

[Unit]
Description=Start Battery Overlay

[Service]
ExecStart=/usr/bin/harbour-batteryoverlay

[Install]
WantedBy=default.target

I used a .timer as well to be safe and assumed everything it needs is started by then. (45sec is a bit long though, UI was ready in ~30)

/etc/systemd/user/batteryoverlay.timer
Code:

[Unit]
Description=Start Battery Overlay

[Timer]
OnStartupSec=45

[Install]
WantedBy=default.target

As root:
systemctl --user enable batteryoverlay.timer

Schturman 2015-04-05 06:23

Re: [Support thread] Battery Overlay
 
hlev80, thanks it work after reboot, but it not work after homescreen refresh (lipstick) :(
I tried to add "After=lipstick.service" under Unit in both files, but still not work..

nieldk 2015-04-05 07:27

Re: [Support thread] Battery Overlay
 
Try to add
Restart =always

Schturman 2015-04-05 07:39

Re: [Support thread] Battery Overlay
 
Yes, already fixed :)
service:
Code:

[Unit]
Description=Start Battery Overlay
After=lipstick.service

[Service]
ExecStart=/usr/bin/harbour-batteryoverlay
Restart=always

[Install]
WantedBy=default.target


Schturman 2015-04-05 10:25

Re: [Support thread] Battery Overlay
 
if someone want here is a small package for this. It will auto enable after installation, and just reboot your phone once after installstion.
Icon for easy remove.. ;)
https://db.tt/lWbVl5pO

hlev80 2015-04-06 07:18

Re: [Support thread] Battery Overlay
 
Quote:

Originally Posted by Schturman (Post 1465792)
Yes, already fixed :)
service:
Code:

[Unit]
Description=Start Battery Overlay
After=lipstick.service

[Service]
ExecStart=/usr/bin/harbour-batteryoverlay
Restart=always

[Install]
WantedBy=default.target


I guess this works without the timer already.

Schturman 2015-04-06 10:58

Re: [Support thread] Battery Overlay
 
Quote:

Originally Posted by hlev80 (Post 1465858)
I guess this works without the timer already.

I didn't check it without timer, just packaged as is and checked on my device a few times (after reboot and after homescreen refresh). Work very good and almost without delay. :)

hlev80 2015-04-06 11:52

Re: [Support thread] Battery Overlay
 
Quote:

Originally Posted by Schturman (Post 1465876)
I didn't check it without timer, just packaged as is and checked on my device a few times (after reboot and after homescreen refresh). Work very good and almost without delay. :)

I checked, it works without the timer, but it interferes with the PIN code prompt.

As you type in the PIN digits, batteryoverlay starts and the already entered digits are erased. It would be nice if the autostart could be tied to an event that is fired after the PIN is entered and is accepted.

Schturman 2015-04-06 12:03

Re: [Support thread] Battery Overlay
 
Maybe for this it prefer to leave the timer ?

kaktux 2015-09-26 08:24

Re: [Support thread] Battery Overlay
 
First thanks for that great programm (which in my opinion could replace the "normal" jolla battery notification!)

I got two things on my mind:
First an idea for improvment: As batterys are lasting the longest when kept between 20-80% load it would be great if this could be indicated (by a note or colour change or something like that).

Second: maybe a more general idea. I remember a "robots" app from nokia ovi beta - where the programm did "automatize" some stuff. Guess as its buried deep in my mind the only actual thing i remember from that was a reminder: like it measures and logs your standard battery usage - and knows when you usually go to sleep. So it gives you a message in the evening, when your battery won't last through the day so you can load it overnight.

And agin: great app - thanks for that.

coderus 2015-09-26 08:30

Re: [Support thread] Battery Overlay
 
First thing you can do yourself by going to battery overlay settings and set threshold you want
Second idea not for this application. I'm keeping it small and simple, and wont add any functions to store battery usage, measures and any other advanced features.

R1v3r 2016-09-29 09:20

Re: [Support thread] Battery Overlay
 
Hello, Stupid(?) question..

it says crate file to home\nemo for autostart.

Could you give "code" for terminal to do this?

Sorry. Thanks!

coderus 2016-09-29 09:30

Re: [Support thread] Battery Overlay
 
touch /home/nemo/batteryoverlay.autostart

R1v3r 2016-09-29 10:18

Re: [Support thread] Battery Overlay
 
Thanks again! It was this touch code, thta I did not found.. :)

coderus 2016-09-29 11:49

Re: [Support thread] Battery Overlay
 
Tell me please if disappearing statusbar bug is fixed for everybody

R1v3r 2017-10-08 08:59

Re: [Support thread] Battery Overlay
 
Should this autostart work on Jolla C normally? I canīt get it working.

No autostart, even I added this batteryoverlay.autostart

I also tried batteryoverlay2.autostart but not starting automatically.

I tried first to install batteruoverlay 2 from Jolla store and then removed it and installed it from storeown.

But no autostart.

wormdrummer 2017-10-27 10:31

Re: [Support thread] Battery Overlay
 
Yeah, the Autostart dpesnt wprk here either which os a real shame. Coderus any chance of help please? This is a great app.

coderus 2020-05-06 10:00

Re: [Support thread] Battery Overlay
 
Updated to 0.2.8
FIxed compatibility with 3.3
Fixed autostart
Fixed removal detection

Markkyboy 2020-05-07 17:06

Re: [Support thread] Battery Overlay
 
I removed my comments from Openrepos regarding this app, thought it would be better to put them here.

I installed your latest version of BatteryOverlay2 just to see how it looked with an all white ambience, much to my surprise, the overlay didn't show. The app installs without problems and the settings can be played with but still the overlay does not show.

No matter though, I've no further intention of using the app, just wanted to let you know it appears to have problems running.

coderus 2020-05-07 18:58

Re: [Support thread] Battery Overlay
 
and it is again wisible with dark ambience? :D

Markkyboy 2020-05-08 08:12

Re: [Support thread] Battery Overlay
 
wisible?, you're a funny guy!

coderus 2020-05-08 08:45

Re: [Support thread] Battery Overlay
 
works for me on both dark and light ambiences

epninety 2020-05-08 09:15

Re: [Support thread] Battery Overlay
 
Works here too, on dark and light ambience, on Pro1.


All times are GMT. The time now is 12:16.

vBulletin® Version 3.8.8