8000 GitHub - peschee/setup
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

peschee/setup

 
 

Repository files navigation

Setup

Preparation

Clone this repo

git clone https://github.com/Strajk/setup.git $HOME/Code/setup

Link dotfiles

ln -s $HOME/Code/setup/home/* $HOME

Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install everything from ~/Brewfile

brew bundle Just wait & enter password when prompted.

Launch 1Password

Select iCloud as Sync option.

Launch Amphetamine

Enable it to prevent Mac from sleeping during syncing Dropbox in the next step.

Launch Dropbox

Let it sync completely before continuing to the next steps.

Sync Home folder

ln -s ~/Dropbox/Sync/home/.* $HOME

Repair permission

sudo chmod og-rw ~/.netrc
sudo chmod 0400 ~/.ssh/*
sudo chmod 0644 ~/.ssh/*.pub

Accept XCode License

sudo xcodebuild -license accept


Continue with setting up apps, one by one

Dev environment

Node

# List latest version of Node
nvm ls-remote | tail

# Install it (it should use it & set as default automatically)
nvm install v12.4.0

# Make sure
nvm list
nvm current

Global packages

npm i -g node-inspector
npm i -g browser-sync
npm i -g speed-test
npm i -g eslint
npm i -g @vue/cli
npm i -g jest
npm i -g yo
npm i -g generator-express
npm i -g spaceship-prompt

Ruby

! Do not install rbenv via homebrew, didn't work for me and already spent more than a lot time debugging.

git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

# check if rbenv plugin is enabled in .zshrc

rbenv install --list
rbenv install 2.4.0 (or newer version)
rbenv rehash
rbenv global 2.4.0

if BUILD FAILED error occurs, run xcode-select --install - installs XCode Command line tools to /Library/Developer/CommandLineTools/

General utilities

ℹ️ Electron-based terminal, easy configuration in one file, plugins in JavaScript.

💾 Installation: Installed via Homebrew
cask "hyper"

⚙️ Preferences: ~/.hyper.js

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
rm -f "$HOME/.zshrc" && ln -s "$HOME/Code/setup/home/.zshrc" $HOME && source $HOME/.zshrc 

Utilities

💾 Installation: Installed via Homebrew
cask "dropbox"
⚙️ Preferences: manual
  • Do not link work account
  • Disable Screenshots
  • Disable Photos
💾 Installation: Installed via Homebrew
cask "keyboard-maestro"
⚙️ Preferences: `~/Dropbox/Sync/apps/Keyboard Maestro Macros.kmsync`
  • Enable Launch at login
  • Enable "Include Conflict Palette in Touch Bar"

TODO: Share some generally useful macros

💾 Installation: Installed via Homebrew
cask "docker"
💾 Installation: Installed via Homebrew
cask "ngrok"
💾 Installation: Installed via Homebrew
cask "keybase"
⚙️ Preferences: Manual
  • Enable Keybase in Finder
F438 💾 Installation: Installed via Homebrew
cask "1password"
⚙️ Preferences
  • Security: Disable all auto-locking {>> I believe in OS security :) <<}
  • Security: Enable automatic unlock
  • Browsers: Install Browsers Extensions (Safari, Chrome, Firefox)
  • Logins: Disable automatically submitting after filling
  • Set keyboard shortcut for Showing 1Password mini
  • Set keyboard shortcut for Filling login
💾 Installation: Installed via Homebrew
cask "karabiner-elements"
⚙️ Preferences: manual
  • CapsLock -> f19
  • Quit application by pressing command-q twice
💾 Installation: Installed via Homebrew
mas "NordVPN", id: 1116599239
💾 Installation: Installed via Homebrew
cask "forticlient"
💾 Installation: Installed via Homebrew (⚠ requires manual post-install)
cask "hyperswitch"
⚙️ Preferences
  • Run HyperSwitch in the background
  • Use Include windows from other spaces
  • Use Include windows from other screens
  • Use shift to cycle backwards
💾 Installation
cask "alfred"
⚙️ Preferences
  • Set preferences syncing to ~/Dropbox/Sync/apps/Alfred
  • Set main keyboard shortcut to F19 (not synced)
  • Set Clipboard history persistence (not synced)

Workflows

Workflows wanted

Script to get workflows
for f in ~/Dropbox/Sync/apps/Alfred/Alfred.alfredpreferences/workflows/**/info.plist
do
	ff=${f%.*}
	name=$(defaults read "$ff" name)
	link="https://www.google.cz/search?q=site%3Apackal.org+${name// /+}"
	echo "– [$name]($link)"
done

Snippets

https://gist.github.com/Strajk/f4cb72e318c531a3ee247ccc10681f8f

💾 Installation: Installed via Homebrew
cask "appcleaner"
⚙️ Preferences
  • Enable SmartDelete

Do not install from cask, cannot transfer license

💾 Installation: Installed via Homebrew
mas "Moom", id: 419330170
⚙️ Preferences
ln -s ~/Dropbox/Sync/apps/moom/com.manytricks.Moom.plist ~/Library/Preferences/com.manytricks.Moom.plist
💾 Installation: Installed via Homebrew
mas "PopClip", id: 445189367
⚙️ Preferences
  • Enable Start at Login
  • Disable Cut & Copy & Paste Extensions

Extensions

curl -O "http://pilotmoon.com/popclip/extensions/ext/{Reminders,GoogleTranslate,Alfred}.popclipextz"

TODO: Fix! Open & Install extensions after downloading

💾 Installation: Installed via Homebrew
mas "Monosnap", id: 540348655
⚙️ Preferences
  • Enable General: Launch at login
  • Enable Advanced: Autosave to "Pictures" folder
  • Enable Advanced: Shrink Retina snaps
  • Disable Interface: Capture area: Add shadow to window
  • Sey Hotkeys: Capture area to control + m
  • Sey Hotkeys: Record video to control + alt + m
  • Sey Hotkeys: Capture previous area to control + shift + m
  • Login to Monosnap account
cask dash
⚙️ Preferences
General: Launch Dash at login
General: Global search shortcut
General: Disable show dock icon
Integration: Alfred, PopClip, TextMate

Cheat: Axios
Cheat: Chrome Developer Tools
Cheat: Docker
Cheat: Dockerfile
Cheat: Git
Cheat: You Might Not Need jQuery
StackOverflow: JavaScript
StackOverflow: TypeScript
User: date-fns
Docset: Bash
Docset: Bootstrap 4
Docset: CSS
Docset: Chai
Docset: Express
Docset: Font Awesome
Docset: HTML
Docset: JavaScript
Docset: Less
Docset: Lo-Dash
Docset: Markdown
Docset: Mocha
Docset: MomentJS
Docset: NodeJS
Docset: Sinon
Docset: Stylus
Docset: TypeScript
Docset: VueJS
Docset: jQuery
💾 Installation: Installed via Homebrew
cask "Marked"
💾 Installation: Installed via Homebrew
mas "Apple Configurator 2", id: 1037126344
💾 Installation: Installed via Homebrew
mas "Amphetamine", id: 937984704
⚙️ Preferences
  • Menu Bar Image Click: Primary: Start/end session | Secondary: Show menu
  • Launch Amphetamine at login: yes
  • Appearance: Menu Bar image: Coffee Carafe
  • Appearance: Lower icon opacity when there is no active session
💾 Installation: Installed via Homebrew
cask "transmission"
⚙️ Preferences
# Use `~/Downloads/_INCOMPLETE` to store incomplete downloads
defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true
defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Downloads/_INCOMPLETE"

# Use `~/Downloads` to autoimport .torrent files
defaults write org.m0k.transmission AutoImport -bool true
defaults write org.m0k.transmission AutoImportDirectory -string "${HOME}/Downloads"

# Don’t prompt for confirmation before downloading
defaults write org.m0k.transmission DownloadAsk -bool false
defaults write org.m0k.transmission MagnetOpenAsk -bool false

# Trash original torrent files
defaults write org.m0k.transmission DeleteOriginalTorrent -bool true

# Hide the donate message
defaults write org.m0k.transmission WarningDonate -bool false
# Hide the legal disclaimer
defaults write org.m0k.transmission WarningLegal -bool false

# IP block list.
# Source: https://giuliomac.wordpress.com/2014/02/19/best-blocklist-for-transmission/
defaults write org.m0k.transmission BlocklistNew -bool true
defaults write org.m0k.transmission BlocklistURL -string "http://john.bitsurge.net/public/biglist.p2p.gz"
defaults write org.m0k.transmission BlocklistAutoUpdate -bool true
💾 Installation: Installed via Homebrew
cask "imageoptim"

Open source video transcoder

💾 Installation: Installed via Homebrew
brew "handbrake"
💾 Installation: Installed via Homebrew
cask "postman"
💾 Installation: Installed via Homebrew
cask "aerial"
💾 Installation: Installed via Homebrew
cask "google-backup-and-sync"
💾 Installation: Installed via Homebrew
cask "keycastr"
💾 Installation: Installed via Homebrew
cask "mousepose"
💾 Installation: Installed via Homebrew
cask "shortcutdetective"
💾 Installation: Installed via Homebrew
cask "screenflow"
💾 Installation: Installed via Homebrew
cask "gifox"

Other

brew install heroku && heroku login

Communication

💾 Installation: Installed via Homebrew
cask "slack"

Elegant Facebook Messenger desktop app

💾 Installation: Installed via Homebrew
cask "caprine"

Browsers

💾 Installation: Installed via Homebrew
cask "google-chrome"

Extensions

Script to get extensions
# run at chrome://extensions
output = []
document.querySelectorAll(".extension-details").forEach(el => {
    var title = el.querySelector(".extension-title").textContent.trim()
    var id = el.querySelector(".extension-id").textContent.trim()
    var link = `https://chrome.google.c
10000
om/webstore/detail/${id}`
    output.push(`* [${title}](${link})`)
})
copy(output.join("\n"))
💾 Installation: Installed via Homebrew
cask "caskroom/versions/google-chrome-canary"

Enable Developer Tools experiments:

* Open DevTools, go to General tab and check Enable source maps
* Open DevTools, go to Experiments tab and check Support for Sass
💾 Installation: Installed via Homebrew
cask "firefox"
💾 Installation: Installed via Homebrew
cask "opera"
💾 Installation: Installed via Homebrew
cask "brave-browser"
💾 Installation: Installed via Homebrew
cask "tor-browser"

Productivity

Primary notes app

💾 Installation
cask "notion"
💾 Installation: Installed via Homebrew
cask "foldingtext"
💾 Installation: Installed via Homebrew
cask "skype"
⚙️ Preferences
  • Disable show in menu bar
💾 Installation: Installed via Homebrew
mas "Table Tool", id: 1122008420
💾 Installation: Installed via Homebrew
mas "Keynote", id: 409183694
Installation: Manual
⚙️ Preferences
  • Enable General: Enable Things URLs
  • Enable Things Cloud
  • Set shortcut for Quick Entry to ctrl + n
  • Enable Calendar Events

Create

Versatile design app

Plugins

~/Library/Application Support/com.bohemiancoding.sketch3/Plugins github.com/sketchplugins/plugin-directory

💾 Installation: Installed via Homebrew
cask "sketch"
💾 Installation: Installed via Homebrew
cask "sourcetree"
💾 Installation: Installed via Homebrew
cask "gitup"
💾 Installation: Installed via Homebrew
# cask "jetbrains-toolbox" # nope nope nope, lost patience with this piece of crap
cask "webstorm"
cask "pycharm"
cask "datagrip"
⚙️ Preferences

All preferences sync with Settings Repository to private GitLab repo.

Some of the main options:

  • Appearance
    • Theme: Darcula
    • Custom font: San Francisco .SF NS Text
    • Window Options: Allow merging buttons on dialogs: Disable
  • Editor
    • Font: Hack

Plugins

  • AceJump
  • Codota – ⚠️ not working well yet, but like the idea
  • Database Navigator
  • GitToolBox
  • Key Promoter X
  • Paste Images into Markdown
  • Presentation Assistant
  • String Manipulation
  • Wallaby
  • (plugins installed by default)
💾 Installation: Installed via Homebrew
cask "visual-studio-code"

Extensions

TODO Export from Notion

Sync via Gist

ln -s ~/Code/setup/apps/VSCode/settings.json "$HOME/Library/Application Support/Code/User/"
💾 Installation: Installed via Homebrew
mas "iMovie", id: 408981434
💾 Installation: Manually

TODO

💾 Installation: Manual

TODO

💾 Installation: Installed via Homebrew
mas "Xcode", id: 497799835
Installation: Installed via Homebrew
cask "virtualBox"

Accept terms, check issue

VBoxManage extpack install /Users/strajk/.ievms/Oracle_VM_VirtualBox_Extension_Pack-5.1.22.vbox-extpack

ievms

curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env IEVMS_VERSIONS="10 11 EDGE" bash
💾 Installation: Installed via Homebrew
cask "charles"

Media

💾 Installation: Installed via Homebrew
mas "Movist", id: 461788075

Horrible UI, but haven't found better free video player.

💾 Installation: Installed via Homebrew
cask "vlc"
💾 Installation: Installed via Homebrew
cask "caption"

Fun

Boxer

💾 Installation: Installed via Homebrew
cask "boxer"

Other preferences

Default apps

# https://superuser.com/a/1092184
duti -s $(osascript -e 'id of app "The Unarchiver"') .rar all
duti -s $(osascript -e 'id of app "The Unarchiver"') .zip all
duti -s $(osascript -e 'id of app "Preview"') .pdf all
duti -s $(osascript -e 'id of app "Movist"') .mp3 all
duti -s $(osascript -e 'id of app "Movist"') .m4b all
duti -s $(osascript -e 'id of app "Movist"') .flac all
duti -s $(osascript -e 'id of app "Movist"') .mp4 all
duti -s $(osascript -e 'id of app "Movist"') .mkv all
duti -s $(osascript -e 'id of app "Movist"') .avi all
duti -s $(osascript -e 'id of app "FoldingText"') .md all
duti -s $(osascript -e 'id of app "Visual Studio Code"') .json all
duti -s $(osascript -e 'id of app "Visual Studio Code"') .nfo all
duti -s $(osascript -e 'id of app "Visual Studio Code"') .txt all
duti -s $(osascript -e 'id of app "Visual Studio Code"') .srt all
duti -s $(osascript -e 'id of app "Table Tool"') .csv all

Customize Dock

defaults write com.apple.dock persistent-apps -array
for app in \
  "/System/Library/CoreServices/Finder.app" \
  "/Applications/Calendar.app" \
  "spacer" \
  "/Applications/Google Chrome.app" \
  "/Applications/Safari.app" \
  "spacer" \
  "/Applications/Things3.app" \
  "/Applications/Reminders.app" \
  "spacer" \
  "/Applications/iTunes.app" \
  "spacer" \
  "/Applications/Slack.app" \
  "/Applications/Caprine.app" \
  "spacer" \
  "/Applications/Sketch.app" \
  "spacer" \
  "/Applications/WebStorm.app" \
  "/Applications/PyCharm.app" \
  "/Applications/SourceTree.app" \
  "/Applications/Hyper.app" \
  "spacer" \
  "/Applications/App Store.app" \
  "/Applications/System Preferences.app" \
  "spacer" \
  ; do
  if [ "$app" "==" "spacer" ]; then
    defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="small-spacer-tile";}'
  else
    defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>$app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>"
  fi
done

killall Dock

MacOS Preferences

Manual

  • System Preferences – Keyboard – Shortcuts
    • Display: Disable both Decrease & Increase display brightness
    • Mission control: Disable Show Desktop
    • Screenshots: Disable everything (as I use Monosnap)
    • Services: Disable Open man Page in Terminal & Search man Page Index in Terminal
    • Spotlight:
      • Remap Show Spotlight search -> ⌃⌥⌘Space
      • Disable Show Finder search window
    • Accessibility: Disable everything

Programmatic

# Close any open System Preferences panes, to prevent them from overriding settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'

# Use scroll gesture with the Ctrl (^) modifier key to zoom
defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true
defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144
# Follow the keyboard focus while zoomed in
defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true


# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false

# Menu bar: disable transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false

# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true

# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true

# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false

# Disable Resume system-wide
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false

# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false

# Enable full keyboard access for all controls
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3

# Save screenshots to the desktop
defaults write com.apple.screencapture location -string "$HOME/Desktop"

# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true

# Speedup animations
# More: https://www.defaults-write.com/increase-the-speed-of-os-x-dialogs-boxes/
defaults write NSGlobalDomain NSWindowResizeTime .1
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

# Finder
# ---

# Default folder to $HOME
# TODO: strajk -> dynamic
defaults write com.apple.finder NewWindowTarget -string "PfHm"
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}"

# Use column view in all Finder windows by default
defaults write com.apple.Finder FXPreferredViewStyle -string "clmv"

# Show the ~/Library folder.
chflags nohidden ~/Library

# Allow quitting Finder via ⌘ + Q; doing so will also hide desktop icons
defaults write com.apple.finder QuitMenuItem -bool true

# Show status bar in Finder
defaults write com.apple.finder ShowStatusBar -bool true

# Show hidden files by default
defaults write com.apple.Finder AppleShowAllFiles -bool true

# Show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true

# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

# Allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true

# When performing a search, search the current folder by default
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"

# Avoid creating .DS_Store files on network & USB volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true

# Disable disk image verification
defaults write com.apple.frameworks.diskimages skip-verify -bool true
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true

# Disable the warning before emptying the Trash
defaults write com.apple.finder WarnOnEmptyTrash -bool false

# Expand the following File Info panes:
# “General”, “Open with”, and “Sharing & Permissions”
defaults write com.apple.finder FXInfoPanesExpanded -dict \
	General -bool true \
	OpenWith -bool true \
	Privileges -bool true


# Other
# ---

# Set the icon size of Dock items to 36 pixels
defaults write com.apple.dock tilesize -int 36

# Trackpad: enable tap to click for this user and for the login screen
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1

# Disable dashboard
defaults write com.apple.dashboard mcx-disabled -boolean true

# Disable the crash reporter
defaults write com.apple.CrashReporter DialogType -string "none"

TODO:

  • Dock: Lock Dock Content
  • Dock: Lock icon size
  • Disable CapsLock
  • Tap to click

Auto-launched items

# launchctl list | egrep -v "com\.apple\."
  • 1Password
  • Alfred
  • Amphetamine
  • AppCleaner-SmartDelete
  • Docker
  • Dropbox
  • FortiClient VPN
  • Gifox
  • Google Drive
  • HyperSwitch
  • Karabiner
  • Keybase
  • KeyboardMaestro
  • Monosnap
  • Moom
  • PopClip
  • RescueTime
  • Things
  • WebAlert



Inbox

ln -s $HOME/Code/setup/snippets "$HOME/Library/Application Support/Code/User/"

TODO
# Vill Q
# TeamViewer
# Paparazzi!
# zoom.us
# Marked 2
# Insomnia



Run regularly

brewup

Clone all my repos

curl -u strajk -s https://api.github.com/users/strajk/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'



Fonts

Sans-serif

Monospace

💾 Installation
cask "caskroom/fonts/font-open-sans"
cask "caskroom/fonts/font-roboto"

cask "caskroom/fonts/font-hack"
cask "caskroom/fonts/font-roboto-mono"
cask "caskroom/fonts/font-source-code-pro"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 64.3%
  • JavaScript 30.7%
  • Shell 1.8%
  • Less 1.0%
  • Python 0.8%
  • SCSS 0.7%
  • Other 0.7%
0