Skip to content

🔧 .files — including more useful keyboard hack

Notifications You must be signed in to change notification settings

WhatTheFar/dotfiles

Repository files navigation

WhatTheFar’s dotfiles

This setup is heavily inspired from Mathias’s dotfiles

Features

Supercharge caps lock key

By repurposing the anachronistic caps lock key, we can make control and escape accessible via the home row.

  • Tap caps lock for escape
  • Hold caps lock for control

Say goodbye to Emacs pinky. 👋

(S)uper (D)uper Mode

To activate, push the s and d keys simultaneously and hold them down. Now you're in (S)uper (D)uper Mode. It's like a secret keyboard inside your keyboard. (Whoa.) It's optimized for keeping you on the home row, or very close to it. Now you can:

  • Use h / j / k / l for left/down/up/right respectively
  • Use a for option (AKA alt)
  • Use f for command
  • Use space for shift
  • Use a + j / k for page down / page up
  • Use i / o to move to the previous/next tab
  • Use u / p to go to the first/last tab (in most apps)
  • Use a + h / l to move to previous/next word (in most apps)

(S)uper (D)uper Mode Keybindings

📣 Shout-out to Karabiner's Simultaneous vi Mode for providing the inspiration for (S)uper (D)uper Mode. ⌨:neckbeard:✨

Hyper key for quickly launching apps

macOS doesn't have a native hyper key. But thanks to Karabiner-Elements, we can create our own. In this setup, we'll use the right option key as our hyper key.

With a new modifier key defined, we open a whole world of possibilities. I find it especially useful for providing global shortcuts for launching apps.

Default app keybindings

  • hyper + b to open Google Chrome ("B" for "Browser")
  • hyper + c to open LINE ("C for "Chat")
  • hyper + d to open Discord ("D" for "Discord")
  • hyper + e to open Visual Studio Code ("E" for "Editor")
  • hyper + f to open Fork ("F" for "Fork")
  • hyper + m to open Spotify ("M" for "Music")
  • hyper + s to open Slack ("S" for "Slack")
  • hyper + t to open iTerm2 ("T" for "Terminal")

Prerequisite

  • Set Apple ID for App Store
  • Run the following codes to:
    • Install Homebrew
    • Install oh-my-zsh
    • Install zinit
# install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# install zinit
# (follow official doc)

Bootstrapping

Warning: do not run this until you know what it does

./bootstrap.sh

Manual Setups

Accessibility

Zoom

Go to System Preferences -> Accessibility -> Zoom

  • Use scroll gesture with modifier keys to zoom -> ^ Control
  • Zoom follows the keyboard focus

Three finger dragging

Go to System Preferences -> Accessibility -> Mouse & Trackpad -> Trackpad Options...

  • Enable dragging -> three finger drag

Alfred

In advanced setting page, set preferences folder to alfred3.

References

Mathias’s dotfiles

Toward a more useful keyboard

License

Copyright 2019 Jakpat Mingmongkolmitr

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

🔧 .files — including more useful keyboard hack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published