-
-
Save romkatv/aa7a70fe656d8b655e3c324eb10f6a8b to your computer and use it in GitHub Desktop.
#!/bin/bash | |
# | |
# This script installs patched Meslo Powerline font family on Windows. | |
# The fonts are installed for the current user only. The script must be | |
# run from WSL. | |
# | |
# bash -c "$(curl -fsSL https://gist.githubusercontent.com/romkatv/aa7a70fe656d8b655e3c324eb10f6a8b/raw/install_meslo_wsl.sh)" | |
# | |
# If you just want the font files, they are in | |
# https://github.com/romkatv/dotfiles-public/tree/master/.local/share/fonts/NerdFonts. | |
set -ueEo pipefail | |
function install_fonts() { | |
local dst_dir | |
dst_dir=$(wslpath $(cmd.exe /c "echo %LOCALAPPDATA%\Microsoft\\Windows\\Fonts" 2>/dev/null | sed 's/\r$//')) | |
mkdir -p "$dst_dir" | |
local src | |
for src in "$@"; do | |
local file=$(basename "$src") | |
test -f "$dst_dir/$file" || cp -f "$src" "$dst_dir/" | |
local win_path | |
win_path=$(wslpath -w "$dst_dir/$file") | |
# Install font for the current user. It'll appear in "Font settings". | |
reg.exe add \ | |
"HKCU\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts" \ | |
/v "${file%.*} (TrueType)" /t REG_SZ /d "$win_path" /f 2>/dev/null | |
done | |
} | |
function main() { | |
local repo | |
repo="$(mktemp -d)" | |
trap "rm -rf ${repo@Q}" INT TERM EXIT | |
git clone https://github.com/romkatv/dotfiles-public.git "$repo" | |
install_fonts "$repo"/.local/share/fonts/NerdFonts/*.ttf | |
} | |
main | |
echo -e '\033[0;32m' | |
echo 'Fonts successfully installed.' | |
echo '' | |
echo 'To change font in Windows Console Host (the old thing):' | |
echo ' Right click on the window title -> Properties -> Font and set Font' | |
echo ' to "MesloLGS NF".' | |
echo '' | |
echo 'To change font in Windows Terminal (the new thing):' | |
echo ' Open Settings (Ctrl+,), search for "fontFace" and set value' | |
echo ' to "MesloLGS NF" for every profile.' | |
echo -e '\033[0m' |
One thought while I was uninstalling Hyper :)
You can install Hyper broadcast plugin, open four terminals (OMZ, spaceship, starship and p10k) and record the video with comparision case. It will be interesting experiment I think :)
One thought while I was uninstalling Hyper :)
You can install Hyper broadcast plugin, open four terminals (OMZ, spaceship, starship and p10k) and record the video with comparision case. It will be interesting experiment I think :)
I've done similar things:
Some people really hate these. The most controversial thread of all time on /r/zsh is the outcome of such comparisons.
I add prompts that users ask for. No one asked for .NET, so it's not there. If you or your colleague can open a feature request, I'll implement it.
I implemented dotnet_version
: romkatv/powerlevel10k#233.
The most controversial thread of all time on /r/zsh
Thank you for the link! You're right inertia is strong.
Thank you for the link! You're right inertia is strong.
Wow! What is the speed! I've updated my coworker and he's going to try p10k. Thanks!
Among the dozen terminals I've used
Try the new one :) Windows Terminal — https://devblogs.microsoft.com/commandline/windows-terminal-preview-1909/
Among the dozen terminals I've used
Try the new one :) Windows Terminal — https://devblogs.microsoft.com/commandline/windows-terminal-preview-1909/
I have. From my earlier comment:
I think even the new Windows Terminal and Alacritty (both in alpha) are less buggy than Hyper despite its version 3.
Windows Terminal is decent but currently too buggy for my taste. I'm waiting for 1.0 before trying it again. Same story with Alacritty -- looks good and feels fast but too buggy for my tolerance right now.
Just interesting what do you think about https://github.com/railsware/upterm concept (gifs - https://github.com/railsware/upterm/releases)? Popup with autocomplete looks cool.
Just interesting what do you think about https://github.com/railsware/upterm concept (gifs - https://github.com/railsware/upterm/releases)? Popup with autocomplete looks cool.
This is the first time I hear about this project, I don't have any opinion.
FWIW, I use GNOME Terminal 99% of the time and not looking forward to switching terminals on Linux any time soon. It does everything I need, is stable and fast enough. I am looking forward to switching to a decent terminal on Windows once one is developed.
Got it. Thanks )
Roman, may be you know https://github.com/xonsh/xonsh/ and have some thoughts to share? What do thinks is there ability to realize p10k-like speed up in this project?
Roman, may be you know https://github.com/xonsh/xonsh/
I learned about the existence of xonsh when romkatv/gitstatus#37 was opened.
and have some thoughts to share?
I have none.
What do thinks is there ability to realize p10k-like speed up in this project?
No idea.
Thank you for providing the install script, my WSL with zsh looks great now!!
Thanks for the script
Very late. However, I was looking through these forums for issues where the tiny little boxes would not appear. Turns out it was because my version of Windows 10 Pro was not activated. I found this out by trying to search for Fonts in the settings, and was unable to search for any of the Nerd Fonts I thought I had downloaded. Activating Windows 10 Pro fixed the problem as soon as I reloaded.
Thank you.
Everything working fine now
Thank you for a big answer! It's clear!
You're right p10k not only faster but has a wizard and it's really helpful.
I wish luck to you and I will spread the word about p10k :)