Windows Terminal Custom Prompt Setup
In this tutorial, you learn how to set up Oh My Posh and Terminal-Icons in Windows Terminal.
learn.microsoft.com
oh my posh 설치
기본으로만 쓰다가, git을 자주 쓰니 바꾸어 보기로...
일단 MS문서에 따라 OhMyPosh를 설치
winget install JanDeDobbeleer.OhMyPosh
Theme 테마 선택
아래 사이트에서 테마를 고르고...
https://ohmyposh.dev/docs/themes
Themes | Oh My Posh
Oh My Posh comes with many themes included out-of-the-box. Below are some screenshots of the more common themes.
ohmyposh.dev
powerlevel10k_lean 으로 결정
사용자 계정별로 설정파일을 만들어야 하는데...
# 처음 설정한다면 설정 파일을 만들면서, 작업하기 위해
new-item -type file -path $profile -force
notepad $PROFILE
# 기존 설정을 변경하려면
notepad $PROFILE
# powerlevel10k_lean 테마설정
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\powerlevel10k_lean.omp.json" | Invoke-Expression
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\cobalt2.omp.json" | Invoke-Expression
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\powerline.omp.json" | Invoke-Expression
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\probua.minimal.omp.json" | Invoke-Expression
#아래, 커스텀설정 적용시
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\powerlevel10k_lean_my.omp.json" | Invoke-Expression
# 혹시 실행시 에러가 있으면 아래로 권한설정
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
아래 원하는 스타일로 명령어를 복사해서 메모장에다 붙여넣고 저장하기
최종 powershell 실행될 때마다, 이렇게 자동적용됨
custom 하기
그냥 써도 무방하지만 vscode에서 debugging 하거나 실행하다보면, 오른쪽에 실행시간 표시가 된 부분이 2번째줄로 넘어가서 가독성이 떨어진다. 그래서 시간 부분을 제거하고 사용
# powerlevel10k_lean 기반 커스텀설정
cd $env:POSH_THEMES_PATH/
cp powerlevel10k_lean.omp.json powerlevel10k_lean_my.omp.json
notepad powerlevel10k_lean_my.omp.json
윈도우 폰트 설치 및 적용 - coding용 Fira font
Fira Code로 설정하지 않으면, 4각형 박스가 나와서 어쩔수 없이 폰트 변경
>>> 폰트가 너무 얇아서 다시 MS 메뉴얼에 있는 "Hack" Font로 바꿈
참고자료
## FONT INSTALL
https://thekkom.tistory.com/318
win:: install d2coding, hack hack nerd font 코딩폰트
코딩용 폰트로는 Mono(동일간격) 폰트가 장점이 많다.간단히 아래 설명글을 보면 좋음. https://azi.medium.com/proportional-vs-monospaced-numbers-when-to-use-which-one-in-order-to-avoid-wiggling-labels-e31b1c83e4d0 Proportional
thekkom.tistory.com
https://thekkom.tistory.com/321
ubuntu:: install oh-my-posh
# admin 권한필요curl -s https://ohmyposh.dev/install.sh | bash -s# 위에 방법이 실패하면 사용자계정아래 설치하는 다음 문구로 설치curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/bin 설치하여 아래처럼 안내
thekkom.tistory.com
https://thekkom.tistory.com/15
ubuntu:: install d2coding font in jupyter, docker
2022-08-24 update Ubuntu(Linux)환경에서 Jupyter Notebook이나 Code-server를 사용하다보면 한글폰트가 필요할 때가 있다.시놀로지 - Docker내 환경이라 하더라도 리눅스 기반의 Docker실행이다 보니 Ubuntu(Linux) 환
thekkom.tistory.com
_