Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Install MSYS2
- https://www.msys2.org/
- 1.1. Install Windows Terminal from MS Store
- 2. Update package
- pacman -Syu
- 3. Configure in Windows Terminal
- Open de json config and add:
- // This makes MINGW64 the default shell
- "defaultProfile": "{17da3cac-b318-431e-8a3e-7fcdefe6d114}",
- "profiles": {
- "list":
- [
- // ...
- {
- "guid": "{17da3cac-b318-431e-8a3e-7fcdefe6d114}",
- "name": "MINGW64 / MSYS2",
- "commandline": "C:/msys64/msys2_shell.cmd -defterm -here -no-start -mingw64",
- "startingDirectory": "C:/msys64/home/%USERNAME%",
- "icon": "C:/msys64/mingw64.ico",
- "fontFace": "Lucida Console",
- "fontSize": 9
- },
- {
- "guid": "{2d51fdc4-a03b-4efe-81bc-722b7f6f3820}",
- "name": "MINGW32 / MSYS2",
- "commandline": "C:/msys64/msys2_shell.cmd -defterm -here -no-start -mingw32",
- "startingDirectory": "C:/msys64/home/%USERNAME%",
- "icon": "C:/msys64/mingw32.ico",
- "fontFace": "Lucida Console",
- "fontSize": 9
- },
- {
- "guid": "{71160544-14d8-4194-af25-d05feeac7233}",
- "name": "MSYS / MSYS2",
- "commandline": "C:/msys64/msys2_shell.cmd -defterm -here -no-start -msys",
- "startingDirectory": "C:/msys64/home/%USERNAME%",
- "icon": "C:/msys64/msys2.ico",
- "fontFace": "Lucida Console",
- "fontSize": 9
- },
- // ...
- ]
- }
- Note in commandline use this:
- C:/msys64/msys2_shell.cmd -defterm -here -no-start -msys -use-full-path
- or
- C:/msys64/usr/bin/env MSYSTEM=MSYS /usr/bin/bash
- 4. Fix the home directory
- By default, msys will use /c/msys64/home as your home folder.
- If you want to use your existing home folder, set a $HOME env variable under “Environment Variables > User variables”, add HOME -> %USERPROFILE%
- Then edit /c/msys64/etc/nsswitch.conf to set db_home: /%H.
- Also, SSH insists on using MSYS’ /home, but you can get around that by adding this line to /etc/fstab:
- C:/Users /home ntfs binary,noacl,auto 1 1
- 5. Set Msys2 to inherit your Windows path variable
- Uncomment, or set, MSYS2_PATH_TYPE=inherit in C:\msys64\msys2.ini.
- If you use the mingw32 or mingw64 launchers, set this in their .ini files too.
- For this to work, you have to launch the shell from C:\msys64\msys2.exe.
- 6. Install zsh and nano
- pacman -S zsh
- pacman -S nano
- 7. Install oh-my-zsh
- sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- 8. Install fonts for theme
- https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k
- Setup in json.config
- "font": {
- "face": "MesloLGS NF",
- "size": 12
- }
- 9. Theme-ing Oh-My-Zsh
- git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
- Then, type nano ~/.zshrc. This opens nano, a text editor. Edit the line where it says, ZSH_THEME="robbyrussell" to ZSH_THEME="powerlevel10k/powerlevel10k".
- Restart terminal
- If wizard dont start, use the next commmand:
- p10k configure
- 10. Oh-my-zsh plugins
- Note that I’ve added two extra plugins (look for the plugins=... line), zsh-autosuggestions and zsh-autocomplete. You can copy this and paste this to nano editor while editing ~/.zshrc .
- But you do need to install them. To do that, run:
- git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
- git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
- 11. Start zsh at begining
- Open the json.config from Windows Terminal
- "commandline": "C:/msys64/usr/bin/zsh.exe",
- 12. Transparency for terminal
- "defaults":
- {
- "acrylicOpacity": 0.5,
- "useAcrylic": true
- },
- 13. Open Environment system variables, edit Path and add the next two:
- - C:\msys64\mingw64\bin
- - C:\msys64\usr\bin
Add Comment
Please, Sign In to add comment