diff options
Diffstat (limited to 'volume-widget/README.md')
-rw-r--r-- | volume-widget/README.md | 65 |
1 files changed, 41 insertions, 24 deletions
diff --git a/volume-widget/README.md b/volume-widget/README.md index e43177a..065a504 100644 --- a/volume-widget/README.md +++ b/volume-widget/README.md @@ -10,9 +10,9 @@ It is possible to customize widget by providing a table with all or some of the | Name | Default | Description | |---|---|---| -| `volume_audio_controller` | `pulse` | audio device | -| `display_notification` | `false` | Display a notification on mouseover | -| `notification_position` | `top_right` | The notification position | +| `volume_audio_controller`| `pulse` | audio device | +| `display_notification` | `false` | Display a notification on mouseover and keypress | +| `notification_position` | `top_right`| The notification position | ## Installation @@ -21,16 +21,47 @@ It is possible to customize widget by providing a table with all or some of the - include `volume.lua` and add volume widget to your wibox in rc.lua: ```lua -require("volume") +local volume_widget = require("awesome-wm-widgets.volume-widget.volume") ... -s.mytasklist, -- Middle widget - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - ... - volume_widget(), - ... + s.mytasklist, -- Middle widget + { -- Right widgets + ... + volume_widget({display_notification = true}), + ... + +``` +### Control volume + +To mute/unmute click on the widget. To increase/decrease volume scroll up or down when mouse cursor is over the widget. + +If you want to control volume level by keyboard shortcuts add following lines in shortcut section of the **rc.lua**: +IF you have notification activated, a notification will pop-up on key press + +```lua +-- Key bindings +globalkeys = gears.table.join( + awful.key( + {}, + 'XF86AudioRaiseVolume', + volume_widget.raise, + {description = 'volume up', group = 'hotkeys'} + ), + awful.key( + {}, + 'XF86AudioLowerVolume', + volume_widget.lower, + {description = 'volume down', group = 'hotkeys'} + ), + awful.key( + {}, + 'XF86AudioMute', + volume_widget.toggle, + {description = 'toggle mute', group = 'hotkeys'} + ), ``` +### Icons + - _Optional step._ In Arc icon theme the muted audio level icon (![Volume-widget](./audio-volume-muted-symbolic.png)) looks like 0 level icon, which could be a bit misleading. So I decided to use original muted icon for low audio level, and the same icon, but colored in red for muted audio level. Fortunately icons are in svg format, so you can easily recolor them with `sed`, so it would look like this (![Volume Widget](./audio-volume-muted-symbolic_red.png)): @@ -74,17 +105,3 @@ volume_widget({ volume_audio_controller = 'alsa_only' }) ``` - -. - -## Control volume - -To mute/unmute click on the widget. To increase/decrease volume scroll up or down when mouse cursor is over the widget. - -If you want to control volume level by keyboard shortcuts add following lines in shortcut section of the **rc.lua** (the commands could be slightly different depending on your PC configuration): - -```lua -awful.key({ modkey}, "[", function () awful.spawn("amixer -D pulse sset Master 5%+") end, {description = "increase volume", group = "custom"}), -awful.key({ modkey}, "]", function () awful.spawn("amixer -D pulse sset Master 5%-") end, {description = "decrease volume", group = "custom"}), -awful.key({ modkey}, "\", function () awful.spawn("amixer -D pulse set Master +1 toggle") end, {description = "mute volume", group = "custom"}), -``` |