summaryrefslogtreecommitdiff
path: root/volumearc-widget/volumearc.lua
diff options
context:
space:
mode:
authorpmakhov <pavel.makhov@savoirfairelinux.com>2017-10-04 20:46:09 -0400
committerpmakhov <pavel.makhov@savoirfairelinux.com>2017-10-04 20:46:09 -0400
commit5a8f70f9e9f9d6b643cf301b9cc274fa909b5906 (patch)
treebaa26e20dce2b4e8495c04cbc2f9eb88c71865bf /volumearc-widget/volumearc.lua
parent119983a3e2b4f5a1f0a51661670094536ab67bb4 (diff)
wip volumearc and batteryarc widgets
Diffstat (limited to 'volumearc-widget/volumearc.lua')
-rw-r--r--volumearc-widget/volumearc.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/volumearc-widget/volumearc.lua b/volumearc-widget/volumearc.lua
index 2c1044b..54e2f4f 100644
--- a/volumearc-widget/volumearc.lua
+++ b/volumearc-widget/volumearc.lua
@@ -8,6 +8,12 @@ local bar_color = "#74aeab"
local mute_color = "#ff0000"
volumearc_widget = wibox.widget {
+-- {
+-- id = "txt",
+-- text = "1",
+-- font = "Play 5",
+-- widget = wibox.widget.textbox
+-- },
max_value = 1,
rounded_edge = true,
thickness = 2,
@@ -27,12 +33,12 @@ local update_graphic = function(widget, stdout, _, _, _)
local volume = string.match(stdout, "(%d?%d?%d)%%")
volume = tonumber(string.format("% 3d", volume))
+ widget.value = volume / 100;
+-- widget.txt.text = volume;
if mute == "off" then
widget.colors = { mute_color }
- widget.value = volume / 100;
else
widget.colors = { bar_color }
- widget.value = volume / 100;
end
end