Skip to content

PatricioIribarneCatella/power-print

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Power Print

Prints information about the status of the power supply (battery).

Configuration

It follows the XDG Base Directory convention, so it needs a configuration file named config located in HOME/.config/power-print directory. Alternatively, you can set an environment variable called POWPRINTPATH where the config file is located.

In this file the path to the power supply information has to be put in. Usually this location is in /sys/class/power_supply/BATNAME/uevent, where BATNAME is the name of the battery. For example you can do:

 $ mkdir -p $HOME/.config/power-print
 $ touch $HOME/.config/power-print/config

 $ echo "PATH=/sys/class/power_supply/BATNAME/uevent" > $HOME/.config/power-print/config

Compile

 $ make

Run

 $ make run