-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4281e9b
commit 705cd22
Showing
6 changed files
with
71 additions
and
45 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
local hyper = { | ||
'cmd', | ||
'ctrl' | ||
"cmd", | ||
"ctrl", | ||
} | ||
|
||
local applicationHotkeys = { | ||
s = 'Spotify', | ||
k = 'kitty', | ||
c = 'Google Chrome' | ||
s = "Spotify", | ||
k = "kitty", | ||
c = "Google Chrome", | ||
} | ||
|
||
for key, app in pairs(applicationHotkeys) do | ||
hs.hotkey.bind(hyper, key, function() | ||
hs.application.launchOrFocus(app) | ||
end) | ||
hs.hotkey.bind(hyper, key, function() | ||
hs.application.launchOrFocus(app) | ||
end) | ||
end | ||
|
||
-- hs.hotkey.bind({}, "f8", function() | ||
-- hs.spotify.playpause() | ||
-- end) | ||
|
||
hs.hotkey.bind(hyper, "escape", function() | ||
hs.reload() | ||
hs.reload() | ||
end) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
require "windows" | ||
require "wifi" | ||
require "brightness" | ||
require "bindings" | ||
require "monitors" | ||
require("windows") | ||
-- require "wifi" | ||
-- require "brightness" | ||
require("bindings") | ||
-- require "monitors" | ||
require("system") | ||
|
||
-- Reload automatically on config changes | ||
hs.pathwatcher.new(os.getenv('HOME') .. '/.hammerspoon/', hs.reload):start() | ||
hs.alert('Hammerspoon is locked and loaded', 1) | ||
hs.pathwatcher.new(os.getenv("HOME") .. "/.hammerspoon/", hs.reload):start() | ||
hs.alert("Hammerspoon is locked and loaded", 1) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
-- Function to perform a POST request | ||
function postWebhook(url, body) | ||
hs.http.asyncPost(url, body, nil, function(status, body, headers) | ||
-- Debug print | ||
print(status, body) | ||
end) | ||
end | ||
|
||
-- Function to execute when the system finishes waking from sleep (including login) | ||
function systemDidWake(event) | ||
if event == hs.caffeinate.watcher.systemDidWake then | ||
-- Morning alarm end | ||
-- postWebhook( | ||
-- "https://dlbjm66xta3foy583q9fvl3nruwkujeb.ui.nabu.casa/api/webhook/dan-s-iphone-morning-alarm-ended-7NmRbLaIevl5KoisIR0jcxJw", | ||
-- "" | ||
-- ) | ||
|
||
-- hs.alert("Morning music has been stopped", 1) | ||
end | ||
end | ||
|
||
-- Set up a watcher for system wake events | ||
caffeinateWatcher = hs.caffeinate.watcher.new(systemDidWake) | ||
caffeinateWatcher:start() |
This file contains 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
This file contains 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
This file contains 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