aboutsummaryrefslogtreecommitdiffstats
path: root/zsh/prompt.zsh
blob: e5c5c974def6228d8ced9083b0478b5aabf6cf58 (plain)
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
function red
	printf "%s%s%s" "%F{red}" "$@" "%f"
function redbg
	printf "%s%s%s" "%K{red}" "$@" "%k"
function redbg_p
	printf "%s%s%s" "%K{red}" "$@" "%k$(red $RSEGF$RSEG)"

function bluebg_p
	printf "%s%s%s" "%K{blue}" "$@" "%k%F{blue}$RSEGF$RSEG%f"

function black
	printf "%s%s%s" "%F{black}" "$@" "%f"
function blackbg
	printf "%s%s%s" "%K{black}" "$@" "%k"

function white
	printf "%s%s%s" "%F{white}" "$@" "%f"
function whitebg
	printf "%s%s%s" "%K{white}" "$@" "%k"

function user_color {
	(( UID )) && print -n black || print -n red
}

RSEGF=""
RSEG=""
LSEGF=""
LSEG=""
BRNCH=""
PROMPT='$($(user_color)bg " $(white %m) ")$(whitebg "$($(user_color) "$RSEGF %~") ")$RSEGF
%(?.$(bluebg_p "%B ^_^ %b").$(redbg_p "%B o_O %b")) '