```lua -- Function to print the current volume function printCurrentVolume() local volume = hs.audiodevice.defaultOutputDevice():volume() hs.alert.show("Current volume: " .. volume) end
-- Bind the function to a hotkey, for example, Ctrl + Alt + V hs.hotkey.bind({"ctrl", "alt"}, "V", printCurrentVolume) ```