summaryrefslogtreecommitdiff
path: root/README.md
blob: c57f64310c3b38796970464f2e275a1a95f24831 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# AwesomeWM

Set of simple widgets for Awesome Window Manager consists of following widgets:

 - [Battery Widget](https://github.com/streetturtle/AwesomeWM#battery-widget)
 - [Email Widget](https://github.com/streetturtle/AwesomeWM#email-widget)
 - [Mouse Battery Widget](https://github.com/streetturtle/AwesomeWM#mouse-battery-widget)
 - [Rates Widget](https://github.com/streetturtle/AwesomeWM#rates-widget)
 - [Spotify Widget](https://github.com/streetturtle/AwesomeWM#spotify-widget)
 - [Volume Control Widget](https://github.com/streetturtle/AwesomeWM#volume-control-widget)

Note that these widgets work with Awesome WM 3.5 version. I'm currently migrating them to 4.0.

## Battery widget

This widget consists of

 - an icon which shows the battery status: ![Battery Widget](https://raw.githubusercontent.com/streetturtle/AwesomeWM/master/BatteryWidget/batWid1.png)
 - a pop-up window, which shows up when you hover over it: ![Battery Widget](https://raw.githubusercontent.com/streetturtle/AwesomeWM/master/BatteryWidget/batWid2.png)
 - a pop-up warning message which appears when battery level is less that 15%: ![Battery Widget](https://raw.githubusercontent.com/streetturtle/AwesomeWM/master/BatteryWidget/batWid3.png)

**Installation**

This widget uses the output of acpi tool.
- install `acpi` tool:
```
sudo apt-get install acpi
```
- clone/copy battery.lua file and battery-icons folder to your ~/home/username/.config/awesome/ folder;

- change path to the icons in `battery.lua`;

- include `battery.lua` and add battery widget to your wibox in rc.lua:
```
require("battery")
...
right_layout:add(batteryIcon)
```

---

## Email widget

This widget consists of an icon with counter which shows number of unread emails: ![email icon](https://raw.githubusercontent.com/streetturtle/AwesomeWM/master/EmailWidget/emailWidgetScrnsht.png)
and a popup message which appears when mouse hovers over an icon: ![email popup](https://raw.githubusercontent.com/streetturtle/AwesomeWM/master/EmailWidget/emailWidgetScrnsht2.png)

**Installation**

To install it either clone [EmailWidget](https://github.com/streetturtle/AwesomeWM/tree/master/EmailWidget) project under `~/.config/awesome/` or download a .zip archive and unzip it there.

After provide your credentials in python scripts so that they could connect to server and add following lines in your **rc.lua** file:

```lua
require("email")
...
right_layout:add(emailWidget_icon)
right_layout:add(emailWidget_counter)
```

**How it works**

This widget uses the output of two python scripts, first is called every 5 seconds - it returns number of unread emails and second is called when mouse hovers over an icon and displays content of those emails. For both of them you'll need to provide your credentials and imap server. For testing they can simply be called from console:

```bash
python ~/.config/awesome/email/countUnreadEmails.py
python ~/.config/awesome/email/readEmails.py
```

Note that getting number of unread emails could take some time, so instead of `pread` or `spawn_with_shell` functions I use DBus, you can read more about it in [this](http://pavelmakhov.com/2015/09/fix-awesome-freezes) post.

---

## Mouse Battery Widget

This widget shows the battery status of wireless mouse: ![screenshot](https://raw.githubusercontent.com/streetturtle/AwesomeWM/master/MouseBatteryWidget/mouse-battery.png)

 Include `mouse-battery` and add battery widget to your wibox in rc.lua (you can use both icon and text, or any of them separately):

```lua
require("mouse-battery")
...
right_layout:add(mouse_battery_icon) -- icon
right_layout:add(mouse_widget)       -- text
```

Read more about how it works here: [Mouse Battery status widget for Awesome WM](http://pavelmakhov.com/2017/01/awesome-wm-mouse-battery)

---

## Rates widget

Rates widget showing currency rate for chosen currencies with pop-up appearing when mouse hovers over it.
More about this widget in this two posts:
 - http://pavelmakhov.com/2016/01/how-to-create-widget
 - http://pavelmakhov.com/2016/01/how-to-create-widget-part-2  

---

## Spotify widget

Widget displaying currently playing song by Spotify application:
![screenshot](https://raw.githubusercontent.com/streetturtle/AwesomeWM/master/Spotify/screenshot.png)

You can read more about spotify integration in this blog [post](http://pavelmakhov.com/2016/02/awesome-wm-spotify).

---

## Volume control widget

Simple and easy-to-install widget for Awesome Window Manager.
This widget represents the sound level: ![Volume Wiget](https://github.com/streetturtle/AwesomeWM/raw/master/VolumeWidget/volWid.png)

**Installation**

- clone/copy volume.lua file and volume-icons folder to your `~/home/username/.config/awesome/` folder;

- change path to the icons in `volume.lua`:

```
widget:set_image("/home/<username>/.config/awesome/volume-icons/" .. volumeLevel .. ".png")
```

- include `volume.lua` and add volume widget to your wibox in rc.lua:

```
require("volume")
...
right_layout:add(volumeWidget)
```