From 34cae4e6e4bb00b3453bcdab084368a949c908a4 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 5 Jan 2024 10:38:35 +1100 Subject: add an alerts module for lua, and implement a volume indicator with it --- src/lua/stubs/volume.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/lua/stubs/volume.lua (limited to 'src/lua/stubs/volume.lua') diff --git a/src/lua/stubs/volume.lua b/src/lua/stubs/volume.lua new file mode 100644 index 00000000..15499630 --- /dev/null +++ b/src/lua/stubs/volume.lua @@ -0,0 +1,14 @@ +--- Module for interacting with playback volume. The Bluetooth and wired outputs store their current volume separately; this API only allows interacting with the volume of the currently used output device. +-- @module volume + +local volume = {} + +--- Returns the current volume as a percentage of the current volume limit. +-- @treturn types.Property an integer property +function volume.current_pct() end + +--- Returns the current volume in terms of dB from line level. +-- @treturn types.Property an integer property +function volume.current_db() end + +return volume -- cgit v1.2.3