Support disabling volume control
This commit is contained in:
parent
9ea205e39c
commit
a29cf9e2b6
@ -192,22 +192,33 @@ local toggleMute = function()
|
||||
end
|
||||
-- }}}
|
||||
|
||||
function getKeys(config)
|
||||
function getKeys(keys)
|
||||
if config.audio.card == 'disabled' then
|
||||
return
|
||||
-- Media control
|
||||
hotkey.make(keys.playPause, playPause,
|
||||
{ description = "Toggle Play / Pause", group = "media control" }),
|
||||
hotkey.make(keys.nextTrack, nextTrack,
|
||||
{ description = "Next track", group = "media control" }),
|
||||
hotkey.make(keys.previousTrack, previousTrack,
|
||||
{ description = "Previous track", group = "media control" })
|
||||
end
|
||||
|
||||
return
|
||||
-- Volume control
|
||||
hotkey.make(config.raiseVolume, raiseVolume,
|
||||
hotkey.make(keys.raiseVolume, raiseVolume,
|
||||
{ description = "Raise volume", group = "media control" }),
|
||||
hotkey.make(config.lowerVolume, lowerVolume,
|
||||
hotkey.make(keys.lowerVolume, lowerVolume,
|
||||
{ description = "Lower volume", group = "media control" }),
|
||||
hotkey.make(config.toggleMute, toggleMute,
|
||||
hotkey.make(keys.toggleMute, toggleMute,
|
||||
{ description = "Toggle mute audio", group = "media control" }),
|
||||
|
||||
-- Media control
|
||||
hotkey.make(config.playPause, playPause,
|
||||
hotkey.make(keys.playPause, playPause,
|
||||
{ description = "Toggle Play / Pause", group = "media control" }),
|
||||
hotkey.make(config.nextTrack, nextTrack,
|
||||
hotkey.make(keys.nextTrack, nextTrack,
|
||||
{ description = "Next track", group = "media control" }),
|
||||
hotkey.make(config.previousTrack, previousTrack,
|
||||
hotkey.make(keys.previousTrack, previousTrack,
|
||||
{ description = "Previous track", group = "media control" })
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user