update from master

This commit is contained in:
Pavel Makhov 2021-01-24 14:46:54 -05:00
parent 470e95ced9
commit dcb8695910
8 changed files with 43 additions and 46 deletions

7
_includes/sponsors.html Normal file
View File

@ -0,0 +1,7 @@
<div class="row">
<div class="col s2">
<a href="https://github.com/tegonal" target="_blank">
<img class="circle responsive-img" height="35" width="35" alt="@tegonal" src="https://avatars3.githubusercontent.com/u/3404785?s=88&amp;v=4">
</a>
</div>
</div>

View File

@ -3,7 +3,7 @@ layout: page
---
# Brightness widget
This widget represents current brightness level: ![Brightness widget](../awesome-wm-widgets/assets/img/screenshots/brightness-widget/br-wid-1.png)
This widget represents current brightness level, depending on config parameters could be an arcchart or icon with text: ![Brightness widget](../awesome-wm-widgets/assets/img/screenshots/brightness-widget/br-wid-1.png)
## Customization
@ -11,50 +11,39 @@ It is possible to customize widget by providing a table with all or some of the
| Name | Default | Description |
|---|---|---|
| `get_brightness_cmd` | `light -G` | Get current screen brightness |
| `inc_brightness_cmd` | `light -A 5` | Increase brightness |
| `dec_brightness_cmd` | `light -U 5`| Decrease brightness |
| `type`| `arc` | The widget type. Could be `arc` or `icon_and_text` |
| `program` | `light` | The program used to control the brightness, either 'light' or 'xbacklight'. |
| `step` | 5 | Step |
| `path_to_icon` | `/usr/share/icons/Arc/status/symbolic/display-brightness-symbolic.svg` | Path to the icon |
| `font` | `Play 9` | Font |
| `timeout` | 1 | How often in seconds the widget refreshes |
### Example:
```lua
brightness_widget({
get_brightness_cmd = 'xbacklight -get',
inc_brightness_cmd = 'xbacklight -inc 5',
dec_brightness_cmd = 'xbacklight -dec 5'
})
```
| `timeout` | 1 | How often in seconds the widget refreshes. Check the note below |
_Note:_ If brightness is controlled only by the widget (either by a mouse, or by a shortcut, then the `timeout` could be quite big, as there is no reason to synchronize the brightness level).
## Installation
First you need to get the current brightness level. There are two options:
To choose the right `program` argument, first you need to check which of them works better for you.
- using `xbacklight` command (depending on your video card (I guess) it may or may not work)
- using `xbacklight`:
To check if it works install xbackligth and check if it works:
Install (on Ubuntu it's available in the apt repository) it and check if it works by running:
```bash
sudo apt-get install xbacklight
xbacklight -get
```
If there is no output it means that it doesn't work, but there is a second option:
If there is no output it means that it doesn't work, you can either try to fix it, or try to use `light`.
- using `light` command
Install it from this git repo: [github.com/haikarainen/light](https://github.com/haikarainen/light) and check if it works but running
Install (on Ubuntu it's available in the apt repository) from the repo: [github.com/haikarainen/light](https://github.com/haikarainen/light) and check if it works by running
```bash
git clone https://github.com/haikarainen/light.git && \
cd ./light && \
sudo make && sudo make install \
light -G
49.18
light -A 5
```
If you're on Ubuntu/debian and if the brightness level doesn't change, try to do this: https://github.com/haikarainen/light/issues/113#issuecomment-632638436.
Then clone this repo under **~/.config/awesome/**:
@ -68,7 +57,7 @@ Require widget at the beginning of **rc.lua**:
local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness")
```
Add widget to the tasklist:
Add the widget to the tasklist:
```lua
s.mytasklist, -- Middle widget
@ -78,13 +67,13 @@ s.mytasklist, -- Middle widget
-- default
brightness_widget(),
-- or customized
brightness_widget({
get_brightness_cmd = 'xbacklight -get',
inc_brightness_cmd = 'xbacklight -inc 5',
dec_brightness_cmd = 'xbacklight -dec 5'
})
brightness_widget{
type = 'icon_and_text',
program = 'xbacklight',
step = 2,
}
}
...
...
```
## Controls
@ -92,7 +81,7 @@ s.mytasklist, -- Middle widget
In order to change brightness by shortcuts you can add them to the `globalkeys` table in the **rc.lua**:
```lua
awful.key({ modkey }, ";", function () awful.spawn("light -A 5") end, {description = "increase brightness", group = "custom"}),
awful.key({ modkey, "Shift"}, ";", function () awful.spawn("light -U 5") end, {description = "decrease brightness", group = "custom"}),
awful.key({ modkey }, ";", function () brightness_widget:inc() end, {description = "increase brightness", group = "custom"}),
awful.key({ modkey, "Shift"}, ";", function () brightness_widget:dec() end, {description = "decrease brightness", group = "custom"}),
```
On laptop you can use `XF86MonBrightnessUp` and `XF86MonBrightnessDown` keys.
On a laptop you can use `XF86MonBrightnessUp` and `XF86MonBrightnessDown` keys.

View File

@ -35,7 +35,7 @@ s.mytasklist, -- Middle widget
-- default
docker_widget(),
-- customized
github_activity_widget{
docker_widget{
number_of_containers = 5
},
```

View File

@ -7,7 +7,7 @@ This widget shows file system disk space usage which is based on the `df` output
![](../awesome-wm-widgets/assets/img/screenshots/fs-widget/screenshot.png)
## Cusomizations
## Customizations
It is possible to customize widget by providing a table with all or some of the following config parameters:

View File

@ -31,11 +31,11 @@ Then
- to show by a shortcut - define a shortcut in `globalkeys`:
```lua
local logout = require("awesome-wm-widgets.experiments.logout-widget.logout")
local logout_popup = require("awesome-wm-widgets.logout-popup-widget.logout-popup")
...
globalkeys = gears.table.join(
...
awful.key({ modkey }, "l", function() logout.launch() end, {description = "Show logout screen", group = "custom"}),
awful.key({ modkey }, "l", function() logout_popup.launch() end, {description = "Show logout screen", group = "custom"}),
```
- to show by clicking on a widget in wibar - add widget to the wibar:

View File

@ -26,11 +26,12 @@ It is possible to customize widget by providing a table with all or some of the
```lua
local volume_widget = require("awesome-wm-widgets.volume-widget.volume")
local volume_widget_widget = volume_widget({display_notification = true})
...
s.mytasklist, -- Middle widget
{ -- Right widgets
...
volume_widget({display_notification = true}),
volume_widget_widget,
...
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -3,12 +3,12 @@
"number": {
"value": 80,
"density": {
"enable": true,
"enable": false,
"value_area": 800
}
},
"color": {
"value": "#ffffff"
"value": "#eceff4"
},
"shape": {
"type": "circle",
@ -17,7 +17,7 @@
"color": "#000000"
},
"polygon": {
"nb_sides": 5
"nb_sides": 3
},
"image": {
"src": "img/github.svg",
@ -46,7 +46,7 @@
}
},
"line_linked": {
"enable": true,
"enable": false,
"distance": 150,
"color": "#ffffff",
"opacity": 0.4,
@ -55,7 +55,7 @@
"move": {
"enable": true,
"speed": 6,
"direction": "none",
"direction": "top-right",
"random": false,
"straight": false,
"out_mode": "out",
@ -72,10 +72,10 @@
"events": {
"onhover": {
"enable": false,
"mode": "bubble"
"mode": "repulse"
},
"onclick": {
"enable": true,
"enable": false,
"mode": "push"
},
"resize": true