Search Criteria
Package Details: batterylife 1-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/batterylife.git (read-only, click to copy) |
---|---|
Package Base: | batterylife |
Description: | Help user keep battery between 40 and 80% |
Upstream URL: | https://bbs.archlinux.org/viewtopic.php?pid=1431917 |
Licenses: | GPL |
Submitter: | parchd |
Maintainer: | parchd |
Last Packager: | parchd |
Votes: | 4 |
Popularity: | 0.000000 |
First Submitted: | 2014-07-01 18:00 (UTC) |
Last Updated: | 2015-06-13 06:55 (UTC) |
Dependencies (3)
- acpi (acpi-unified-patch)
- libnotify (libnotify-gtk2, libnotify-id, libnotify-git)
- pulseaudio (pulseaudio-bluedio, pulseaudio-pali, pulseaudio-dummy, pulseaudio-nosystemd-git, pulseaudio-nosystemd-minimal-git, pulseaudio-airplay, pulseaudio-git, pipewire-full-pulse-git, pipewire-common-pulse-git, pipewire-pulse-git, pipewire-pulse)
Latest Comments
nTia89 commented on 2019-01-26 11:09 (UTC)
Hi guys, I want to share with you my version of this script! I hope someone can further improve and adopt it.
! /bin/bash
MIN=40 MAX=80 STATUS=
cat /sys/class/power_supply/BAT0/status
BAT=cat /sys/class/power_supply/BAT0/capacity
if [ $BAT -le $MIN ] && [ "$STATUS" == 'Discharging' ]; then notify-send --icon=battery --urgency=critical "Battery below $MIN%. Plug it in to preserve battery lifespan!" elif [ $BAT -ge $MAX ] && [ "$STATUS" == 'Charging' ]; then notify-send --icon=battery --urgency=critical "Battery above $MAX%. Unplug it to preserve battery lifespan!" fi
sasank commented on 2017-03-13 13:22 (UTC)
parchd commented on 2015-06-03 07:35 (UTC)
aaron235 commented on 2015-05-21 07:49 (UTC)