Skip to content

Instantly share code, notes, and snippets.

@altercation
Created May 31, 2023 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save altercation/1671721bf6616d1dcfb3dfb328d9b4b5 to your computer and use it in GitHub Desktop.
Save altercation/1671721bf6616d1dcfb3dfb328d9b4b5 to your computer and use it in GitHub Desktop.
Karabiner Goku Config Snapshot - es
; {
; Karabiner-Elements Goku Config
; es@ethanschoonover.com / github: altercation
; -----------------------------------------------------------------------------
; SUMMARY
; Karabiner-Elements is a low level utility to manage macOS keyboard behavior.
; The JSON config for K-E is awkward to manage at any level of complexity and
; thus we use Goku to maintain the configuration in EDN and compile it out to
; native K-E JSON config.
; -----------------------------------------------------------------------------
; REFERENCES:
; Karabiner-El: https://karabiner-elements.pqrs.org
; GokuRakuJoudo: https://github.com/yqrashawn/GokuRakuJoudo
; EDN format: https://github.com/edn-format/edn
; Goku Tutorial: https://github.com/yqrashawn/GokuRakuJoudo/
; blob/master/tutorial.md
; Key Codes: https://github.com/yqrashawn/GokuRakuJoudo/
; blob/master/src/karabiner_configurator/keys_info.clj
; Goku Rules https://github.com/yqrashawn/GokuRakuJoudo/
; blob/master/src/karabiner_configurator/rules.clj
; From Modifiers: https://karabiner-elements.pqrs.org/docs/json/
; complex-modifications-manipulator-definition/from/modifiers/
; Examples: https://github.com/yqrashawn/GokuRakuJoudo/
; blob/master/examples.org
; Sample Configs: https://github.com/yqrashawn/GokuRakuJoudo/
; tree/master/resources/configurations/edn
; -----------------------------------------------------------------------------
; EXAMPLE CONGIFS:
; https://github.com/yqrashawn/GokuRakuJoudo/blob/master/in-the-wild.md
; https://github.com/morberg/dotfiles/blob/main/karabiner.edn
; https://github.com/tIsGoud/goku
; https://github.com/kchen0x/k-goku (alternate, cleaner? approach to hyper)
; https://github.com/
; emilbryggare/dotfiles/blob/main/.config/karabiner.edn (int use of aliases)
; nikitavoloboev/dotfiles/blob/master/karabiner/karabiner.edn
; johnlindquist/dotfiles/blob/master/karabiner/karabiner-starter.edn
; vheon/home/blob/master/roles/karabiner/files/karabiner.edn
; https://github.com/tIsGoud/goku/blob/master/karabiner.edn (good comments)
; https://github.com/nanoxd/dotfiles/blob/main/config/karabiner.edn (hyper)
; https://github.com/loudoguno/goku/blob/master/karabiner.edn (v. complex)
; https://gist.github.com/gsinclair/f4ab34da53034374eb6164698a0a8ace (simlayer)
;
; following gist has very interesting "press twice" examples
; https://gist.github.com/kaushikgopal/ff7a92bbc887e59699c804b59074a126
;
; GITHUB QUERY FOR CONFIGS:
; https://github.com/
; search?q=extension%3A.edn+filename%3Akarabiner.edn&type=Code
;
; ARTICLES:
; https://tisgoud.nl/2020/09/keyboard-redefined-part-1/
; https://tisgoud.nl/2020/09/keyboard-redefined-part-2/
; https://brettterpstra.com/2017/06/15/
; a-hyper-key-with-karabiner-elements-full-instructions/
; https://wiki.nikitavoloboev.xyz/macos/macos-apps/karabiner
; https://medium.com/@nikitavoloboev/karabiner-god-mode-7407a5ddc8f6
; https://johnlindquist.com (general)
; https://johnlindquist.com/combine-layer-and-simlayer-in-karabiner/
; https://jkl.gg/b/hacking-your-keyboard/ (covers capslock hyper + hjkl cursor)
; cf config @
; https://gist.github.com/kaushikgopal/ff7a92bbc887e59699c804b59074a126
; https://oliverfalvai.com/karabiner-setup/ (interesting cmd-q twice example)
;
; FORA:
; below (p1/2) touch on key chord WITH modifier which is current challenge
; https://githubhot.com/repo/yqrashawn/GokuRakuJoudo/issues/47?page=1
; https://githubhot.com/repo/yqrashawn/GokuRakuJoudo/issues/47?page=2
; https://www.reddit.com/r/Karabiner/
;
; ALTERNATIVE TO GOKU (for future reference):
; https://github.com/esamattis/deno_karabiner
; cf https://github.com/denolfe/dotfiles
; -----------------------------------------------------------------------------
; HOW TO READ THIS FILE
; Check out the EDN reference for basic syntax, review Goku config docs as well.
; However the basics that will help you parse things below:
;
; `;` semicolons - all that follows a semicolon to next newline is a comment
;
; des == Description (human readable)
;
; Notes on simlayer vs layer
; see https://github.com/yqrashawn/GokuRakuJoudo/blob/master/tutorial.md#advance3
;
; ! | means mandatory
; # | means optional
; C | left_command
; T | left_control
; O | left_option
; S | left_shift
; F | fn
; Q | right_command
; W | right_control
; E | right_option
; R | right_shift
; P | caps_lock
; !! | mandatory command + control + optional + shift (hyper)
; ## | optional any
;
; Examples:
;
; the rule [:!Ca :!T1]
; means from command a to control 1
; :!Ca is keycode :a and prefix a with !C
;
; !CTSequal_sign | mandatory command control shift =
; | which is command control +
; !O#Sright_arrow | mandatory option optional any right_arrow
;
; karabiner definition of mandatory and optional
; https://karabiner-elements.pqrs.org/docs/json/
; complex-modifications-manipulator-definition/from/modifiers/
;
; rule [<from> <to>]
; if simplified modifier is used in <to>, optional(#) definition will be
; ignored.
;
; Specific Rules Examples for future reference:
; {:des "Switch option and Command on external keyboards"
; :rules [[:##left_command :left_option [:drevo :leopold]]
; [:##left_option :left_command [:drevo :leopold]]]}
;
; -----------------------------------------------------------------------------
; USAGE
; With Karabiner-Elements and Goku installed and this config file stored at:
; ~/.config/karabiner.edn
; run the following commands (without backticks) as described
; `goku` compile EDN to karabiner.json (located in ~/.config/karabiner/)
; `gokuw` continually compile, watching EDN config file for changes
; `export GOKU_EDN_CONFIG_FILE=` assign new path to EDN config file location
; -----------------------------------------------------------------------------
; STRATEGY
; I try to NOT change any standard system shortcuts. So invoking the launcher
; (spotlight, launchbar, etc.) is still CMD+Space. That still works so if my
; karabiner setup fails, I can fall back to the standard shortcut.
; The other way of doing things would be to remap system shortcuts to expect
; the "hyper key" modifier combination. Bad for the the fail-safe reason just
; described.
; So below the config rules general show that Karabiner will ingest a Hyper
; modifier combination plus key(s) and then will convert that to the standard
; system shortcut. Additionally this maps well to strategies like the universal
; sidebar (see config) where we remap a single "Hyper+B" key shortcut to unique
; shortcuts based on current application.
; -----------------------------------------------------------------------------
; IMPORTANT NOTE ABOUT HYPER KEY IMPLEMENTATION
;
; Hyper is, in this file, a shorthand for combined command-option-control
; modifers pressed simultaneously. In other configs you may see it as
; command-option-control-shift. I have chosen to implement it as cmd-opt-ctrl
; as this allows me to use my "hyper" key with optional shift as desired.
;
; Additionally, there are multiple ways of implementing Hyper in Karabiner/Goku.
; One could create a "classic" Goku layer (modal keyboard layer state change)
; where pressing your selected hyper key (capslock in this case) would have
; similar functionality to what I have done here. Additionally you could use
; Goku simlayer definitions to do this.
;
; I have elected to instead implement Hyper without the elegance/clarity/
; simplicity of layers/simlayers. Instead you can read in the config below that
; I have created each rule as a standalone declaration of a modified key, for
; example:
;
; [:!CTOspacebar :!Cspacebar]
;
; which means cmd-ctrl-opt + spacebar should generate a cmd-spacebar event.
;
; The advantage to doing this is singular but imporant: it means that any
; additional modifiers can be pressed with the Hyper key and critically can be
; pressed BEFORE the Hyper key. If I were to use layers, and I wanted to
; enable Hyper+Shift+Spacebar, I would have to press shift after, and ONLY
; after the Hyper key. In my selected syntax the order is arbitrary because
; all capslock is doing is generating the cmd-ctrl-opt modifiers, not entering
; a layer. This is just better for how my hands work on the keyboard. I can be
; sloppy about order of key presses and things still work. Like they should.
;
; Thus my Hyper+Shift+Spacebar == cmd+shift+spacebar rule looks like this:
;
; [:!CTOSspacebar :!CSspacebar]
;
; and (perhaps burying the lede here) my actual Hyper key definition looks like
; this (returning cmd-ctrl-opt on hold, esc on tap):
;
; [:##caps_lock :!CTleft_option nil {:alone :escape}]
;
; -----------------------------------------------------------------------------
; } SUMMARY AND COMMENTS
{ ; CONFIG ====================================================================
; PROFILES
; -----------------------------------------------------------------------------
; Notes:
;
; Make sure you have a "Default" named profile. It is not present on a
; clean install. Find alone, delay, etc. in the parameters tab of K-E UI under
; complex rules section. These values are in milliseconds.
;
; sim vs simlayer-threshold:
; After testing I'm using the ":sim" setting, not ":simlayer-threshold" as the
; latter had no apparent effect. However this bears review and monitoring.
; c.f. https://github.com/yqrashawn/GokuRakuJoudo/pull/96
; :sim sets the default basic.simultaneous_threshold_milliseconds
; :simlayer-threshold override :sim in each rule in the
; parameters.basic.simultaneous_threshold_milliseconds
:profiles {
:Default {
:default true ; "unspecified rules go here"
; this profile is where rules are placed unless
; specified as part of other named profile
:alone 1000 ; "one-tap timeout"
; on keys, allowing one-shot use of modifiers, e.g.
:delay 500 ; "double-tap timeout"
; allowing unique rule on quick double press
:held 500 ; "timeout before repeat"
; hold a key for > than this and it begins repeat
:sim 100}} ; "simlayer window"
; press a 2nd simultaneous key within X ms for\
; layer functionality
; MODIFIERS (SECTION UNUSED/COMMENTED OUT)
; -----------------------------------------------------------------------------
; Aliases for common modifiers and modifier combinations
; Below I assign hyper to command-control-option so that I can also have a
; convenient "hyper-shift" option. This is contrary to common use of the term
; hyper to refer to a combination of cmd-ctrl-opt-shift.
; c.f. emilbryggare config above.
;
;:modifiers {
; :hyper [ :command :control :option ]
; :hyper-shift [ :command :control :option :shift ]
; :super-hyper [ :command :shift :control :option :fn ]
; :cos [ :command :shift :option ]
; :cst [ :command :shift :control ]
; :co [ :command :option ]
; :cs [ :command :shift ]
; :ct [ :command :control ]
; :to [ :control :option ]
; :ts [ :control :shift ]
; :os [ :option :shift ]
;}
; DEVICES (ONLY THOSE NEEDING TO BE TRACKED)
; -----------------------------------------------------------------------------
:devices {:mxmaster [{:product_id 45091 :vendor_id 1133}]}
; SIMLAYERS
; -----------------------------------------------------------------------------
; enable keyboard layer functionality
:simlayers {
; LAUNCHER MODE: space shifts to "app launcher" mode (see rules)
:launcher-mode {
:key :spacebar}}
; HYPER MODE: hold capslock == hyper (cmd+ctrl+opt+shift)
; tap capslock == escape
;:hyper-mode {:key :caps_lock :alone {:key :escape}}
; TEMPLATES
; -----------------------------------------------------------------------------
; reusable template of code that can be applied using an alias w/placeholders
; TODO: create the following types of templates:
; jump to current window or launch if no current window/app
; bring current window to this workspace even if present elsewhere, or launch
; "scratchpad" style: hide if visible, bring to space if elsewhere, launch if not open
:templates {
; LAUNCH APP: launch named app without path prefix needed
:launch-app "open -a '%s'"
; OPEN: open arbitrary file with default application
:open "open %s"
; TOGGLE FINDER: OLD hiding method
; set visible of process \"Finder\" to false
; TOGGLE FINDER: most useful if finder assigned to "all-desktops"
:toggle-finder "osascript -e '
tell application \"Finder\"
if frontmost then
set visible to false
else
activate
if (count windows) is 0 then
open home
end if
set index of window 1 to 1
end if
end tell'"
; TOGGLE BROWSER: most useful if finder assigned to "all-desktops"
:toggle-browser "osascript -e '
tell application \"Safari\"
if frontmost then
set visible of process \"Safari\" to false
else
activate
if (count windows) is 0 then
open home
end if
set index of window 1 to 1
end if
end tell'"
; TOGGLE APP (TESTING): similar to above but attempt at generalizing
:showhide "osascript -e '
set targetApp to \"%s\"
tell application \"System Events\"
set newVisible to not (visible of application process targetApp)
set visible of application process targetApp to newVisible
end tell
if newVisible then tell application targetApp to activate
'"
; TOGGLE APP (TESTING): similar to above but attempt at generalizing
:toggle-app "osascript -e '
set targetApp to \"%s\"
tell application \"System Events\"
set isVisible to visible of application process targetApp
set visible of application process targetApp to not isVisible
tell application targetApp
activate
set index of window 1 to 1
end tell
end tell'"
; NEW SAFARI: could be improved but basically xmonad style "raise-or-new"
:new-safari "osascript -e '
on count_windows_on_current_space(process_name)
tell application \"System Events\"
tell process process_name
return count of windows
end tell
end tell
end count_windows_on_current_space
tell application \"Safari\"
set windowList to windows
repeat with windowItem in windowList
get properties of windowItem
end repeat
if my count_windows_on_current_space(\"Safari\") = 0 then
make new document
activate
else
activate
end if
--open location \"https://ethanschoonover.com/\"
end tell'"
; DISPLAY RESET/TOGGLE: macOS doesn't check ID of displays on resume
; so this utility allows for toggling them if they wake up in the wrong
; order. macOS should be smarter about this. uses "displayplacer" in script.
:dispreset "/Users/es/bin/dispreset"
; SAMPLE that I took from someone's config
:ui_audio_enabled "defaults write 'Apple Global Domain' com.apple.sound.uiaudio.enabled -int %s"}
; Enable or disable "Play user interface sound effects"
; ui_audio_enabled 0 (off) or 1 (on)
; APPLICATIONS
; -----------------------------------------------------------------------------
; Aliases for common applications. Quick discovery via applescript:
; osascript -e 'id of app "Finder"'
:applications {
:safari ["^com\\.apple\\.Safari$"]
:chrome ["^com\\.google\\.Chrome$"]
:finder ["^com\\.apple\\.finder$"]
:typora ["^abnerworks\\.Typora$"]
:notes ["^com\\.apple\\.Notes$"]
:calendar ["^com\\.apple\\.iCal$"]
:fantastical ["^com\\.flexibits\\.fantastical2\\.mac$"]
:devonthink ["^com\\.devon-technologies\\.think3$"]
:fusion ["^com\\.apple\\.fusion$"]
:reminders ["^com\\.apple\\.reminders$"]
:1password ["^com\\.1password\\.1password$"]
:mail ["^com\\.apple\\.mail$"]
:mailmate ["^com\\.freron\\.MailMate$"]
:music ["^com\\.apple\\.Music$"]
:news ["^com\\.apple\\.news$"]
;:preview ["^com\\.apple\\.Preview$"]
:preview1 ["^com\\.apple\\.Preview$" :previewsidebar]
:preview0 ["^com\\.apple\\.Preview$" :!previewsidebar]
:nova ["^com\\.panic\\.Nova$"]
:slack ["^com\\.tinyspeck\\.slackmacgap$"]
:houdahspot ["^com\\.houdah\\.HoudahSpot4$"]
:forklift ["^com\\.binarynights\\.ForkLift-3$"]
:terminal ["^com\\.apple\\.Terminal$"]
:lightroom ["^com\\.adobe\\.lightroomCC$"]
:iawriter ["^pro\\.writer\\.mac$"]
:agenda ["^com\\.momenta\\.agenda.macos$"]
:noteplan ["^co\\.noteplan\\.NotePlan3$"]
:obsidian ["^md\\.obsidian$"]
:code ["^com\\.visualstudio\\.code\\.oss$"
"^com\\.microsoft\\.VSCode(Insiders)?$"
"^com\\.microsoft\\.VSCode?$"]
:terminals ["^com\\.apple\\.Terminal$"
"^com\\.googlecode\\.iterm2$"]}
; FROMS
; -----------------------------------------------------------------------------
:froms {:from-hyper-left-click {
:pkey :button1 :modi [:left_control :left_option :left_command]}}
; TOS
; -----------------------------------------------------------------------------
:tos {
:launchbar {:key :return_or_enter :modi :command}
:spotlight {:key :return_or_enter :modi :command}
:launchbar-emoji [:key :return_or_enter :modi [:command :shift]]}
; RULES
; -----------------------------------------------------------------------------
:main [
; Q | right_command
; W | right_control
; E | right_option
; R | right_shift
; P | caps_lock
; THIS SECTION NOW MIGRATED TO HYPER KEY LAUNCHER SECTION BELOW
; { :des "LAUNCHER: Spacer+KEY launches app (j/q/f/s)"
; :rules [
; :launcher-mode
; [:j [:launch-app "VLC"]] ; mostly my go-to test case
; [:q [:!CTq]] ; lock screen
; [:d [:toggle-finder]] ; mid complexity apple script toggler
; [:s [:new-safari]] ; low complexity safari window launcher
; ]}
{ :des "HYPER: Caps Lock = Hyper key (ctrl-cmd-opt) on hold, ESC on tap"
:rules [[:##caps_lock :!CTleft_option nil {:alone :escape}]]}
{ :des "HYPER: Hyper = CMD with muscle memory keys (w/t/n/s/a/,/return)"
:rules [
; Emultate Command with Common "Muscle Memory" Keys
[:!CTOw :!Cw] ; hyper-w == cmd-w (close window)
[:!CTOq :!Cq] ; hyper-q == cmd-q (quit window)
[:!CTOt :!Ct] ; hyper-t == cmd-t (new tab)
[:!CTOs :!Cs] ; hyper-s == cmd-s (save)
[:!CTOa :!Ca] ; hyper-a == cmd-a (select all)
[:!CTOn :!Cn] ; hyper-n == cmd-n (new)
[:!CTOr :!Cr] ; hyper-r == cmd-r (reload)
[:!CTOreturn_or_enter :!Creturn_or_enter]]} ; (current Tot shortcut)
{ :des "HYPER: Hyper+B = Universal sidebar toggle"
:rules [
; Show sidebar
[:!CTOb [:!OCs] :notes]
[:!CTOb [:!SCl] :safari]
[:!CTOb [:!COb] :chrome] ; shows bookmark manager
[:!CTOb [:!CTb] :nova]
[:!CTOb [:!Cb] :code]
[:!CTOb [:!CTs] :finder]
[:!CTOSb [:!CSp] :finder]
[:!CTOb [:!CTs] :mail]
[:!CTOb [:!CTOd] :mailmate]
[:!CTOb [:!COs] :fantastical]
[:!CTOb [:!CO2 ["previewsidebar" 0]] :preview1]
[:!CTOb [:!CO1 ["previewsidebar" 1]] :preview0]
[:!CTOb [:!COs] :reminders]
[:!CTOb [:!CSm] :music] ; no sidebar toggle so miniplayer
[:!CTOb [:!CTs] :news]
[:!CTOb [:!CSd] :slack]
[:!CTOb [:!COs] :houdahspot]
[:!CTOb [:!COs] :forklift]
[:!CTOb [:p] :lightroom]
[:!CTOb [:!CTs] :iawriter]
[:!CTOb [:!COs] :agenda] ; toggles left sidebar
;[:!CTOb [:!COs :!COi] :agenda] ; toggles BOTH sidebars
[:!CTOSb [:!COi] :agenda] ; toggles right sidebar
; (hyper+shift+b)
[:!CTOb [:!CO1] :noteplan] ; toggles left sidebar
[:!CTOSb [:!CO2] :noteplan] ; toggles right sidebar
[:!CTOb [:!CSd] :1password] ; toggles sidebar
; could change to COl
; for icon sidebar
[:!CTOb [:!CO1] :devonthink] ; add cmd-opt-i to hide info pane
[:!CTOb [:!CSbackslash] :terminal] ; no sidebar so tab overview
[:!CTOb [:!CTs]]]} ; default cmd-ctrl-s to show/hide
; sidebar in other apps.
; might be better to remove this?
{ :des "HYPER: Hyper+Shift+Space = Application specific command palette"
:rules [
; Show sidebar
[:!CTOSspacebar [:!Cp] :obsidian]
[:!CTOSspacebar [:!Cspacebar]]]} ; default cmd-space
{ :des "HYPER: Hyper+Shift+Space = Application specific nav back/forward"
:rules [
; Show sidebar
[:!CTOSopen_bracket [:!COleft_arrow] :obsidian]
[:!CTOSclose_bracket [:!COright_arrow] :obsidian]
[:!CTOSopen_bracket [:!Copen_bracket]]
[:!CTOSclose_bracket [:!Cclose_bracket]]
]} ; default cmd-space
{ :des "HYPER: Hyper+x/c/v/z = Cut/Copy/Paste/Undo/Find"
:rules [
; Cut/Copy/Paste/Undo
[:!CTOx :!Cx]
[:!CTOc :!Cc]
[:!CTOv :!Cv]
[:!CTOz :!Cz]
[:!CTOf :!Cf]
]}
{ :des "HYPER: Hyper x/c/v/z emulates Cut/Copy/Paste/Undo"
:rules [
; Vim-like navigation
[:!CTOh :left_arrow] ; hyper-h == cursor left
[:!CTOj :down_arrow] ; hyper-j == cursor down
[:!CTOk :up_arrow] ; hyper-k == cursor up
[:!CTOl :right_arrow] ; hyper-l == cursor right
; Jumps left/right
[:!CTOSh :!Cleft_arrow] ; hyper shift h == beginning of line
[:!CTOSl :!Cright_arrow] ; hyper shift l == end of line
; MAYBE: make following jumps hyper-d and hyper-u (down/up)
; and then make semicolon/quote end of line nav?
; Shift+J/K = page down/up
[:!CTOm :page_down]
[:!CTOcomma :page_up]]}
;[:!CTOb :!Oleft_arrow] ; hyper b == back a word
;[:!CTOn :!Oright_arrow] ; hyper n == next word
;[:!CTOu :!Cup_arrow] ; hyper u == top of text
;[:!CTOi :!Cdown_arrow] ; hyper i == bottom of text
{ :des "HYPER: Hyper+u/i/o/p/1-4 = Expose & Spaces Navigation"
:rules [
[:!CTOu :!Tleft_arrow] ; hyper ; == ctrl-left / space left
[:!CTOi :!Tright_arrow] ; hyper ' == ctrl-right / space right
[:!CTOo :!Tup_arrow] ; hyper / == ctrl-up / exposé
[:!CTOp :!Tdown_arrow] ; hyper ? == ctrl-down / app exposé
[:!CTO1 :!T1] ; hyper ? == ctrl-down / space 1
[:!CTO2 :!T2] ; hyper ? == ctrl-down / space 2
[:!CTO3 :!T3] ; hyper ? == ctrl-down / space 3
[:!CTO4 :!T4]]} ; hyper ? == ctrl-down / space 4
{ :des "HYPER: Hyper+[/] = previous/next tab"
:rules [
[:!CTOopen_bracket [:!Copen_bracket] :noteplan] ; hist nav left
[:!CTOclose_bracket [:!Cclose_bracket] :noteplan] ; hist nav left
[:!CTOopen_bracket :!CSopen_bracket] ; prev tab
[:!CTOclose_bracket :!CSclose_bracket]]} ; next tab
{ :des "HYPER: Hyper+space = cmd+space (optionally w/shift) for use w/launcher of choice"
:rules [
[:!CTOspacebar :!Cspacebar] ; hyper-space == command-space
[:!CTOSspacebar :!COspacebar]]} ; hyper-shift-space == cmd-shift-space
{ :des "HYPER: Hyper+E = Launchbar Emojis" :rules [[:!CTOe [:!CSspacebar]]]}
{ :des "HYPER: Hyper+0 = swap displays around"
:rules [[:!CTO0 [:dispreset]]]} ; hyper-0 == run dispreset command
{ :des "RECTANGLE: Window positioning key chords"
:rules [[[:up_arrow :down_arrow] :!TOdelete_or_backspace] ; restore-original
[[:left_arrow :right_arrow :down_arrow] :!TOreturn_or_enter] ; fake-full-screen
[[:left_arrow :down_arrow] :!TOleft_arrow] ; 1/2 left
[[:right_arrow :down_arrow] :!TOright_arrow] ; 1/2 right
[[:left_arrow :up_arrow] :!TOe] ; 2/3 left-then-cycle
[[:right_arrow :up_arrow] :!TOg] ; 1/3 right-then-cycle
]
}
; LAUNCHERS
;{ :des "HYPER: Hyper+D = Toggle Finder" :rules [[:!CTOd [:toggle-finder]]]}
{:des "HYPER: Hyper+D = Toggle Finder" :rules [[:!CTOd [:showhide "ForkLift"]]]}
{:des "HYPER: Hyper+Quote = Toggle Browser" :rules [[:!CTOquote [:toggle-browser]]]}
;{ :des "HYPER: Hyper+Q = Lock Screen" :rules [[:!CTOq :!CTq]]}
{:des "HYPER: Hyper+` = Lock Screen" :rules [[:!CTOgrave_accent_and_tilde :!CTq]]}
{:des "HYPER: Hyper+R = Raise Safari" :rules [[:!CTOr [:new-safari]]]}
; MOUSE - GENERAL
; Note - currently this isn't being used on my MX Master mouse as that
; is managed by SteerMouse in system preferences. The reason for this is
; that Karabiner Elements doesn't parse one of the buttons (
; middle button) and so I need SteerMouse to do that.
{:des "MOUSE: Hyper + Left Mouse = CMD+Click"
:rules [[:from-hyper-left-click {:pkey :button1 :modi :left_command}]]}]}
; CONFIG ====================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment