[[Windows]]のマシンを買い替えたとき、スムーズにセットアップできるよう記録しておく。 ## 前提 [[Windows 10]] ## 基本ツールをインストール ### [[Google Chrome]] Edgeを使ってインストール。 ### [[Scoop]] [[Google Chrome]]で公式サイトからインストール。 ### [[PowerShell]] [[Google Chrome]]で公式サイトからインストール。 ### [[Slack]] [[Google Chrome]]で公式サイトからインストール。 ### [[Git]] [[Scoop]]でインストール。 ```console scoop install git ``` ## 自動化で環境構築 [[🦉owl-playbook]]を使って必要なツールをインストールしたり、設定を反映させる。 ### [[🦉owl-playbook]]の取得 `~/git/github.com/tadashi-aikawa`に移動してクローンする。 ```console git clone https://github.com/tadashi-aikawa/owl-playbook.git ``` ### 各packageの依存関係インストール #### [[Scoop]] ```console cd windows/scoop install.ps1 ``` #### [[npm]] [[Volta]]で[[LTS]]版の[[Node.js]]をインストール。 ```console volta install node ``` [[npm]]で色々インストールする。 ```console cd ../npm install.ps1 ``` #### [[Go]] ```console cd ../go install.ps1 ``` ### [[IntelliJ IDEA]]と[[VSCode]]の初回起動 - [[IntelliJ IDEA]]は[[JetBrains Toolbox]]から - アカウントのActivateまで完了させる (このときのバージョンは2022.01) - [[VSCode]]は公式サイトから > [!question]- [[Scoop]]でインストールしない理由は? > [[Scoop]]からのインストールだとアップデートがスムーズにいかないことがあるため、総合的にコストパフォーマンスが悪いから。 ### プロビジョニング ```console sudo provision.bat ``` ## カスタムキーバインド デフォルトのキーバインドは地獄なので、早く楽園と化す。 ### [[AutoHotkey]]によるカスタマイズ [[🦉Spinal reflex bindings template]]を使う。 ```console git clone https://github.com/tadashi-aikawa/spinal-reflex-bindings-template.git ``` `Settings.ini`の追加を忘れずに。 ### [[Change Key]]によるカスタマイズ [[Google Chrome]]から[[Change Key]]をインストールして設定する。 > [[Change Key#設定]] ここでシステム再起動が発生する。 ## 自動起動アプリケーションの登録 以下を [[Windows10の起動時に自動的に実行するアプリを追加]] を参考に以下を追加。 - [[AutoHotkey]]の`Main.ahk`へのショートカット - [[Keypirinha]]のショートカット > [!note] > [[Ditto]]は設定から自動起動をONにする ## エディタ/[[IDE]]の設定 [[Vim]]や[[VSCode]]が使えないと、設定周りが面倒なので早めにやっておく。 ### [[Vim]]の設定 - [[Vundleをインストール]] - [[Vundleで定義したプラグインのインストール]]をする - 起動後に出るエラーはこれでなおる ### [[IntelliJ IDEA]]の設定 - 起動して[[📒IntelliJプラグイン]]をインストール - `Editor > Font`で`Size`を18.0に - ターミナルから起動できるように環境変数`PATH`に以下を追加 - `C:\Users\syoum\AppData\Local\JetBrains\Toolbox\scripts` > [!note] > `C:\Users\syoum`はホームディレクトリ ### [[VSCode]]の設定 特に必要ないはず。 ### [[Obsidian]] 公式サイトからインストールして、[[Obsidian Sync]]で[[Vault]]のパスを指定。同期が完了すればほぼそのまま使える。 ## ターミナルの設定 ターミナルも多用するので早めに手になじむ環境にしておく。基本的な設定は[[#自動化で環境構築]]で済んでいるため、アフターフォローを少しすればOK。 ### [[exa]]のインストール [[exa]]は[[Windows]]をまだサポートしていないため、ブランチから[[Windowsでexaをインストール]]する必要がある。 ただ、ビルドに成功しなかったので`exa.exe`を既存マシンから移行した。 ### [[Nerd Fonts]]のインストール - [[Nerd FontsをWindowsにインストール]] - [[Sauce Code Pro Nerd Font]] ## 非共有のドットファイル ### [[gowlconfig|.gowlconfig]] [[🧊gowl]]用の設定ファイルを移行。 ```toml root = "C:\\Users\\syoum\\git" browser = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" subSpaces = [ "C:\\Work\\git" ] [editors] default = "code" [github] token = "ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" useSSH = true overrideUser = true username = "tadashi-aikawa" mailaddress = "[email protected]" ``` ### [[gitconfig|.gitconfig]] [[Git]]用の設定ファイルを移行。 ```toml ```ini [alias] graph = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative cm = commit -m s = status [user] email = [email protected] name = tadashi-aikawa [core] autoCRLF = false preloadindex = true fscache = true quotepath = false pager = delta whitespace = cr-at-eol [github] token = xxxxxxxxxxxxxxxxxxxx [winUpdater] recentlySeenVersion = [filter "lfs"] smudge = git-lfs smudge -- %f process = git-lfs filter-process required = true clean = git-lfs clean -- %f [merge] ff = false [pull] ff = only [credential] helper = manager [interactive] diffFilter = delta --color-only [delta] features = side-by-side line-numbers decorations whitespace-error-style = 22 reverse [delta "decorations"] commit-decoration-style = bold yellow box ul file-style = bold yellow ul file-decoration-style = none ``` ## ポインティングデバイスの設定 ### トラックボール - [[SlimBlade Trackball#設定]]のとおりに ## アプリケーションのインストール ### [[🧊Togowl]] - [[TogowlのURL]]を開いて[[PWA]]としてインストール ### [[Discord]] [[Google Chrome]]で公式サイトからインストール。 ### [[TweetDeck]] 別ウィンドウとしてブックマーク。 ### [[Screenpresso]] - [[Google Chrome]]で公式サイトからインストール - [[Screenpressoのマイ設定]]を行う ## [[Google Chrome]]の設定 [[📒インストールしているChrome Extensions]] をすべてインストール。以下は設定。 ### [[Vimium]] - [[🦉Vimiumのキーバインド設定]] ### [[Stylus]] ```css @-moz-document url-prefix("https://twitter.com") { [data-testid='primaryColumn'] { max-width: 600px; } [data-testid='sidebarColumn'] { display: none; } } ``` ### [[CLUT]] `Quick switch - Use to switch quickly among last 2 to 4 tabs.`に `Alt + W`を割り当て。