summaryrefslogtreecommitdiff
path: root/experiments/volume/arc-widget.lua
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@gmail.com>2020-11-01 14:03:06 -0500
committerstreetturtle <streetturtle@gmail.com>2020-11-01 14:03:06 -0500
commit0daa2ca83d9bd8c225ce0ec709531765e79308f6 (patch)
tree44e094fb3dc08da8dc0ea87abf82557a674355d9 /experiments/volume/arc-widget.lua
parentdf01b80e209c92dd25c1d1c0cf2344a2dfee4874 (diff)
[experiments] volume widget improvements
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