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

 
 
설치하여 아래처럼 안내문구 보이더라도, $PATH설정을 해줘야 함

ubuntu@ubunt:~$ curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/bin

⚠️  Installation directory /home/ubuntu/bin is not in your $PATH

ℹ️  Installing oh-my-posh for linux-amd64 in /home/ubuntu/bin
⬇️  Downloading oh-my-posh from https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64
🎨 Installing oh-my-posh themes in /home/ubuntu/.cache/oh-my-posh/themes

🚀 Installation complete.

You can follow the instructions at https://ohmyposh.dev/docs/installation/prompt
to setup your shell to use oh-my-posh.

If you want to use a built-in theme, you can find them in the  directory:
  oh-my-posh init {shell} --config /{theme}.omp.json

 
 
 
 
.profile을 수정하기 위해 아래 문구삽입

# open editor
sudo nano ~/.bashrc


# paste below at the bottom line
if [ -d "$HOME/bin" ] ; then
  PATH="$PATH:$HOME/bin"
fi

 
 
 
 

font 설정

oh-my-posh font install


------------------------                                                                    
    Successfully installed D2Coding 🚀                              
                                                                    
    The following font families are now available for configuration:
      • D2CodingLigature Nerd Font Mono                             
      • D2CodingLigature Nerd Font Propo                            
      • D2CodingLigature Nerd Font

 
 

 

 

# 수동설치
sudo apt install wget fontconfig

# install d2coding font
wget -P ~/.local/share/fonts https://github.com/ryanoasis/nerd-fonts/releases/latest/download/D2Coding.zip \
&& cd ~/.local/share/fonts && unzip D2Coding.zip && rm D2Coding.zip  
fc-cache -f -v
fc-list | grep -i d2coding
 
 
# install Hack font
wget -P ~/.local/share/fonts https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Hack.zip \
&& cd ~/.local/share/fonts && unzip Hack.zip && rm Hack.zip  
fc-cache -f -v
fc-list | grep -i hack

 

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

 

 

 


 

change prompt

# add ~/.bashrc
sudo nano ~/.bashrc


# add at the bottom
eval "$(oh-my-posh init bash)"


# run
exec bash
. ~/.profile


--------------------
# select THEME
eval "$(oh-my-posh init bash --config ~/jandedobbeleer.omp.json)"
eval "$(oh-my-posh init bash --config ~/powerlevel10k_lean.omp.json)"
eval "$(oh-my-posh init bash --config ~/cobalt2.omp.json)"
eval "$(oh-my-posh init bash --config ~/powerline.omp.json)"

 
 
 

 
 
 
 
문제)
** vscode.dev으로 접속해 terminal의 font를 설정해도 nerd font의 특수문자/심볼이 표시가 정상적으로 안됨

 
 
 

 

 


https://thekkom.tistory.com/285

 

win:: oh-my-posh // customize windows terminal

https://learn.microsoft.com/en-us/windows/terminal/tutorials/custom-prompt-setup#customize-your-wsl-prompt-with-oh-my-posh Windows Terminal Custom Prompt SetupIn this tutorial, you learn how to set up Oh My Posh and Terminal-Icons in Windows Terminal.lear

thekkom.tistory.com

 


 
 
_

반응형