-
Notifications
You must be signed in to change notification settings - Fork 52
/
manjaro-zsh-prompt
31 lines (28 loc) · 999 Bytes
/
manjaro-zsh-prompt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
() {
emulate -L zsh
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
# Determine terminal capabilities.
{
if ! zmodload zsh/langinfo zsh/terminfo ||
[[ $langinfo[CODESET] != (utf|UTF)(-|)8 || $TERM == (dumb|linux) ]] ||
(( terminfo[colors] < 256 )); then
# Don't use the powerline config. It won't work on this terminal.
local USE_POWERLINE=false
# Define alias `x` if our parent process is `login`.
local parent
if { parent=$(</proc/$PPID/comm) } && [[ ${parent:t} == login ]]; then
alias x='startx ~/.xinitrc'
fi
fi
} 2>/dev/null
if [[ $USE_POWERLINE == false ]]; then
# Use 8 colors and ASCII.
source /usr/share/zsh/p10k-portable.zsh
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=black,bold'
else
# Use 256 colors and UNICODE.
source /usr/share/zsh/p10k.zsh
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=244'
fi
}