All gists

dartokloning
Last active 4 hours ago

# shell-prompt.zsh # Powerline-style prompt untuk Zsh di macOS Tahoe. # Diadaptasi dari konfigurasi synth-shell Bash.

0 0 1
1 # shell-prompt.zsh
2 # Powerline-style prompt untuk Zsh di macOS Tahoe.
3 # Diadaptasi dari konfigurasi synth-shell Bash.
4 # Membutuhkan Nerd Font agar icon dapat tampil dengan benar.
5
6 [[ -o interactive ]] || return
7
8 # -----------------------------------------------------------------------------
9 # Konfigurasi tampilan
10 # -----------------------------------------------------------------------------
dartokloning
Last active 4 hours ago
0 0 1
1 if [ "$color_prompt" = yes ]; then
2 PS1="\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\$PWD\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\] "
3 #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
4 else
5 PS1="\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\$PWD\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\] "
6 #PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
7 fi
8 unset color_prompt force_color_prompt
9
10 # If this is an xterm set the title to user@host:dir