-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaudio.lua
More file actions
31 lines (26 loc) · 899 Bytes
/
audio.lua
File metadata and controls
31 lines (26 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
local audio = {}
function audio.volDown5()
hs.audiodevice.defaultOutputDevice()
:setVolume(hs.audiodevice.current().volume - 5)
hs.alert.show(string.format("Volume: %.0f", hs.audiodevice.current().volume))
end
function audio.volUp5()
hs.audiodevice.defaultOutputDevice()
:setVolume(hs.audiodevice.current().volume + 5)
hs.alert.show(string.format("Volume: %.0f", hs.audiodevice.current().volume))
end
function audio.volDown10()
hs.audiodevice.defaultOutputDevice()
:setVolume(hs.audiodevice.current().volume - 10)
hs.alert.show(
string.format("Volume: %.0f", hs.audiodevice.current().volume)
)
end
function audio.volUp10()
hs.audiodevice.defaultOutputDevice()
:setVolume(hs.audiodevice.current().volume + 10)
hs.alert.show(
string.format("Volume: %.0f", hs.audiodevice.current().volume)
)
end
return audio