Skip to content

Instantly share code, notes, and snippets.

@Vulwsztyn
Last active May 14, 2024 08:11
Show Gist options
  • Save Vulwsztyn/1a2c4a68ff037f745e276266270c0d8b to your computer and use it in GitHub Desktop.
Save Vulwsztyn/1a2c4a68ff037f745e276266270c0d8b to your computer and use it in GitHub Desktop.
wsl2, zsh, oh-my-zsh, oh-my-posh setup instructions

WSL

  1. Download Ubuntu 20.04 LTS from Microsoft Store
  2. Turn Windows features on or off check Windows Subsystem for Linux (on the bottom)

ZSH

  1. sudo apt install zsh -y
  2. chsh -s $(which zsh)

Oh My Zsh

  1. sudo apt install git -y && sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  2. git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  3. git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  4. sudo apt update; sudo apt install python
  5. sudo apt install build-essential procps curl file git exa autojump - if they haven't fixed the brew install of exa
  6. brew install glab git-lfs exa helm elixir gh olets/tap/zsh-abbr powershell/tap/powershell rbenv ruby-build fzf
  7. git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k - https://github.com/romkatv/powerlevel10k
  8. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - https://brew.sh/
  9. curl -sSf https://rye-up.com/get | bash - https://rye-up.com/

Oh My Posh - outdated I think

  1. Install-Module oh-my-posh -Scope CurrentUser
  2. code $PROFILE add Import-Module oh-my-posh and (in next line) oh-my-posh --init --shell pwsh --config ~/jandedobbeleer.omp.json | Invoke-Expression
  3. Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
  4. https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf > Double click > Install
  5. Open Hyper → Edit → Preferences and change the value of fontFamily to MesloLGS NF.
  6. With Admin privilages: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
  7. choco install fzf
  8. https://www.powershellgallery.com/packages/PSFzf
  9. to $PROFILE Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r' Set-PSReadLineKeyHandler -Key Tab -ScriptBlock { Invoke-FzfTabCompletion }
  10. PowerShell/PSReadLine#687 (comment)
  11. C:\Program Files\WindowsPowerShell\Modules\PSReadline\2.0.0
  12. Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
  13. Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment