From 5a8f70f9e9f9d6b643cf301b9cc274fa909b5906 Mon Sep 17 00:00:00 2001 From: pmakhov Date: Wed, 4 Oct 2017 20:46:09 -0400 Subject: wip volumearc and batteryarc widgets --- volumearc-widget/README.md | 2 ++ volumearc-widget/volumearc.lua | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 volumearc-widget/README.md (limited to 'volumearc-widget') 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 -- cgit v1.2.3