diff options
author | streetturtle <streetturtle@gmail.com> | 2021-03-19 20:49:00 -0400 |
---|---|---|
committer | streetturtle <streetturtle@gmail.com> | 2021-03-19 20:49:00 -0400 |
commit | 25d9eecfc68df3251dc96008aaa4cd7c81900da6 (patch) | |
tree | 7f0b6a6c125ea622e099e5b569115b80dcad3753 /volumebar-widget/README.md | |
parent | a37e0a673ee3e6655f3d4be2c5a2f6c832476456 (diff) |
[volume] BREAKING CHANGE - new widget instead of old ones
Having three widgets for volume led to a problem of code duplication -
same logic was duplicated three times. However when an issue was
discovered and fixed, it was fixed in only one of three widgets.
So I decided to create a volume widget from scratch, adding new
features, such as selecting input/output, better responsiveness,
easily customizable widget ui (bar, text, icon, icon and text, arc).
Should close #199, #198, #185, #182, #47, #122, #183.
Diffstat (limited to 'volumebar-widget/README.md')
-rw-r--r-- | volumebar-widget/README.md | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/volumebar-widget/README.md b/volumebar-widget/README.md deleted file mode 100644 index 305b254..0000000 --- a/volumebar-widget/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# Volumebar widget - -Almost the same as volume widget, but more minimalistic: - -![screenshot](./out.gif) - -Supports - - scroll up - increase volume, - - scroll down - decrease volume, - - left click - mute/unmute. - -## Customization - -It is possible to customize widget by providing a table with all or some of the following config parameters: - -| Name | Default | Description | -|---|---|---| -| `main_color` | `beautiful.fg_normal` | Color of the bar | -| `bg_color` | `#ffffff11` | Color of the bar's background | -| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute | -| `width` | 50 | The bar width | -| `shape` | `bar` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc | -| `margins` | `10` | Top and bottom margin (if your wibar is 22 px high, bar will be 2 px (22 - 2*10)) | -| `timeout` | 1 | How often in seconds the widget refreshes | -| `get_volume_cmd` | `amixer -D pulse sget Master` | Get current volume level | -| `inc_volume_cmd` | `amixer -D pulse sset Master 5%+` | Increase volume level | -| `dec_volume_cmd` | `amixer -D pulse sset Master 5%-` | Decrease volume level | -| `tog_volume_cmd` | `amixer -D pulse sset Master toggle` | Mute / unmute | - -### Example: - - ```lua - volumebar_widget({ - main_color = '#af13f7', - mute_color = '#ff0000', - width = 80, - shape = 'rounded_bar', - margins = 8 -}) - ``` - -Above config results in following widget: - -![custom](./custom.png) - - -## Installation - -1. Clone this repo under **~/.config/awesome/** - - ```bash - git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/ - ``` - -1. Require volumebar widget at the beginning of **rc.lua**: - - ```lua - local volumebar_widget = require("awesome-wm-widgets.volumebar-widget.volumebar") - ``` - -1. Add widget to the tasklist: - - ```lua - s.mytasklist, -- Middle widget - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - ... - --[[default]] - volumebar_widget(), - --[[or customized]] - volumebar_widget({ - main_color = '#af13f7', - mute_color = '#ff0000', - width = 80, - shape = 'rounded_bar', -- octogon, hexagon, powerline, etc - -- bar's height = wibar's height minus 2x margins - margins = 8 - }), - - ... - ``` - -## Troubleshooting - -If the bar is not showing up, try to decrease top or bottom margin - widget uses hardcoded margins for vertical alignment, so if your wibox is too small then bar is simply hidden by the margins. |