You need to have environment in your .zshenv first. My config is:
export WORKSPACE="$HOME/projects"
mkdir -p $WORKSPACE
cd $WORKSPACE
git clone git@github.com:suonlight/dotfiles.git
mkdir -p ~/.config/nvim
mkdir -p ~/.config/bat
rm -rf ~/.zshrc ~/.tmux.conf ~/.tmux.sp ~/.ctags ~/.editorconfig ~/.config/doom ~/.config/nvim ~/.config/alacritty
ln -s $WORKSPACE/dotfiles/.zshrc ~/.zshrc
ln -s $WORKSPACE/dotfiles/.tmux.conf ~/.tmux.conf
ln -s $WORKSPACE/dotfiles/.tmux.sp ~/.tmux.sp
ln -s $WORKSPACE/dotfiles/.editorconfig ~/.editorconfig
ln -s $WORKSPACE/dotfiles/.ctags ~/.ctags
ln -s $WORKSPACE/dotfiles/nvim ~/.config/nvim
ln -s $WORKSPACE/dotfiles/doom ~/.config/doom
ln -s $WORKSPACE/dotfiles/karabiner ~/.config/karabiner
ln -s $WORKSPACE/dotfiles/tridactyl ~/.config/tridactyl
ln -s $WORKSPACE/dotfiles/alacritty ~/.config/alacritty
ln -s $WORKSPACE/dotfiles/bat.conf ~/.config/bat/config
# for ubuntu
ln -s $WORKSPACE/dotfiles/ubuntu/alacritty ~/.config/alacritty
ln -s $WORKSPACE/dotfiles/xremap ~/.config/xremap
ln -s $WORKSPACE/dotfiles/systemd ~/.config/systemd
brew install neovim
Start nvim then run `:PackerInstall` to install vim’s Plugins
brew install tmux
# install tpm
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
Start tmux then press `C-SPC I` (C-SPC means tmux prefix) to install tpm plugins
brew install zsh zsh-completions
chsh -s /bin/zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
brew install zplug
brew install gcc libgccjit
# need to reinstall if you already installed $ brew reinstall gcc libgccjit
brew tap d12frosted/emacs-plus
brew install emacs-plus@29 --with-native-comp --with-modern-sexy-v1-icon
rm -rf ~/.emacs.d
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/projects/doom-emacs
ln -s ~/projects/doom-emacs ~/.config/emacs
ln -s ~/projects/dotfiles/doom ~/.config/doom
rm -rf ~/.config/doom/snippets
ln -s ~/.config/doom/private/snippets ~/.config/doom/snippets
cd ~/.config/emacs
bin/doom install
To make sure vterm use zsh by default
export SHELL=/usr/bin/zsh
bin/doom sync
https://asdf-vm.com/#/core-manage-asdf-vm
asdf plugin-add postgres
asdf plugin-add ruby
asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf plugin-add yarn
brew install ripgrep
brew install autojump
brew install wget
asdf plugin add fd
asdf install fd latest
asdf global fd 8.2.1
asdf plugin add fzf https://github.com/kompiro/asdf-fzf.git
asdf install fzf latest
asdf global fzf 0.27.2
asdf plugin-add yq https://github.com/sudermanjr/asdf-yq.git
asdf install yq 4.0.0
asdf global yq 4.0.0
asdf plugin add bat
asdf install bat latest
asdf global bat 0.18.3
asdf install ruby 2.6.6
asdf global ruby 2.6.6
POSTGRES_EXTRA_CONFIGURE_OPTIONS=--with-uuid=e2fs asdf install postgres 13.4
asdf global postgres 13.4
asdf plugin-add redis https://github.com/smashedtoatoms/asdf-redis.git
asdf install redis latest
asdf global redis 6.2.6
brew install gnupg
bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring
asdf install nodejs 12.22.4
asdf global nodejs 12.22.4
asdf install yarn 1.21.1
asdf global yarn 1.21.1
asdf plugin-add python
asdf install python 2.7.16
asdf install python 3.9.1
asdf global python 2.7.16 3.9.1
asdf plugin-add R https://github.com/taiar/asdf-R.git
R_EXTRA_CONFIGURE_OPTIONS=--with-x=no asdf install R 4.0.3
asdf global R 4.0.3
install.packages("dplyr")
install.packages("ggplot2")
asdf plugin-add java https://github.com/halcyon/asdf-java.git
asdf install java adoptopenjdk-15.0.1+9
asdf global java adoptopenjdk-15.0.1+9
curl https://sh.rustup.rs -sSf | sh
rustup toolchain add nightly
cargo +nightly install racer
cargo install rustfmt
rustup component add rls rust-analysis rust-src
brew install jq
brew install q
brew install ctags
# format sql
pip install sqlparse
brew install sqlformat
brew install mplayer
defaults write NSGlobalDomain KeyRepeat -int 1 # normal minimum is 2 (30 ms)
defaults write NSGlobalDomain InitialKeyRepeat -int 10
- Test on Emacs. Follow https://github.com/xuchunyang/setup-org-protocol-on-mac
emacsclient -c 'org-protocol:/capture?template=L&url=foo&title=bar'
- Test on Browser
location.href='org-protocol:/capture?template=E&url=foo&title=bar'
on open location this_URL
-- do shell script "/usr/local/bin/emacsclient \"" & this_URL & "\" -F '((name . \"doom-capture\") (width . 70) (height . 25) (transient . t))'"
do shell script "/usr/local/bin/emacsclient -F '((name . \"doom-capture\") (width . 70) (height . 25) (transient . t))' -e '(org-protocol-open-frame \"" & this_URL & "\")'"
activate application "Emacs"
end open location
or
cp ~/projects/dotfiles/org-protocol* /Applications/
- Open org-protocol and export it by application
- Edit Info.plist with
/Applications/org-protocol.app/Contents/Info.plist
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>org-protocol handler</string>
<key>CFBundleURLSchemes</key>
<array>
<string>org-protocol</string>
</array>
</dict>
</array>
- IMPORTANT: Exit and Active org-protocol.app by clicking on it
[
{
"key": "ctrl+shift+n",
"action": "javascript",
"blacklist": "false",
"sites": "*mail.google.com*",
"open": false,
"activeInInputs": true,
"code": "location.href = 'org-protocol://capture?template=N&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&body='+encodeURIComponent(window.getSelection()).replace(/'/g, '%27');",
"exported": false,
"sitesArray": [
"*mail.google.com*"
],
"customName": "Capture today notes"
},
{
"key": "ctrl+shift+e",
"action": "javascript",
"blacklist": "false",
"sites": "*mail.google.com*",
"open": false,
"code": "var activeTextarea = document.activeElement;\nvar selection = activeTextarea.tagName == \"TEXTAREA\" ? activeTextarea.value.substring(\n activeTextarea.selectionStart, activeTextarea.selectionEnd\n ) : window.getSelection();\n\nlocation.href='org-protocol://capture?template=E&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&body='+encodeURIComponent(selection)",
"activeInInputs": true,
"exported": false,
"sitesArray": [
"*mail.google.com*"
]
}
]
brew tap homebrew/cask-fonts && brew install --cask font-source-code-pro
Install all the icons by Emacs
(all-the-icons-install-fonts)
My talon config is here: https://github.com/suonlight/knausj_talon
git clone git@github.com:suonlight/knausj_talon.git $WORKSPACE/knausj_talon
mkdir -p ~/.talon/user ~/.config/polybar
rm -rf ~/.talon/user/knausj_talon
rm -rf ~/.talon/user/hero
ln -s $WORKSPACE/knausj_talon ~/.talon/user/knausj_talon
ln -s $WORKSPACE/dotfiles/doom/private/talon/hero ~/.talon/user/hero
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
Using emacs exwm
# polybar
rm -rf ~/.config/polybar
ln -s $WORKSPACE/dotfiles/polybar ~/.config/polybar
# x window
rm ~/.xinitrc ~/.xprofile
ln -s $WORKSPACE/dotfiles/.xinitrc ~/.xinitrc
ln -s $WORKSPACE/dotfiles/.xprofile ~/.xprofile