ติดตั้ง Oh My Posh ใน Windows 11
1.เปิด PowerShell
2.พิมพ์คำสั่ง
winget install JanDeDobbeleer.OhMyPosh --source winget3.ติดตั้ง Font พิมพ์คำสั่งใน PowerShell
oh-my-posh font install จากนั้นเลือก Meslo
4.ตั้งค่า Font โดยยังอยู่หน้า PowerShell กด CTRL + SHIFT + , มองหา profiles > defaults แล้วเพิ่มค่า font เข้าไป
"font":
{
"face": "MesloLGM Nerd Font"
}จะเป็นประมาณนี้
{
"profiles":
{
"defaults":
{
"font":
{
"face": "MesloLGM Nerd Font"
}
}
}
}5. พิมพ์คำสั่งใน PowerShell
oh-my-posh get shell6.ตั้งค่า PowerShell โดยพิมพ์
notepad $PROFILEหากไม่มีไฟล์ PowerShell Profile จะถาม Do you want to create a new file? ให้กด Yes
จากนั้นพิมพ์ค่านี้ลงไป แล้วกด Save
oh-my-posh init pwsh | Invoke-Expressionจากนั้นลองปิด PowerShell แล้วเปิดใหม่
ตั้งค่าสำหรับ VS Code
1. ไปที่ Settings ค้นหา terminal font
2. Terminal › Integrated: Font Family ให้กรอก
MesloLGM Nerd Font Mono