Closed7
Windows 11 を手に入れたらやること

Windows Update
Windows Update のエラーで詰まったら、サービスの再起動とか C:\$Windows.~BT
をリネームしたりして解消することを祈る。

winget
- winget を使うには App Installer が必要だが、最近の Windows 11 インストーラーなら最初から入っているはず。
- まずは
winget upgrade
で App Installer 等のバージョンを上げる - ソースが壊れてそうなら
winget source reset --force
するといい (参考)
winget install Microsoft.PowerToys
winget install DevToys-app.DevToys
winget install Microsoft.WindowsTerminal
winget install Microsoft.VisualStudioCode
winget install Microsoft.PowerShell
winget install Google.Chrome
winget install Docker.DockerDesktop
winget install Python.Python.3
winget install Audacity.Audacity
winget install LINE.LINE
scoop
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
iwr -useb get.scoop.sh | iex
scoop install 7zip git
git config --global core.autocrlf input
git config --global user.name "openjny"
git config --global user.email "openjny@gmail.com"
scoop bucket add extras

GitHub
scoop install gh
gh auth login
# ? What account do you want to log into? GitHub.com
# ? What is your preferred protocol for Git operations? SSH
# ? Generate a new SSH key to add to your GitHub account? Yes
# ? Enter a passphrase for your new SSH key (Optional) <Phrase>
# ? Title for your SSH key: GitHub CLI <Title>
# ? How would you like to authenticate GitHub CLI? Login with a web browser
#
# ✓ Authentication complete.
# - gh config set -h github.com git_protocol ssh
# ✓ Configured git protocol
# ✓ Uploaded the SSH key to your GitHub account: C:\Users\USER\.ssh\id_ed25519.pub
# ✓ Logged in as OpenJNY
@"
Host github.com
HostName github.com
IdentityFile $HOME\.ssh\id_ed25519
User git
"@ | Out-File "$HOME\.ssh\config" -Encoding utf8

wsl
wsl --install
# restart
winget install Canonical.Ubuntu.2404
winget install Docker.DockerDesktop
wsl -s Ubuntu-22.04

PowerShell
cd $HOME\Documents
# git clone https://github.com/openjny/powershell-profile.git PowerShell
gh repo clone openjny/powershell-profile PowerShell
.\PowerShell\setup.ps1
# fonts
scoop bucket add nerd-fonts
sudo scoop install Cascadia-Code CascadiaCode-NF-Mono CascadiaCode-NF Ubuntu-NF-Mono Ubuntu-NF UbuntuMono-NF-Mono UbuntuMono-NF
- cascadia code: https://github.com/microsoft/cascadia-code/releases

その他
# https://learn.microsoft.com/ja-jp/powershell/azure/install-azps-windows?view=azps-13.3.0&tabs=powershell&pivots=windows-psgallery
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Install-Module -Name Az -Repository PSGallery -Force
# https://learn.microsoft.com/ja-jp/cli/azure/install-azure-cli-windows?pivots=winget
winget install --exact --id Microsoft.AzureCLI
scoop install terraform
scoop install sysinternals
scoop install neovim fzf bat grep curl sed less
ref: https://gist.github.com/myty/1d97e045a2f955c104a3c0ddd51b625a

KeyBinding
PowerToys
IME
番外編 (AHK)
; F13 + Space = 全角/半角 キー
F13 & Space::Send,{Blind}{vkF3sc029}
; F13ダブルタップ = Esc + Muhenkan
F13::
Keywait, F13, U
Keywait, F13, D T0.1
if (ErrorLevel=0) {
Send,{Blind}{Escape}
Send,{Blind}{vk1Dsc07B}
}
Return
; F13 + [ = Esc + Muhenkan
F13 & [::
Send,{Blind}{Escape}
Send,{Blind}{vk1Dsc07B}
return
; F13 + hjkl = 移動キー
F13 & h::Send,{Blind}{Left}
F13 & j::Send,{Blind}{Down}
F13 & k::Send,{Blind}{Up}
F13 & l::Send,{Blind}{Right}
; F13 + o = バックスペース
F13 & o::Send,{Blind}{Backspace}
; F13 + ; = Enter
F13 & `;::Send,{Blind}{Enter}
; F13 + x = Delete
; F13 + X = Backspace
F13 & x::
If GetKeyState("Shift","P")
Send,{Blind}{Backspace}
Else
Send,{Blind}{Delete}
Return
; 制御系キー(デバッグ用)
; F13 & q::Send,{Blind}{vkF3sc029} ; hankaku/zenkaku
; F13 & w::Send,{Blind}{vkF4sc029} ; hankaku/zenkaku
; F13 & e::Send,{Blind}{vk1Dsc07B} ; muhenkan
; F13 & r::Send,{Blind}{vk1Csc079} ; henkan
; F13 & t::Send,{Blind}{vk1DF13}
; F13 & y::Send,{Blind}{vkF2sc070} ; henkan
; F13 & y::Send,{Blind}{vkF0sc03A} ; Eisu
このスクラップは2024/11/20にクローズされました