diff options
-rw-r--r-- | mpdarc-widget/README.md | 14 | ||||
-rw-r--r-- | mpdarc-widget/mpdarc.lua | 3 | ||||
-rw-r--r-- | volume-widget/README.md | 4 |
3 files changed, 17 insertions, 4 deletions
diff --git a/mpdarc-widget/README.md b/mpdarc-widget/README.md index 0a6ffa6..2192410 100644 --- a/mpdarc-widget/README.md +++ b/mpdarc-widget/README.md @@ -10,5 +10,17 @@ Install `mpd` (Music Player Daemon itself) and `mpc` (Music Player Client - prog sudo apt-get install mpd mpc ``` -Set them up and then just follow the [installation](https://github.com/streetturtle/awesome-wm-widgets#installation) section of the repo. +## Installation +To use this widget clone repo under **~/.config/awesome/** and then add it in **rc.lua**: + +```lua +local mpdarc_widget = require("awesome-wm-widgets.mpdarc-widget.mpdarc") +... +s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + ... + mpdarc_widget, + ... +``` diff --git a/mpdarc-widget/mpdarc.lua b/mpdarc-widget/mpdarc.lua index 56009ef..7b8aea3 100644 --- a/mpdarc-widget/mpdarc.lua +++ b/mpdarc-widget/mpdarc.lua @@ -14,6 +14,7 @@ local wibox = require("wibox") local naughty = require("naughty") local GET_MPD_CMD = "mpc status" +local TOGGLE_MPD_CMD = "mpc toggle" local PAUSE_MPD_CMD = "mpc pause" local STOP_MPD_CMD = "mpc stop" local NEXT_MPD_CMD = "mpc next" @@ -66,7 +67,7 @@ local update_graphic = function(widget, stdout, _, _, _) end mpdarc:connect_signal("button::press", function(_, _, _, button) - if (button == 1) then awful.spawn("mpc toggle", false) -- left click + if (button == 1) then awful.spawn(TOGGLE_MPD_CMD, false) -- left click elseif (button == 2) then awful.spawn(STOP_MPD_CMD, false) elseif (button == 3) then awful.spawn(PAUSE_MPD_CMD, false) elseif (button == 4) then awful.spawn(NEXT_MPD_CMD, false) -- scroll up diff --git a/volume-widget/README.md b/volume-widget/README.md index 19946a2..118abc6 100644 --- a/volume-widget/README.md +++ b/volume-widget/README.md @@ -38,7 +38,7 @@ To mute/unmute click on the widget. To increase/decrease volume scroll up or dow 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 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"}), ``` |