battery level warning on a laptop

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
b0wleyj0

battery level warning on a laptop

Post by b0wleyj0 »

hey guys
im pretty new to linux and i have very little knowledge.

i have a really annoying problem when using mint on my laptop

when im watching movies/videos in full screen mode i have no way of knowing my battery level and my laptop doesn't warn me when my battery is getting low. until recently i just kept it plugged in while watching stuf but now im living in a van and have to use a rather noisy inverter to power the laptop that kind of ruins the watching experience.

i have managed to install a battery warning system that i found on this link

http://linuxsoftware.moncerbae.com/2015 ... buntu.html

it doesnt seem to make a sound or appear over the top of the video when in full screen, is there any way i can edit this application to make a sound or is there another one i can use that will make a sound and or appear over the top of a full screen video ??

i also have noticed that recently my software manager wont open. when i click on it on the menu the menu drops down and nothing happens, could anyone help me with getting this to work again ?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
b0wleyj0

Re: battery level warning on a laptop

Post by b0wleyj0 »

i have now realised that the battery warning software i thought i had installed is actually doing nothing at all.
User avatar
powerwagon75
Level 4
Level 4
Posts: 338
Joined: Sun Feb 28, 2016 4:05 pm
Location: USA

Re: battery level warning on a laptop

Post by powerwagon75 »

We use Battery Applet with Monitoring and Shutdown on our Mac laptop. Seems to work well. Set a slider for the warning percentage, and the suspend point is a fixed percentage below that. Gives a color icon that changes color at the warning, and also give a short session of beeps. The creator also suggest getting these installed to ensure colors and audible alerts work as expected: sudo apt-get install zenity sox libsox-fmt-mp3
BAMS.png
Image
Custom Antec Outside tower w/Mint 20.2
HP lap w/Mint 20.3
Optiplex 960 "Frankenbox" w/Fedora 39/Mint 19.2/Mint 20.2
Advantech TPC-1551T w/LinuxLite
Acer C720 Chromebook w/GalliumOS
Mac PPC G4 w/Lubuntu
b0wleyj0

Re: battery level warning on a laptop

Post by b0wleyj0 »

that sounds great but i cant seem to find the folder that i need to extract it to ? ? could you walk me through it please ?
b0wleyj0

Re: battery level warning on a laptop

Post by b0wleyj0 »

when i get to .local then click on shae i get these option

applications
desktop directories
gegl-03
gstreamer- 1.0
gvfs metadata
icons
keyrings
mediahuman
pix
rhythm
trash
vlc
webkitgtk
xplayer


i extracted it to the applications folder as that is the closest match.

now comes the other problem no system settings applets option

so i tried adding it as a startup application but then it wants me to select which file i want inside the folder

so i added batteryscript.sh

i restarted the computer and nothing seems to be happening. wh


what am i doing wrong here ?
User avatar
powerwagon75
Level 4
Level 4
Posts: 338
Joined: Sun Feb 28, 2016 4:05 pm
Location: USA

Re: battery level warning on a laptop

Post by powerwagon75 »

There is no extraction or scripting needed by you for the applet. Go to Menu --> Preferences --> Applets, click on the Available on line or Download tab, (depending on which version you have), find the BAMS applet, and install it. Then, copy this text exactly sudo apt-get install zenity sox libsox-fmt-mp3 open terminal (Ctl+Alt+T) and paste the text (Ctl+Shift+v, or right-click mouse/paste). Hit enter. You'll be prompted for your password; enter it. You won't see any text or dots, just type in the password and hit enter. Then, after those install in terminal, go back to the Applets window, and go to Installed Applets or Manage tabs (depending on which version you have), highlight the applet by clicking on it once, then add it to the panel by clicking on Add or +.

To configure, right-click the icon in the panel for it, select configure, and move the slider to the point you want to first be warned of low battery. The second warning (Suspend action) is a fixed percentage less than the initial warning you set. It should play a shrill beep sound for a few seconds when your battery level reaches the initial alert percentage.
Image
Custom Antec Outside tower w/Mint 20.2
HP lap w/Mint 20.3
Optiplex 960 "Frankenbox" w/Fedora 39/Mint 19.2/Mint 20.2
Advantech TPC-1551T w/LinuxLite
Acer C720 Chromebook w/GalliumOS
Mac PPC G4 w/Lubuntu
Linux_Lobo
Level 2
Level 2
Posts: 55
Joined: Mon Jun 18, 2018 6:17 am

Re: battery level warning on a laptop

Post by Linux_Lobo »

Great response. It's exactly what I was looking for. Thank you
pharmankur
Level 1
Level 1
Posts: 22
Joined: Tue Sep 11, 2018 9:09 am

Re: battery level warning on a laptop

Post by pharmankur »

Script for --- Battery Fully Charge / Discharge notification with beep and voice alert

Many cinnamon applets often offer notification for battery discharge, but while using laptop some users also prefer notification for "Battery is fully charged" . Also it is appreciated if a "Beep" with voice alert is provided for immediate action. I have prepared a simple script which will create this notifications script and also set it to crontab.

1. Download file "Create_Battery_Notification.sh" in your /home/$user (Actual User Name)
2. Open terminal and make it executable --

Code: Select all

chmod 700 ~/Create_Battery_Notification.sh
3. Now in terminal , run the script by ---

Code: Select all

bash ~/Create_Battery_Notification.sh
-- Thats all . Now you will be notified by battery status with beep and voice alert

4. Now you can safety delete "Create_Battery_Notification.sh" in your /home/$user

Code: Select all

rm ~/Create_Battery_Notification.sh
--------- Download Script File and Save as "Create_Battery_Notification.sh" ------
Create_Battery_Notification.sh.txt
remove .txt
(6.93 KiB) Downloaded 101 times
--- Somehow this file was not getting attached so renamed it as .txt You need to name it back to .sh
User avatar
sadhu
Level 5
Level 5
Posts: 860
Joined: Fri Nov 22, 2013 9:48 am
Location: Sri Lanka
Contact:

Re: battery level warning on a laptop

Post by sadhu »

Ok I've installed the .sh script.

I don't like it. I'll stick with the Cinnamon Spices applet

I read the script but there have been no changes to /etc/cron.

How do get rid of the script now that it's running all the time in the background?


Thanks
Sadhu
sabbe sattā bhavantu sukhitattā. LM 21.2-64 Cinn 5.8.4
rickNS
Level 9
Level 9
Posts: 2914
Joined: Tue Jan 25, 2011 11:59 pm

Re: battery level warning on a laptop

Post by rickNS »

I did something recently and a hell of a lot simpler than the above script.
viewtopic.php?p=2169553#p2169553

But since you have the cinnamon applet, probably no need.
Mint 20.0, and 21.0 MATE on Thinkpads, 3 X T420, T450, T470, and X200
rickNS
Level 9
Level 9
Posts: 2914
Joined: Tue Jan 25, 2011 11:59 pm

Re: battery level warning on a laptop

Post by rickNS »

sadhu wrote: Sat May 14, 2022 8:29 am
1, I read the script but there have been no changes to /etc/cron.

2, How do get rid of the script now that it's running all the time in the background?
1, That's not where user added cron jobs are stored, look /var/spool/cron

2, in terminal crontab -e, and remove a line (near the end), save, and exit.
Mint 20.0, and 21.0 MATE on Thinkpads, 3 X T420, T450, T470, and X200
Locked

Return to “Beginner Questions”