{"id":17383086,"url":"https://github.com/nishantbharali/setup","last_synced_at":"2026-04-13T21:04:09.963Z","repository":{"id":212772089,"uuid":"732280698","full_name":"NishantBharali/setup","owner":"NishantBharali","description":" This is a setup guide containing setup scripts and configurations for macOS (local) and Linux (remote) systems, aimed at streamlining the development environment setup.","archived":false,"fork":false,"pushed_at":"2023-12-16T06:33:14.000Z","size":169,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T20:49:10.986Z","etag":null,"topics":["git","setup-development-environment","setup-guide","setup-macos","shell-scripts"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NishantBharali.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-16T06:28:53.000Z","updated_at":"2023-12-16T06:36:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9cbbb66-3940-4567-9acd-748f02ee82b1","html_url":"https://github.com/NishantBharali/setup","commit_stats":null,"previous_names":["nishantbharali/setup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishantBharali%2Fsetup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishantBharali%2Fsetup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishantBharali%2Fsetup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishantBharali%2Fsetup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NishantBharali","download_url":"https://codeload.github.com/NishantBharali/setup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245924493,"owners_count":20694728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","setup-development-environment","setup-guide","setup-macos","shell-scripts"],"created_at":"2024-10-16T07:40:32.547Z","updated_at":"2026-04-13T21:04:09.934Z","avatar_url":"https://github.com/NishantBharali.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# This repo contains my setup files for Mac (local) and Linux (remote).\n\n# Installation\n## Run the command below in a terminal to set up a new macOS computer:\n## curl -s https://raw.githubusercontent.com/NishantBharali/setup/main/scripts/setup.sh | /bin/bash\n\n## This README is a symlink to the [setup.sh](scripts/setup.sh) script in the [scripts](scripts) directory.\n\n# Why Mac?\n## MacOS\n### MacOS is UNIX-based, unlike Windows, though Windows Subsystem for Linux (WSL) is a really big step forward.\n## Modifier keys\n### The Command key is used for MacOS keyboard shortcuts, limiting conflicts with Unix shortcuts that use Alt/Option or Control.\n#### The best option would be to install Linux on a Mac and configure the modifier keys (Cmd/Alt/Ctrl) to work like in MacOS, but who has time for that?\n\n# Mac System Preferences\n\n### For tons of MacOS setup examples, click the link below\n#### https://github.com/joeyhoer/starter/tree/master/system\n\n# 1: MacOS terminal and defaults\n### Open MacOS terminal using Spotlight search (Cmd Space)\n\n### Curl the `macos.terminal` file\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/macos.terminal -o ~/macos.terminal\n\n### Run the defaults commands below to setup MacOS\n\n# Ask for the administrator password upfront\nsudo -v\n\n# Keep-alive: update existing `sudo` time stamp until `setup.sh` has finished\nwhile true; do sudo -n true; sleep 60; kill -0 \"$$\" || exit; done 2\u003e/dev/null \u0026\n\n# Not all software is available on ARM processor Macs\necho A | softwareupdate --install-rosetta\n\n## Keyboard\n### https://apple.stackexchange.com/a/83923\n### In System Preferences \u003e Keyboard \u003e Keyboard:\n#### Key Repeat: Fast\ndefaults write -g KeyRepeat -int 1\n\n#### Delay Until Repeat: Short\ndefaults write -g InitialKeyRepeat -int 20\n\n#### Repeatedly engage a key when held (no need to press multiple times)\ndefaults write -g ApplePressAndHoldEnabled -bool false\n\n#### https://github.com/VSCodeVim/Vim#mac\ndefaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false         # For VS Code\n\ndefaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false # For VS Code Insider\n\ndefaults write com.visualstudio.code.oss ApplePressAndHoldEnabled -bool false    # For VS Codium\n\n# Disable automatic capitalization as it’s annoying when typing code\ndefaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false\n\n# Disable smart dashes as they’re annoying when typing code\ndefaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false\n\n# Disable automatic period substitution as it’s annoying when typing code\ndefaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false\n\n# Disable smart quotes as they’re annoying when typing code\ndefaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false\n\n# Disable auto-correct\ndefaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false\n\n# Enable full keyboard access for all controls\n# (e.g. enable Tab in modal dialogs)\ndefaults write NSGlobalDomain AppleKeyboardUIMode -int 3\n\n## Trackpad\n### In System Preferences \u003e Trackpad \u003e Point \u0026 Click, set tracking speed to max:\ndefaults write NSGlobalDomain com.apple.trackpad.scaling -float 3\n\n### and select Tap to click\ndefaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true\n\ndefaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1\n\ndefaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1\n\n## Notifications\n### Show notifications for only one second\ndefaults write com.apple.notificationcenterui bannerTime 1\n\n## Dock\n### Remove most icons from Dock\ndefaults write com.apple.dock persistent-apps -array\n\n### https://www.intego.com/mac-security-blog/unlock-the-macos-docks-hidden-secrets-in-terminal/\ndefaults write com.apple.dock static-only -bool true\n\n### 2-finger click on Dock and Turn Dock Hiding On\n### Automatically hide and show the Dock\ndefaults write com.apple.dock autohide -bool true\n\n### https://www.defaults-write.com/delete-the-hiding-dock-delay-in-os-x/\ndefaults write com.apple.Dock autohide-delay -float 0\n\n### https://macos-defaults.com/dock/autohide-time-modifier.html#set-to-0\ndefaults write com.apple.dock autohide-time-modifier -float 0\n\n### https://macos-defaults.com/misc/enable-spring-load-actions-on-all-items.html#set-to-true\ndefaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true\n\n### Disable the auto-hiding Dock delay\ndefaults write com.apple.dock autohide-delay -float 0\n\n### Disable the animation when hiding/showing the Dock\ndefaults write com.apple.dock autohide-time-modifier -float 0\n\n### Don’t animate opening applications from the Dock\ndefaults write com.apple.dock launchanim -bool false\n\n### Make Dock icons of hidden applications translucent\ndefaults write com.apple.dock showhidden -bool true\n\n### Don’t show recent applications in Dock\ndefaults write com.apple.dock show-recents -bool false\n\n# Minimize windows into their application’s icon\n# defaults write com.apple.dock minimize-to-application -bool true\n\n# Enable spring loading for all Dock items\ndefaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true\n\n# Show indicator lights for open applications in the Dock\ndefaults write com.apple.dock show-process-indicators -bool true\n\n## Sound\n\n#### Disable the sound effects on boot\nsudo nvram SystemAudioVolume=\" \"\n\n#### Disable user interface sound effects\ndefaults write \"Apple Global Domain\" com.apple.sound.uiaudio.enabled -int 0\n\n#### Disable user interface sound effects\ndefaults write com.apple.systemsound com.apple.sound.uiaudio.enabled -bool false\n\n#### Disable feedback when volume is changed\ndefaults write NSGlobalDomain com.apple.sound.beep.feedback -bool false\n\n#### Disable flashing the screen when an alert sound occurs (accessibility)\ndefaults write NSGlobalDomain com.apple.sound.beep.flash -bool false\n\n### Under Sound \u003e Sound Effects \"Show Sound in menu bar\" (doesn't work?)\ndefaults write com.apple.systemuiserver menuExtras -array \\\n    \"/System/Library/CoreServices/Menu Extras/AirPort.menu\" \\\n    \"/System/Library/CoreServices/Menu Extras/Bluetooth.menu\" \\\n    \"/System/Library/CoreServices/Menu Extras/Displays.menu\" \\\n    \"/System/Library/CoreServices/Menu Extras/Volume.menu\"\n\n## Finder\n\n# Finder: show status bar\ndefaults write com.apple.finder ShowStatusBar -bool true\n\n# Finder: show path bar\ndefaults write com.apple.finder ShowPathbar -bool true\n\n# Keep folders on top when sorting by name\ndefaults write com.apple.finder _FXSortFoldersFirst -bool true\n\n# When performing a search, search the current folder by default\ndefaults write com.apple.finder FXDefaultSearchScope -string \"SCcf\"\n\n# Enable spring loading for directories\ndefaults write NSGlobalDomain com.apple.springing.enabled -bool true\n\n# Remove the spring loading delay for directories\ndefaults write NSGlobalDomain com.apple.springing.delay -float 0\n\n# Use list view in all Finder windows by default\n# Four-letter codes for the other view modes: `icnv`, `clmv`, `glyv`\ndefaults write com.apple.finder FXPreferredViewStyle -string \"Nlsv\"\n\n# Disable the warning before emptying the Trash\ndefaults write com.apple.finder WarnOnEmptyTrash -bool false\n\n### Finder: show all filename extensions\ndefaults write NSGlobalDomain AppleShowAllExtensions -bool true\n\n### Display full POSIX path as Finder window title\ndefaults write com.apple.finder _FXShowPosixPathInTitle -bool true\n\n### Finder icons\ndefaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 3\n\n### https://macos-defaults.com/finder/quitmenuitem.html#set-to-true\n### Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons\ndefaults write com.apple.finder QuitMenuItem -bool true\n\n### https://macos-defaults.com/finder/fxenableextensionchangewarning.html#set-to-false\ndefaults write com.apple.finder FXEnableExtensionChangeWarning -bool false\n\n## Keyboard\ndefaults write NSGlobalDomain AppleKeyboardUIMode -int 3\n\n### Use scroll gesture with the Ctrl (^) modifier key to zoom\ndefaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true\n\ndefaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144\n\n### Follow the keyboard focus while zoomed in\ndefaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true\n\n### https://github.com/mathiasbynens/dotfiles/blob/main/.macos#L157\n### Disable press-and-hold for keys in favor of key repeat\ndefaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false\n\n### Set a blazingly fast keyboard repeat rate\ndefaults write NSGlobalDomain KeyRepeat -int 1\n\ndefaults write NSGlobalDomain InitialKeyRepeat -int 20\n\n### https://github.com/mathiasbynens/dotfiles/blob/main/.macos#L102\n### Disable automatic capitalization as it’s annoying when typing code\ndefaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false\n\n### Disable smart dashes as they’re annoying when typing code\ndefaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false\n\n### Disable automatic period substitution as it’s annoying when typing code\ndefaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false\n\n### Disable smart quotes as they’re annoying when typing code\ndefaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false\n\n### Disable auto-correct\ndefaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false\n\n## Menu bar\n### Under General \u003e Appearance select 'Automatically hide and show the menu bar'\ndefaults write NSGlobalDomain _HIHideMenuBar -bool true\n\n## Misc\n### Save to disk (not to iCloud) by default\ndefaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false\n\n### Use metric units\ndefaults write NSGlobalDomain AppleMetricUnits -bool true\n\n### Show language menu in the top right corner of the boot screen\nsudo defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool true\n\n### Disable shadow in screenshots\ndefaults write com.apple.screencapture disable-shadow -bool true\n\n### Speed up Mission Control animations\ndefaults write com.apple.dock expose-animation-duration -float 0.1\n\n# Set sidebar icon size to medium\ndefaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2\n\n# Disable the “Are you sure you want to open this application?” dialog\ndefaults write com.apple.LaunchServices LSQuarantine -bool false\n\n# Display ASCII control characters using caret notation in standard text views\n# Try e.g. `cd /tmp; unidecode \"\\x{0000}\" \u003e cc.txt; open -e cc.txt`\ndefaults write NSGlobalDomain NSTextShowsControlCharacters -bool true\n\n# Disable Resume system-wide\ndefaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false\n\n# Disable Notification Center and remove the menu bar icon\nlaunchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2\u003e /dev/null\n\n## Reset Finder and Dock to see results of `defaults` commands\nkillall Finder\n\nkillall Dock\n\n# 2: Default MacOS keybindings and keyboard layout\n\n### The default macOS keyboard has so-called \"dead keys\". Some of these \"dead keys\"\n### interfere with GNU emacs/readline shortcuts that should be available by default\n### everywhere. To deal with this problem, I created a keyboard layout called\n### undead. I also created a `DefaultKeyBinding.dict` that provides many GNU\n### emacs/readline shortcuts.\n\n\n#### Download keyboard layout and icon files `undead.keylayout` and `undead.icns` to `/Library/Keyboard Layouts/`\n##### This messes up ctrl u and k in alacritty and kitty\nsudo curl https://raw.githubusercontent.com/NishantBharali/setup/main/undead.icns -o /Library/Keyboard\\ Layouts/undead.icns\n\nsudo curl https://raw.githubusercontent.com/NishantBharali/setup/main/undead.keylayout -o /Library/Keyboard\\ Layouts/undead.layout\n\n#### Download Default MacOS keybinding dictionary file `DefaultKeyBinding.dict` to `/Library/Keybindings/`\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/DefaultKeyBinding.dict -o ~/Library/KeyBindings/DefaultKeyBinding.dict --create-dirs\n\n### For additional keyboard setup, we need Karabiner, but to install Karabiner, let's use Homebrew.\n\n# 3: Brew - commandline package manager\n## Install Homebrew (this also installs xcode tools needed for git)\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n\n(echo; echo 'eval \"$(/opt/homebrew/bin/brew shellenv)\"') \u003e\u003e ~/.zprofile\n\neval \"$(/opt/homebrew/bin/brew shellenv)\"\n\ngit config --global user.email 13444106+NishantBharali@users.noreply.github.com\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/Brewfile -o ~/.Brewfile\n\nif brew bundle install --file ~/.Brewfile; then echo brew install OK; fi\n\n# 4: Generate SSH keys for GitHub, GitLab, and Bitbucket\n\nmodel=$(sysctl hw.model | cut -d\\  -f2)\n\nyes y | ssh-keygen -t ed25519 -f ~/.ssh/$(whoami)_$model -C $(whoami)_$model -N ''\n\nssh-add ~/.ssh/$(whoami)_$model\n\ncat ~/.ssh/$(whoami)_$model.pub | pbcopy\n\necho \"Host *\\n\\tIdentityFile ~/.ssh/$(whoami)_$model\" \u003e\u003e ~/.ssh/config\n\n# 5: MacOS Applications\n## Install Ewka Nerdfont\n\ngit clone --depth 1 https://github.com/NishantBharali/ewka ~/NishantBharali/ewka\n\ncp ~/NishantBharali/ewka/nerd/* ~/Library/Fonts\n\n# Permissions\n\n# App shortcuts\n## Set VimR to be the default txt file editor\nduti -s com.qvacua.VimR txt all\n\nduti -s org.jupyter.jupyterlab-desktop ipynb all\n\n# Hammerspoon\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/init.lua -o ~/.hammerspoon/init.lua --create-dirs\n\n## miro window manager spoon\n### use `Alt Shift` as the modifier à la Amethyst\ncurl https://raw.githubusercontent.com/miromannino/miro-windows-manager/master/MiroWindowsManager.spoon.zip | tar -xf - -C ~/.hammerspoon/Spoons\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/MiroWindowsManager.lua -o ~/.hammerspoon/Spoons/MiroWindowsManager.spoon/init.lua --create-dirs\n\n# Terminal config files\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/alacritty.yml -o ~/.config/alacritty/alacritty.yml --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/kitty.conf -o ~/.config/kitty/kitty.conf --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/.hyper.js -o ~/.hyper.js --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/config.yaml -o ~/Library/Application\\ Support/tabby/config.yaml --create-dirs\n\n\n## Set up iterm2\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/com.googlecode.iterm2.plist -o ~/Library/Preferences/com.googlecode.iterm2.plist\n\n## Set up karabiner\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/karabiner.json -o ~/.config/karabiner/karabiner.json --create-dirs\n\n# 6: Command line tools\n## Set up fzf (fuzzy finder)\n## Set up bat and exa (for fzf file preview)\n## Set up fasd and fd (to provide inputs for fzf)\n## Set up xpdf (e.g. pdftotext - for fzf PDF file preview)\n## Set up vim and neovim\n\n## Create locations for undo files (just in case they are not created automatically)\nmkdir -p ~/.vim/undodir\n\nmkdir -p ~/.local/share/nvim/undo\n\n## Install fzf key bindings and fuzzy completion using the install script which runs the commented out code below\n### source /opt/homebrew/opt/fzf/shell/key-bindings.zsh\n### source /opt/homebrew/opt/fzf/shell/key-bindings.bash\n### source /opt/homebrew/opt/fzf/shell/completion.zsh\n### source /opt/homebrew/opt/fzf/shell/completion.bash\n/opt/homebrew/opt/fzf/install --completion --key-bindings --no-fish --no-update-rc\n\n# Use Bash as a backup\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/.bash_profile -o ~/.bash_profile\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/.inputrc -o ~/.inputrc\n\n# Zsh config\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/.zshrc -o ~/.zshrc\n\n# powerlevel10k config\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/.p10k.zsh -o ~/.p10k.zsh\n\n# git\n## config\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/.gitconfig -o ~/.gitconfig\n\n## Regular expressions for diffs\n### https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more\n### https://gist.github.com/tekin/12500956bd56784728e490d8cef9cb81\ncurl https://gist.githubusercontent.com/tekin/12500956bd56784728e490d8cef9cb81/raw/e474af61231687b0e1a4ec59d4becd97537ef6c0/.gitattributes -o ~/.gitattributes\n\n## automatically ignored files\n# git config, ignore, and attributes\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/.gitignore -o ~/.gitignore\n\n### Vim\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/.vimrc -o ~/.vimrc\n\n### Vim snippets\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/all.snippets -o ~/.config/coc/ultisnips/all.snippets --create-dirs\n\n### Neovim\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/init.vim -o ~/.config/nvim/init.vim --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/init.vim -o ~/.config/page/init.vim --create-dirs\n\necho 'let g:better_whitespace_enabled=0' \u003e\u003e ~/.config/page/init.vim\n\n### Neovim GUIs\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/ginit.vim -o ~/.config/nvim/ginit.vim --create-dirs\n\n### COC (Conqueror Of Completion)\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/coc-settings.json -o ~/.config/nvim/coc-settings.json --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/coc-settings.json -o ~/.vim/coc-settings.json --create-dirs\n\n## SpaceVim\ngit clone --depth 1 https://github.com/SpaceVim/SpaceVim.git ~/.SpaceVim\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/spacevim/init.toml -o ~/.SpaceVim.d/init.toml --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/spacevim/myspacevim.vim -o ~/.SpaceVim.d/autoload/myspacevim.vim --create-dirs\n\n## Lunar Vim\nyes y | bash \u003c(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/config.lua -o ~/.config/lvim/config.lua --create-dirs\n\n### Zed\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/zed.json -o ~/.config/zed/settings.json --create-dirs\n\n### JetBrains IDEs\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/.ideavimrc -o ~/.ideavimrc\n\n## Set up oh my tmux\ncurl https://raw.githubusercontent.com/gpakosz/.tmux/master/.tmux.conf -o ~/.tmux.conf\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/.tmux.conf.local -o ~/.tmux.conf.local\n\ngit clone --depth 1 https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm\n\n## Set up ipython\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/ipython_config.py -o ~/.ipython/profile_default/ipython_config.py --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/keybindings.py -o ~/.ipython/profile_default/startup/keybindings.py --create-dirs\n\n## Set up ptpython\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/config.py -o ~/Library/Application\\ Support/ptpython/config.py --create-dirs\n\n## Set up radian\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/.radian_profile -o ~/.radian_profile\n\nln -sf .radian_profile radian_profile.R\n\n## Set up btm\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/bottom.toml -o ~/.config/bottom/bottom.toml --create-dirs\n\n## Set up TabNine\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/tabnine_config.json -o ~/.config/TabNine/tabnine_config.json --create-dirs\n\n# 6: Conda environments (base, Python and R)\n### Install cookiecutter (for i alias) and neovim (for vim plugins)\n\n/opt/homebrew/Caskroom/mambaforge/base/bin/mamba install -yc conda-forge python neovim\n\n/opt/homebrew/Caskroom/mambaforge/base/bin/mamba create -yc conda-forge -n py python neovim jupyterlab jupyterlab_vim jupyter-cache joblib seaborn numpy pandas scikit-learn scipy\n\n/opt/homebrew/Caskroom/mambaforge/base/envs/py/bin/python -m pip install jupyterlab-quarto radian\n\n# 7: Code editors\n\n### Jupyter settings\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/shortcuts.jupyterlab-settings -o ~/.jupyter/lab/user-settings/@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/vimrc.jupyterlab-settings -o ~/.jupyter/lab/user-settings/jupyterlab-vimrc/vimrc.jupyterlab-settings --create-dirs\n\n### PyCharm settings\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/settings.zip -o ~/settings.zip\n\n## Set up RStudio\n### `brew install --cask rstudio` works (rstudio is included in `Brewfile`)\n### As of 2023-06-23, RStudio only works with the graphical R installer (not brew or conda)\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/rstudio-prefs.json -o ~/.config/rstudio/rstudio-prefs.json --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/editor_bindings.json -o ~/.config/rstudio/keybindings/editor_bindings.json --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/rstudio_bindings.json -o ~/.config/rstudio/keybindings/rstudio_bindings.json --create-dirs\n\n# Initialize conda for z shell\n/opt/homebrew/bin/mamba init zsh\n\n# Set up vscode and vscodium\n### As of 2023-06-23, VSCode only works with the graphical R installer (not brew or conda)\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/settings.json -o ~/Library/Application\\ Support/Code/User/settings.json --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/settings.json -o ~/Library/Application\\ Support/VSCodium/User/settings.json --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/keybindings.json -o ~/Library/Application\\ Support/Code/User/keybindings.json --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/keybindings.json -o ~/Library/Application\\ Support/VSCodium/User/keybindings.json --create-dirs\n\n# Set up emacs\n\n### Spacemacs\nrm -rf ~/.emacs.d\n\ngit clone --depth 1 https://github.com/syl20bnr/spacemacs ~/.emacs.d\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/.spacemacs -o ~/.spacemacs\n\n#### Launch spacemacs as daemon to finish setup\n/opt/homebrew/bin/emacs --no-window-system --daemon --no-init-file --load ~/.emacs.d/init.el\n\n### Doom emacs\nexport DOOMDIR=$HOME/.config/doom\n\ngit clone --depth 1 https://github.com/hlissner/doom-emacs ~/.config/emacs/\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/config.el -o ~/.config/doom/config.el --create-dirs\n\ncurl https://raw.githubusercontent.com/NishantBharali/setup/main/packages.el -o ~/.config/doom/packages.el\n\nif yes y | ~/.config/emacs/bin/doom install; then echo doom install OK; fi\n\n# Install fasd via git and make (brew install fasd is not working)\ngit clone --depth 1 https://github.com/whjvenyl/fasd.git whjvenyl/fasd \u0026\u0026 cd whjvenyl/fasd \u0026\u0026 sudo make install \u0026\u0026 cd\n\n#### The line below has to be at the bottom, because it ends setup.sh (I don't know why)\n~/.config/emacs/bin/doom sync\n\n# Non-automated steps\n## R\n### Install R from https://cran.r-project.org/bin/macosx/\n### Activate py environment and run the command below\n### Rscript -e \"install.packages('IRkernel', repos='https://cran.rstudio.com'); IRkernel::installspec()\"\n## Give Hammerspoon Accessibility permissions and enable Launch Hammerspoon at login\n## Homerow\n### Download and move homerow.app to Applications\n### https://www.homerow.app/changelog\n### keep default bindings for now\n## Add ssh key to GitHub by running gh auth login (alias: hai) and selecting SSH as my preferred protocol for Git operations\n## Restart computer to enable macOS settings set via defaults\n## Load in the profile saved in the `macos.terminal` file\n# Karabiner\n## Give karabiner_grabber and karabiner_observer Input Monitoring permission\n#### Under Complex modifications \u003e Rules you should see\n##### Change caps_lock to control if pressed with other keys, to escape if pressed alone. (from Change caps_lock key (rev 4))\n##### Change return to control if pressed with other keys, to return if pressed alone (from Change return to control)\n##### Bash style Emacs key bindings (rev 2) (from Emacs key bindings (rev 12))\n##### Emacs key bindings [option+keys] (rev 5) (from Emacs key bindings (rev 12))\n# CopyQ\n## Load copyq.ini (commands) and copyq.cpq (configuration)\n### Notes:\n### Keyboard shortcuts:\n### `Ctrl Alt C` summons the CopyQ window\n### `Ctrl Alt D` pastes the today's ISO date\n### `Ctrl Alt J` pastes and copies next\n### `Ctrl Alt K` pastes and copies previous\n### `Ctrl Alt S` shows the CopyQ tray (mnemonic: show tray)\n### `Ctrl Alt V` edits the clipboard (mnemonic: vim)\n### `Ctrl Alt X` pastes as plain text (mnemonic: remove (x) formatting)\n## Set up Mac terminal\n### In terminal, under Profiles \u003e Text: Select Ewka Nerd Font size 18\n### In terminal, under Profiles \u003e Advanced: Deselect audible bell\n## Set builtin \"Move focus\" macOS Keyboard shortcuts in System Preferences \u003e Keyboard \u003e Shortcuts \u003e Keyboard\n### Move focus to menu bar: `Alt Cmd A` (A is for Apple)\n### Move focus to Dock: `Alt Cmd Z` (Z is below A and S on the keyboard)\n### Move focus to active or next window: `Cmd '` (' looks similar to `)\n#### Which automatically enables, move focus to previous window: `Cmd Shift ;`\n#### that I decided it was worth overwriting the Emacs hippie completion binding\n### Toggle all of the focus shortcuts except \"Move focus to status menus\": `Alt O`\n### Move focus to window toolbar: `Alt Cmd T` (mnemonic: toolbaR, works a bit like Alt R in Emacs in that it jumps back and forth)\n### Move focus to floating window: `Alt Cmd W`\n### Move focus to status menus: `Alt Cmd S`\n### Change the way Tab moves focus: `Alt Cmd Tab`\n### Turn keyboard access on or off: `Alt Cmd K`\n# Mac Control Center settings\n## Clock Options... 24-hour clock\n## Show nothing in menu bar, show everything in Control Center\n## The menu bar show only have CopyQ, DECAF/AWAKE, Control Center, and Datetime\n## Set the following keyboard shortcuts:\n### Mission Control\n#### Mission Control: Ctrl Alt Shift Cmd Up\n#### Application windows: Ctrl Alt Shift Cmd Up\n#### Move left a space: Ctrl Alt Shift Cmd Left\n#### Switch to Desktop 1: Ctrl Alt Shift Cmd 1\n#### Switch to Desktop 2: Ctrl Alt Shift Cmd 2\n#### Switch to Desktop 3: Ctrl Alt Shift Cmd 3\n#### Switch to Desktop 4: Ctrl Alt Shift Cmd 4\n#### Switch to Desktop 5: Ctrl Alt Shift Cmd 5\n### Keyboard\n#### Change the way Tab moves focus: Alt Cmd Tab\n#### Turn keyboard access on or off: Alt Cmd K\n#### Move focus to the menu bar: Alt Cmd A (A is for Apple)\n#### Move focus to the Dock: Alt Cmd Z (Z is below A and S)\n#### Move focus to the active or next window: Cmd ; (like Cmd `)\n#### Move focus to the window toolbar: Alt Cmd T\n#### Move focus to the floating window: Alt Cmd W\n#### Move focus to the next window: Cmd ` (Default)\n#### Move focus to the status menus: Alt Cmd S\n## Set up vim et al. (these are manual steps because they stop the setup script)\n### /opt/homebrew/bin/vim -c PlugInstall -c CocInstall -c wqa || true\n### /opt/homebrew/bin/nvim -c PlugInstall -c CocInstall -c wqa || true\n### /opt/homebrew/bin/vim -u ~/.SpaceVim/vimrc -c SPUpdate -c wqa || true\n### /opt/homebrew/bin/nvim -u ~/.SpaceVim/vimrc -c SPUpdate -c wqa || true\n### ~/.local/bin/lvim -c LvimSyncCorePlugins -c wqa || true\n## Set Sound options\n### Set alert volume to zero\n### Disable Play sound on startup\n## Add all Google profiles in Chrome\n### Each profile automatically should have\n#### SurfingKeys extension with settings loaded from https://raw.githubusercontent.com/NishantBharali/setup/main/surfingkeys.js\n#### Vimium extension with settings restored from https://raw.githubusercontent.com/NishantBharali/setup/main/vimium-options.json\n#### LastPass extension\n#### BitWarden extension\n## Launch fig in the terminal and authenticate with GitHub\n## Add all Internet Accounts in System Preferences\n### Grant Accessibility permissions to CopyQ, altTab, Homerow, Hammerspoon, VimR and Alfred\n### Enable launch on login for CopyQ, altTab, Homerow, Hammerspoon, VimR and Alfred\n### Select ABC under Auto-switch Input Source\n### Click Disable search \u0026 show all labels\n## Set up Displays\n### The resolution of display link dual monitors should be 3840\n### Set resolution of main monitor to 2650 and MacBook monitor to 1280, so the two add up to 3840\n### Click \"Arrange...\" and Arrange the monitors so that the main monitor and the MacBook monitor line up with the dual link dual monitors\n### Move the white band from the top of MacBook monitor to the main monitor, the monitor order should now be:\n#### 1: main monitor\n#### 2: MacBook monitor\n#### 3: far right monitor\n#### 4: dual link dual monitors\n#### 5: far right monitor\n## Setup PyCharm\n### Install PyCharm via Jetbrains Toolbox\n### Sync settings from https://github.com/marskar/PyCharm\n### Or load settings from `settings.zip`\n### Or manually configure PyCharm by following the steps below\n### Under File \u003e Settings Repository..., select Overwrite Local\n### Settings\n### Select MacOS X 10.5+ Keymap and make the following changes:\n#### - Editor Actions \u003e Backspace : `Ctrl h`\n#### - Editor Actions \u003e Cut Line Backward : `Ctrl u`\n#### - Editor Actions \u003e Kill to Word End : `Alt d`\n#### - Editor Actions \u003e Cut up to Line End : `Ctrl k`\n#### - Editor Actions \u003e Decrease Font Size : `Cmd -`\n#### - Editor Actions \u003e Focus Editor : `Shift Escape`\n#### - Editor Actions \u003e Increase Font Size : `Cmd =`\n#### - Editor Actions \u003e Kill to Word Start : `Ctrl w`\n#### - Editor Actions \u003e Move Caret to Next Word : `Alt f`\n#### - Editor Actions \u003e Move Caret to Previous Word : `Alt b`\n#### - Editor Actions \u003e Reset Font Size : `Cmd 0`\n#### - Editor Actions \u003e Split Line :\n#### - Main Menu \u003e View \u003e Quick Documentation: `Ctrl q`\n#### - Main Menu \u003e Edit \u003e Delete : `Ctrl d`\n#### - Main Menu \u003e Edit \u003e Paste : `Ctrl y`\n#### - Main Menu \u003e Edit \u003e Redo : `Ctrl =`\n#### - Main Menu \u003e Edit \u003e Undo : `Ctrl -`\n#### - Main Menu \u003e File \u003e Save As...: `Cmd Shift S`\n#### - Main Menu \u003e Help \u003e Find Action... : `Cmd Shift p`\n#### - Main Menu \u003e Tool Windows \u003e Commit :\n#### - Main Menu \u003e Window \u003e Active Tool Window \u003e Resize \u003e Stretch to Bottom : `Cmd Shift ,`\n#### - Main Menu \u003e Window \u003e Active Tool Window \u003e Resize \u003e Stretch to Left : `Cmd Shift ,`\n#### - Main Menu \u003e Window \u003e Active Tool Window \u003e Resize \u003e Stretch to Right : `Cmd Shift ;`\n#### - Main Menu \u003e Window \u003e Active Tool Window \u003e Resize \u003e Stretch to Top : `Cmd Shift ;`\n#### - Plug-ins \u003e Git \u003e Checkout Revision : `Enter`\n#### - Plug-ins \u003e Git \u003e Checkout Selected : `Enter`\n#### - Plug-ins \u003e Python \u003e Execute Selection in Python Console: `Cmd Enter`\n#### - Plug-ins \u003e Python \u003e Split Cell : `Ctrl Shift -`\n#### - Plug-ins \u003e Terminal \u003e Shift Focus To Editor : `Shift+Escape`\n### In Appearance \u0026 Behavior \u003e Appearance, Select Darcula theme and select Ewka Nerd Font size 14\n### Using `Cmd Shift A` or going to View \u003e Appearance at the Top, enable Details in Tree Views, disable Tool Windows Bars and Navigation Bar\n### In MacOS System Preferences: Keyboard \u003e Shortcuts \u003e Services, uncheck Open man Page in Terminal (`Cmd Shift M`) and Search man Page Index in Terminal (`Cmd Shift A`)\n### In MacOS System Preferences: Keyboard \u003e Shortcuts \u003e Keyboard, uncheck Turn keyboard access on and off after making sure all of the other shortcuts are enabled\n### In MacOS System Preferences: Keyboard \u003e Shortcuts \u003e Keyboard, change ctrl function shortcuts to ctrl num shortcuts:\n### In Editor \u003e Font, select Ewka Nerd Font size 16 as main and Jetbrains Mono as fallback and Enable font ligatures\n### In Editor \u003e Code Style, set visual guides to 80 characters\n### Check Change font size (Zoom) with Command+Mouse Wheel in Editor \u003e General\n### Check Show Whitespace in Editor \u003e General \u003e Appearance\n### If you use the Deep Ocean Editor theme from the [Material UI](https://www.material-theme.com/) plugin, change docstring (Doc comment \u003e Text) color to [`4cbb17` aka kelly green](https://www.beautycolorcode.com/4cbb17) and line comment color to [`DF00FF` aka psychedelic purple](https://www.beautycolorcode.com/df00ff) under Editor \u003e Color Scheme \u003e Python and Editor \u003e Color Scheme \u003e Language Defaults, respectively\n### In Build, Execution, Deployment \u003e Console, select Use existing console for \"Run with Python Console\"\n### Disable Material UI to got back to Darcula theme, but keep Code Editor theme as Deep Ocean\n#### Editor \u003e Color Scheme : Material Deep Ocean\n#### Appearance and Behavior \u003e Appearance \u003e Theme : Darcula\n### In Editor \u003e General \u003e Editor Tabs, Select None for Tab placement (current file is shown at the top)\n### Install [IdeaVim](https://github.com/JetBrains/ideavim) plugin\n### Install [BashSupport](https://plugins.jetbrains.com/plugin/4230-bashsupport) plugin\n### Install [Markdown](https://plugins.jetbrains.com/plugin/7793-markdown/) plugin\n### Install [R Language Support](http://holgerbrandl.github.io/r4intellij/) plugin\n### Fix shortcut conflicts under Preferences \u003e Vim emulation: `Ctrl i/j/m/t` to IDE\n### When setting run configurations (`Ctrl Alt r`), set working directory to project root under Environment and deselect Run with Python Console under Execution\n\n# Terminals\n## iTerm: set up to automatically run tmux attach\n## alacritty: set up to automatically run tmux attach\n## kitty: need to manually run tmux attach\n## tabby: can't figure how to remap ctrl ; to ctrl q\n## hyper: can't figure how to remap ctrl ; to ctrl q\n## terminal: can't figure how to remap ctrl ; to ctrl q\n### The com.googlecode.iterm2.plist file makes it unnecessary to load iterm.json, which includes the settings below\n### curl https://raw.githubusercontent.com/NishantBharali/setup/main/iterm.json -o ~/iterm.json\n### In iterm2, select General \u003e Preferences: Select load preferences from a local folder or URL\n### In iterm2, select Appearance \u003e Theme: Minimal\n### In iterm2, select Profiles \u003e Keys: Both option keys to Esc+\n### In iterm2, select Profiles \u003e Terminal \u003e Notifications: Silence bell\n### In iterm2, select Profiles \u003e Text \u003e Change Font: Ewka Nerdfont size 18, Use Ligatures\n### In iterm2, set Profiles \u003e General \u003e Command \u003e Send text at start: tmux attach || tmux new \\; split-window -v \\; select-pane -t :.+\n### In iterm2, set Keys \u003e Key Bindings \u003e Send hex code 0x11 ^;\n### In iterm2, set Profiles \u003e Keys \u003e Key Mappings to send enter/return key codes:\n#### Send ^[ [13;2u with Shift Return\n#### Send ^[ [13;5u with Ctrl Return\n#### Send ^[ [13;6u with Ctrl Shift Return\n#### Send ^[ [13;3u with Cmd Return\n#### Send ^[ [13;4u with Shift Cmd Return\n#### Send ^[ \u003cM-C-CR\u003e with Ctrl Shift Cmd Return\n\n# coc expects me to have a bibliography.bib file in the home directory\ntouch ~/bibliography.bib\n\n# Text editors\n## 1. Vim\n## 2. Neovim\n## 3. LunarVim\n## 4. SpaceVim\n## 5. Spacemacs\n## 6. Doom emacs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishantbharali%2Fsetup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnishantbharali%2Fsetup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishantbharali%2Fsetup/lists"}