Skip to content

Instantly share code, notes, and snippets.

@ferminhg
Created December 23, 2021 10:17
Show Gist options
  • Save ferminhg/1ed76c32566dc36dae2e67988e283d17 to your computer and use it in GitHub Desktop.
Save ferminhg/1ed76c32566dc36dae2e67988e283d17 to your computer and use it in GitHub Desktop.
{:profiles
{:Default
{:alone 500
:default true
:delay 200
:held 500
:sim 200
:simlayer-threshold 220}}
:applications
{;; to obtaoin the app ID: `grep -A1 "CFBundleIdentifier" /Applications/The.app/Contents/Info.plist`
:Chrome ["com.google.Chrome"]
:Slack ["com. tinyspeck.slackmapgap"]}
:simlayers {:open-mode {:key :o}
:emoji-mode {:key :e}}
:templates { :paste "osascript -e '
set the clipboard to \"%s\"
tell application \"System Events\"
keystroke \"v\" using command down
end tell
'"
:open "open -a '%s.app'"
:wait_seconds "osascript -e 'delay %s'"
}
:main
[
;; ------------ Remaps ------------
{:des "[keyboard] Symbols // @todo: move this to a keyboard layout using ukelele"
:rules [[:!On [:paste "ñ"]]
[:!OSn [:paste "Ñ"]]
[:!Oslash [:paste "¿"]]
[:!Eslash [:paste "¿"]]
]}
;; ------------ Launchers ------------
{:des "[launch] Google Chrome"
:rules [[:!CTOspacebar [:open "Google Chrome"]]]}
{:des "[launch] WebStorm"
:rules [[:!CTOw [:open "WebStorm"]]]}
{:des "[launch] Slack"
:rules [[:!CTOs [:open "Spotify"]]]}
; {:des "[launch] Boxy for Calendar"
; :rules [[:!CTOa [[:open "Boxy for Calendar"] [:wait_seconds "3"] [:!C1] ]]]}
;; ------------ modes ------------
{:des "Open mode"
:rules [:open-mode
[:t [:open "iTerm"]]
[:b [:open "Google Chrome"]]
[:s [:open "Slack"]]
]}
{:des "Emoji mode"
:rules [:emoji-mode
[:d [:paste "👎"]]
[:q [:paste "❓"]]
[:g [:paste "😬"]]
[:l [:paste "😂"]]
[:p [:paste "➕"]]
[:u [:paste "👍"]]
[:w [:paste "🚧"]]
[:x [:paste "❌"]]
[:v [:paste "✅"]]]}
;; ------------ Application specific ------------
;; {:des "[chrome] Switch profile"
;; :rules [:Chrome [:switch-account [:!CSm :return_or_enter]]]}
]
;; ------------ Cheatsheet ------------
;; https://github.com/yqrashawn/GokuRakuJoudo
;; ! stand for mandatory
;; # stand for optional
;; !! stand for mandatory command + control + optional + shift (hyper)
;; ## stand for optional any
;; C T O S for left command control option shift
;; Q W E R for right command control option shift
;; F for fn
;; need to prefix C T O S F Q W E R with ! or #
:cheatsheet
{:!Ca "command a"
:!Ta "control a"
:!Oa "option a"
:!Sa "shift a"
:#Sa "shift a"
:!CTOa "command control option a"
:!Cspacebar "command space"
:!Fa "fn a"
:##a "keycode a optional any"
:!!a "mandatory hyper (control command option shift) a "
:template {:des "Description of your action"
:rules [[:!Cspacebar "command to execute"]]}}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment