GithubHelp home page GithubHelp logo

xbattbar-se's Introduction

xbattbar-se

Yet another Battery/UPS/AC/DC power watcher for X11 (suckless edition).

This directory contains source for the suckless edition of xbattbar tool. This means that the project is aimed at simplicity, clarity, and frugality.

There's nothing here but a battery panel that takes the necessary data from /sys/class/power_supply/*. I think *BSD family also has kernel interfaces that provide information about the battery status, I don't know and haven't tested. You're welcome.

xbattbar-se requires the following data:

Name in config.def.h Expected Description
BattFull \d+ full capacity value
BattNow \d+ momentary/instantaneous value
PowerState (0|1) power supply online status

See config.def.h and /usr/src/linux/Documentation/power/power_supply_class.txt for more details and examples.

Note that this can be obtained using scripts and written to certain files, which can then be fed to xbattbar-se.

The program does not work with multiple batteries, but you can configure and run multiple instances of xbattbar-se, where each instance will indicate a separate battery.

In the current directory you will find some patches that extend the basic functionality.

Version

0.1.2

Requirements

  • basic configuration
    • Xlib
  • 0001-add-popup-diagnosis-window.patch: add popup window with battery remaining percent
    • Xlib
  • 0002-add-libnotify-support.patch: display notification when battery low
    • libnotify (requires gdk-pixbuf-2.0, gio-2.0, gobject-2.0, glib-2.0)

Configuration

Configuration is done with config.h:

make config.h

Read the comments in the generated config.h to edit it according to your needs. Defaults are stored in config.def.h.

Installation

Edit config.mk to match your local setup (xbattbar-se is installed into the /usr/local namespace by default).

Afterward, enter the following command to build and install xbattbar-se (if necessary as root):

make clean install

Authors

xbattbar-se's People

Contributors

sighook avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.