awesome-wm-widgets/battery-widget/README.md

42 lines
1.2 KiB
Markdown
Raw Normal View History

2017-02-02 02:52:08 +01:00
# Battery widget
Simple and easy-to-install widget for Awesome Window Manager.
This widget consists of
2017-09-29 16:08:44 +02:00
- an icon which shows the battery level:
![Battery Widget](./bat-wid-1.png)
- a pop-up window, which shows up when you hover over an icon:
![Battery Widget](./bat-wid-2.png)
Alternatively you can use a tooltip:
![Battery Widget](./bat-wid-22.png)
- a pop-up warning message which appears on bottom right corner when battery level is less that 15%:
![Battery Widget](./bat-wid-3.png)
2017-02-02 02:52:08 +01:00
2017-02-02 03:45:15 +01:00
Note that widget uses the Arc icon theme, so it should be [installed](https://github.com/horst3180/arc-icon-theme#installation) first under **/usr/share/icons/Arc/** folder.
2017-02-02 02:52:08 +01:00
## Installation
This widget reads the output of acpi tool.
- install `acpi` and check the output:
```bash
$ sudo apt-get install acpi
$ acpi
Battery 0: Discharging, 66%, 02:34:06 remaining
```
2017-02-02 02:54:03 +01:00
- clone/copy **battery.lua** file to **~/.config/awesome/** folder;
2017-02-02 02:52:08 +01:00
2017-02-02 02:54:03 +01:00
- include **battery.lua** and add battery widget to your wibox in **rc.lua**:
2017-02-02 02:52:08 +01:00
```lua
require("battery")
...
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
...
battery_widget,
...
2017-02-02 02:54:03 +01:00
```