vdotfiles

Cem's Dotfiles for Void Linux
git clone git://git.ckyln.com/vdotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 138042509ce8bccb5af9a2691a68cb1b3748ec05
parent 5a614c19e70d1e394c7426daf89654f27ceefce1
Author: Cem Keylan <cem@ckyln.com>
Date:   Mon, 22 Jul 2019 10:17:34 +0300

Script that checks battery

Diffstat:
M.config/i3/config | 3+++
Abin/powercheck | 6++++++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/.config/i3/config b/.config/i3/config @@ -270,6 +270,9 @@ exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # Launch Unclutter (disables cursor when it is not being used) exec --no-startup-id unclutter +# Battery Checks +exec --no-startup-id ~/bin/powercheck + ############# Overrides ################ # This point onwards will be set by # CARBS diff --git a/bin/powercheck b/bin/powercheck @@ -0,0 +1,6 @@ +#!/bin/sh +while : +do + ! [ $(cat /sys/class/power_supply/BAT?/status) = "Charging" ] && [ $(cat /sys/class/power_supply/BAT?/capacity) -lt 25 ] && notify-send -u critical "Battery Status" "Your battery is low, please connect to a charger" + sleep 500 +done