summaryrefslogtreecommitdiff
path: root/experiments/volume/arc-widget.lua
diff options
context:
space:
mode:
Diffstat (limited to 'experiments/volume/arc-widget.lua')
-rw-r--r--experiments/volume/arc-widget.lua37
1 files changed, 37 insertions, 0 deletions
diff --git a/experiments/volume/arc-widget.lua b/experiments/volume/arc-widget.lua
new file mode 100644
index 0000000..fb56518
--- /dev/null
+++ b/experiments/volume/arc-widget.lua
@@ -0,0 +1,37 @@
+local wibox = require("wibox")
+local beautiful = require('beautiful')
+
+local widget = {}
+
+function widget.get_widget()
+
+ return wibox.widget {
+ {
+ id = "icon",
+ image = '/usr/share/icons/Arc/status/symbolic/audio-volume-muted-symbolic.svg',
+ resize = true,
+ widget = wibox.widget.imagebox,
+ },
+ max_value = 100,
+ thickness = 2,
+ start_angle = 4.71238898, -- 2pi*3/4
+ forced_height = 18,
+ forced_width = 18,
+ bg = '#ffffff11',
+ paddings = 2,
+ widget = wibox.container.arcchart,
+ set_volume_level = function(self, new_value)
+ self.value = new_value
+ end,
+ mute = function(self)
+ self.colors = {'#BF616A'}
+ end,
+ unmute = function(self)
+ self.colors = {beautiful.fg_color}
+ end
+ }
+
+end
+
+
+return widget \ No newline at end of file