Keybinding
brew install karabiner-elements
Install karabiner element and grant the requested permission.
Left Shift for Switching Input Sources
{"title":"Use shift to switch input sources","rules":[{"description":"Use left_shift to switch input sources","manipulators":[{"conditions":[{"bundle_identifiers":["^com\\.teamviewer\\.TeamViewer$","^com\\.vmware\\.horizon$","^com\\.vmware\\.fusion$","^com\\.vmware\\.view$","^com\\.parallels\\.desktop$","^com\\.parallels\\.vm$","^com\\.parallels\\.desktop\\.console$","^org\\.virtualbox\\.app\\.VirtualBoxVM$","^com\\.citrix\\.XenAppViewer$","^com\\.vmware\\.proxyApp\\.","^com\\.parallels\\.winapp\\.","^com\\.oray\\.sunlogin\\.macclient$","^com\\.microsoft\\.rdc\\.macos$"],"type":"frontmost_application_unless"}],"from":{"key_code":"left_shift","modifiers":{"optional":["caps_lock"]}},"parameters":{"basic.to_if_alone_timeout_milliseconds":200,"basic.to_if_held_down_threshold_milliseconds":200},"to":[{"key_code":"left_shift","lazy":true}],"to_if_alone":[{"key_code":"spacebar","modifiers":"control"}],"to_if_held_down":[{"key_code":"left_shift"}],"type":"basic"}]},{"description":"Use right_shift to switch input sources","manipulators":[{"conditions":[{"bundle_identifiers":["^com\\.teamviewer\\.TeamViewer$","^com\\.vmware\\.horizon$","^com\\.vmware\\.fusion$","^com\\.vmware\\.view$","^com\\.parallels\\.desktop$","^com\\.parallels\\.vm$","^com\\.parallels\\.desktop\\.console$","^org\\.virtualbox\\.app\\.VirtualBoxVM$","^com\\.citrix\\.XenAppViewer$","^com\\.vmware\\.proxyApp\\.","^com\\.parallels\\.winapp\\.","^com\\.oray\\.sunlogin\\.macclient$"],"type":"frontmost_application_unless"}],"from":{"key_code":"right_shift","modifiers":{"optional":["caps_lock"]}},"parameters":{"basic.to_if_alone_timeout_milliseconds":200,"basic.to_if_held_down_threshold_milliseconds":200},"to":[{"key_code":"right_shift","lazy":true}],"to_if_alone":[{"key_code":"spacebar","modifiers":"control"}],"to_if_held_down":[{"key_code":"right_shift"}],"type":"basic"}]}]}
Caps lock as Escape
{
"description": "Caps Lock to Esc and Ctrl",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_control"
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
}
Option as alt (not recommand)
https://github.com/alacritty/alacritty/issues/4048
Search “Map Option to soft-meta for Alacritty” on https://ke-complex-modifications.pqrs.org/
Lang
Go
Follow official installation - https://go.dev/doc/install.
My directory would be /Users/$USER/Library/
.
Some modification on config according to your installation directory. Below is my config, you can make your own.
go env -w GOPATH=/Users/$USER/Library/go
go env -w GOMODCACHE=/Users/$USER/Library/go/pkg/mod
go env -w GO111MODULE=auto
Python
conda
, even miniconda
is heavy, pyenv
is light-weight and straight-forward.
conda
is easier, however, make your own choice. I prefer pyenv
.
brew install pyenv
brew install pyenv-virtualenv
pyenv install 3.12.0
pyenv global 3.12.0
# pyenv virtualenv 3.12.0 <COSTUM_NAME>
# pyenv global <COSTUM_NAME>
Javascript
use fnm
command line tool
Rust
use rustup
# config for rustfmt, i use tab_spaces = 2
ln -s ~/.config/rustfmt/ /Users/humborn/Library/Application\ Support/rustfmt
Main
plz refer to my dotfile.