Created
November 6, 2020 10:09
-
-
Save peetzweg/dbd32e023a36f556fb285061a9915858 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local modifier = {"alt", "cmd"} | |
local homeDir = os.getenv("HOME") | |
local sounds = { | |
[1] = "mgs.mp3", | |
[2] = "wow.mp3", | |
[3] = "nice.m4a", | |
[4] = "LennartLache.wav", | |
[5] = "dumm.m4a", | |
[9] = "boah_alta_geil.mp3", | |
-- [6]="msg.mp3", | |
-- [7]="msg.mp3", | |
[8] = "abgeschmatzt.m4a", | |
-- [9]="msg.mp3", | |
[0] = "aktex.m4a" | |
} | |
local playSound = function(sound) | |
return function() | |
hs.sound.getByFile(homeDir .. "/.hammerspoon/sounds/" .. sound):play() | |
end | |
end | |
for key, sound in pairs(sounds) do | |
print(key, sound) | |
hs.hotkey.bind(modifier, tostring(key), playSound(sound)) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment