summaryrefslogtreecommitdiff
path: root/volumearc-widget
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
parent119983a3e2b4f5a1f0a51661670094536ab67bb4 (diff)
wip volumearc and batteryarc widgets
Diffstat (limited to 'volumearc-widget')
-rw-r--r--volumearc-widget/README.md2
-rw-r--r--volumearc-widget/volumearc.lua10
2 files changed, 10 insertions, 2 deletions
diff --git a/volumearc-widget/README.md b/volumearc-widget/README.md
new file mode 100644
index 0000000..56f4c7c
--- /dev/null
+++ b/volumearc-widget/README.md
@@ -0,0 +1,2 @@
+# Volumearc widget
+:hammer: Work in progress...:construction:
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