見出し画像

【俺的】Macの初期設定まとめ

自分用にまとめます。

Ubuntuベースのディストリはこちら。


1.OS設定

・Defaults

# アニメーションOFF
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
# スムーズスクローリング無効
defaults write -g NSScrollAnimationEnabled -bool false
# 最速でダイアログを表示
defaults write -g NSWindowResizeTime -float 0.001
# クイックルックアニメーション無効
defaults write -g QLPanelAnimationDuration -float 0
# スクロールを弾まさない
defaults write -g NSScrollViewRubberbanding -bool false
# ウィンドウのリサイズアニメーションを無効
defaults write -g NSDocumentRevisionsWindowTransformAnimation -bool false
# メニューバー・ツールバーを全画面表示
defaults write -g NSToolbarFullScreenAnimationDuration -float 0
# カラムアニメーションを無効
defaults write -g NSBrowserColumnAnimationSpeedMultiplier -float 0
# コンソールアプリ
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
# 保存ダイアログを詳細表示
defaults write -g NSNavPanelExpandedStateForSaveMode -bool true
# 印刷ダイアログを詳細表示
defaults write -g PMPrintingExpandedStateForPrint -bool true

# 高速化
defaults write com.apple.dock autohide-time-modifier -float 0
defaults write com.apple.dock autohide-delay -float 0
# ミッションコントロール高速化
defaults write com.apple.dock expose-animation-duration -float 0
# launchpad高速化
defaults write com.apple.dock springboard-show-duration -float 0
defaults write com.apple.dock springboard-hide-duration -float 0
defaults write com.apple.dock springboard-page-duration -float 0
# ウィンドウを端へ持っていったときの挙動
defaults write com.apple.dock workspaces-edge-delay -float 0.2
# Dockのサイズを33に固定
defaults write com.apple.dock "tilesize" -int "33"

# ファイルを開くアニメーションを無効
defaults write com.apple.finder DisableAllAnimations -bool true
# アイコンドラッグのアニメーション無効
defaults write com.apple.finder AnimateSnapToGrid -boolean false
# QuickLookで表示中のテキストを選択可能へ
defaults write com.apple.finder QLEnableTextSelection -bool true
# QuickLookを常時表示
defaults write com.apple.finder QLHidePanelOnDeactivate -boolean false
# Finderに終了オプションを追加
defaults write com.apple.finder "QuitMenuItem" -bool "true"
# パスバーを表示
defaults write com.apple.finder "ShowPathbar" -bool "true"
# デフォルトでリストビュー
defaults write com.apple.finder "FXPreferredViewStyle" -string "Nlsv"
# 並び替えでフォルダを上に置く
defaults write com.apple.finder "_FXSortFoldersFirst" -bool "true"

# メール関連のアニメ無効
defaults write com.apple.Mail DisableSendAnimations -bool true
defaults write com.apple.Mail DisableReplyAnimations -bool true

# ネットワークドライブでゴミを作成しない
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
# スクリーンショットで影を表示しない
defaults write com.apple.screencapture disable-shadow -boolean true
# ダウンロードしたファイルを開く際の警告を無効
defaults write com.apple.LaunchServices LSQuarantine -bool false
# クラッシュリポーター無効
defaults write com.apple.CrashReporter DialogType none
# 1回めのクリックで別仮想デスクトップへ移動しない
defaults write com.apple.Dock workspaces-auto-swoosh -boolean false
# マウス速度変更
defaults write "Apple Global Domain" com.apple.mouse.scaling 6

killall Finder
killall Dock
killall SystemUIServer

2.アプリ

・メディアプレーヤー

IINA
https://iina.io/

Anime4K
https://github.com/bloc97/Anime4K


・メールクライアント

Tutanota
https://tutanota.com/ja/


・ユーティリティ

Transmisson
https://transmissionbt.com/

Loopback
https://rogueamoeba.com/loopback/

Rayon
https://github.com/Lakr233/Rayon/

BetterTouchTool
https://folivora.ai/

Alfred
https://www.alfredapp.com/

Clipy
https://github.com/Clipy/Clipy

Karabiner
https://karabiner-elements.pqrs.org/

Dozer
https://github.com/Mortennn/Dozer

App Tamer
https://www.stclairsoft.com/AppTamer/

DefaultFolderX
https://www.stclairsoft.com/DefaultFolderX/index.html

iStat Menus
https://bjango.com/mac/istatmenus/

kaka
https://www.keka.io/ja/

Xmind
https://jp.xmind.net/


・開発

VSCode
https://code.visualstudio.com/

Navicat
https://www.navicat.com/en/

Postman
https://www.postman.com/

iTerm2
https://iterm2.com/

Command Line Tool
https://developer.apple.com/download/all/

Docker
https://docs.docker.com/desktop/mac/install/


・セキュリティ

VeraCrypt
https://www.veracrypt.fr/en/Downloads.html

macFUSE
https://osxfuse.github.io/

Cryptomator
https://cryptomator.org/

GPG Suite
https://gpgtools.org/


・コマンドラインツール

ffmpeg
https://github.com/Vargol/ffmpeg-apple-arm64-build

pcp
https://github.com/dennis-tra/pcp

asitop
https://github.com/tlkh/asitop

Real-ESRGAN ncnn Vulkan
https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan

yt-dlp
https://github.com/yt-dlp/yt-dlp

gobang
https://github.com/TaKO8Ki/gobang


・App Store

Spark

NordVPN

CotEditor

GoodNote 5

Silicon Info

Pixelmator

LanScan

WiFi Explorer

3.シェル

・iTermプロファイル

・fish

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

・config.fish

if status is-interactive
    # Commands to run in interactive sessions can go here
end

# asdf
source /opt/homebrew/opt/asdf/libexec/asdf.fish

# flutter
set PATH $HOME/bin/flutter/bin $PATH

# jdk
set -gx JAVA_HOME $HOME/.asdf/plugins/java/set-java-home.fish

# nim
fish_add_path ~/.nimble/bin

# rust
fish_add_path $HOME/.cargo/bin
set -gx RUSTC_WRAPPER $HOME/.cargo/bin/sccache

# binaries
fish_add_path $HOME/bin/realesrgan-ncnn-vulkan
fish_add_path $HOME/bin/realcugan-ncnn-vulkan
fish_add_path $HOME/bin/dain-ncnn-vulkan
fish_add_path $HOME/bin/ffmpeg/bin
fish_add_path /opt/homebrew/bin
fish_add_path ~/.local/bin
fish_add_path ~/bin

# var
set -x SSLKEYLOGFILE ~/.ssl-key.log 
set -x CHROME_EXECUTABLE "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
set icloud /Users/twemu/Library/Mobile\ Documents/com~apple~CloudDocs/

# abbr
abbr -a real 'realesrgan-ncnn-vulkan -m /Users/twemu/bin/realesrgan-ncnn-vulkan/models -n realesrgan-x4plus-anime'
abbr -a mv 'mv -iv'
abbr -a veracrypt '/Applications/VeraCrypt.app/Contents/MacOS/VeraCrypt --text'
abbr -a L --position anywhere --set-cursor "% | less"
abbr -a yt --set-cursor 'yt-dlp -f % --embed-thumbnaiil --add-metadata'

・bullet-train-fish-theme
https://github.com/kobanyan/bullet-train-fish-theme

$ fisher kobanyan/bullet-train-fish-theme

・homebrew

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

・vim

$ brew install vim

・jetpack
https://github.com/tani/vim-jetpack

$ curl -fLo ~/.vim/pack/jetpack/opt/vim-jetpack/plugin/jetpack.vim --create-dirs https://raw.githubusercontent.com/tani/vim-jetpack/master/plugin/jetpack.vim

・vimrc

packadd vim-jetpack
call jetpack#begin()
call jetpack#add('tani/vim-jetpack', {'opt': 1}) 
call jetpack#add('https://github.com/dense-analysis/ale')
call jetpack#add('junegunn/fzf.vim')
call jetpack#add('junegunn/fzf', { 'do': {-> fzf#install()} })
call jetpack#add('neoclide/coc.nvim', { 'branch': 'release' })
call jetpack#add('neoclide/coc.nvim', { 'branch': 'master', 'do': 'yarn install --frozen-lockfile' })
call jetpack#add('tomasr/molokai')
call jetpack#add('itchyny/lightline.vim')
call jetpack#add('joshdick/onedark.vim')
call jetpack#add('Yggdroot/indentLine')
call jetpack#end()

set encoding=utf-8
scriptencoding utf-8
set fileencoding=utf-8
set fileencodings=ucs-boms,utf-8,euc-jp,cp932
set fileformats=unix,dos,mac
set ambiwidth=double
set expandtab
set tabstop=4
set softtabstop=4
set autoindent
set smartindent
set shiftwidth=4
set incsearch
set smartcase
set hlsearch
set whichwrap=b,s,h,l,<,>,[,],~
set number
set cursorline
set wildmenu
set history=500
set backspace=indent,eol,start
set completeopt=menuone,noinsert
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<CR>"

colorscheme elflord
syntax enable

set laststatus=2 " ステータスラインを常に表示
set showmode " 現在のモードを表示
set showcmd " 打ったコマンドをステータスラインの下に表示
set ruler " ステータスラインの右側にカーソルの現在位置を表示する

"----------------------------------------------------------
" インデントの可視化
call jetpack#add('Yggdroot/indentLine')
"----------------------------------------------------------
filetype plugin indent on
colorscheme onedark

4.プログラミング

asdf

$ brew install asdf

Python

$ asdf plugin add python
$ asdf install python 3.11.2
$ asdf global python 3.11.2
$ pip install virtualenv

Ruby

$ asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
$ asdf install ruby 3.1.2
$ asdf global ruby 3.1.2

Nim

$ brew install nim

Git

$ brew install git

*あとでシェルスクリプトに纏める予定


この記事が気に入ったらサポートをしてみませんか?