Skip to content

Commit

Permalink
hammerspoon init
Browse files Browse the repository at this point in the history
  • Loading branch information
brettinternet committed Mar 15, 2024
1 parent 4a905d4 commit 3ce8307
Show file tree
Hide file tree
Showing 6 changed files with 496 additions and 389 deletions.
2 changes: 1 addition & 1 deletion base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
# - >-
# [ -d "$HOME/.zinit/plugins/astronvim---astronvim" ] &&
# nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
- ['doom upgrade']
# - ['doom upgrade']
-
# https://github.com/tmux-plugins/tpm/blob/master/docs/managing_plugins_via_cmd_line.md
- >-
Expand Down
3 changes: 3 additions & 0 deletions mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
~/.functions/:
glob: true
path: mac/.functions/*
~/.hammerspoon/init.lua:
glob: true
path: mac/.hammerspoon/init.lua

- shell:
- ['./mac/brew.sh']
56 changes: 56 additions & 0 deletions mac/.hammerspoon/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
-- https://www.hammerspoon.org/go
-- https://developer.okta.com/blog/2020/10/22/set-up-a-mute-indicator-light-for-zoom-with-hammerspoon
-- http://peterhajas.com/blog/streamdeck.html
-- https://github.com/peterhajas/dotfiles/blob/master/hammerspoon/.hammerspoon/streamdeck/peek.lua

-- https://www.hammerspoon.org/Spoons/SpoonInstall.html
-- hs.loadSpoon("SpoonInstall")

-- https://www.hammerspoon.org/Spoons/PushToTalk.html
-- spoon.SpoonInstall:andUse(
-- "PushToTalk",
-- {
-- start = true,
-- config = {
-- app_switcher = {["zoom.us"] = "push-to-talk", ["discord"] = "push-to-talk"},
-- detect_on_start = true
-- }
-- }
-- )

-- https://www.hammerspoon.org/docs/hs.caffeinate.html
-- https://www.hammerspoon.org/docs/hs.notify.html
-- https://www.hammerspoon.org/docs/hs.noises.html
-- https://www.hammerspoon.org/Spoons/TextClipboardHistory.html
-- https://www.hammerspoon.org/Spoons/Caffeine.html

-- https://www.hammerspoon.org/Spoons/MicMute.html
-- hs.loadSpoon("MicMute")
-- -- muteHotKey = {toggle = {"cmd", "shift"}, "X"}
-- -- spoon.MicMute:bindHotkeys(muteHotKey, 0.75)

-- muted = false
-- muteAlertId = nil
-- hs.hotkey.bind({"cmd", "shift"}, "A", function()
-- if muteAlertId then
-- hs.alert.closeSpecific(muteAlertId)
-- end
-- if muted then
-- muted = false
-- muteAlertId = hs.alert.show("Unmuted")
-- else
-- muted = true
-- muteAlertId = hs.alert.show("Muted", nil, hs.screen.mainScreen(), 10)
-- end
-- spoon.MicMute:toggleMicMute()
-- end)

hs.loadSpoon("AClock")
hs.hotkey.bind({"cmd", "shift"}, "Z", function()
spoon.AClock.textSize = 300
spoon.AClock.width = 960
spoon.AClock.height = 690
spoon.AClock.textFont = "Fira Code"
spoon.AClock.textColor = hs.drawing.color.hammerspoon.black
spoon.AClock:toggleShow()
end)
4 changes: 1 addition & 3 deletions mac/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ brew "emacs"
brew "neovim"
brew "node"
brew "elixir"
brew "bpytop"
brew "btop"
brew "bat"
brew "tmux"
brew "broot"
Expand All @@ -35,9 +35,7 @@ cask "iterm2"
cask "hammerspoon"
cask "stats"
cask "spotify"
cask "dbeaver-community"
cask "zoom"
cask "yippy"
cask "gpg-suite"
cask "karabiner-elements"
cask "telegram"
Expand Down
Loading

0 comments on commit 3ce8307

Please sign in to comment.