summaryrefslogtreecommitdiff
path: root/.zsh/functions/prompt_necoro_setup
blob: ad83361c3767211a57889eddf29230b2f47f1bff (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
32
33
34
35
36
37
38
# gentoo prompt theme

prompt_necoro_help () {
  cat <<'EOF'
This prompt is color-scheme-able.  You can invoke it thus:

  prompt necoro [<promptcolor> [<usercolor> [<rootcolor>]]]

EOF
}

prompt_necoro_setup () {
  emulate -L zsh

  autoload -U colors
  colors

  prompt_necoro_prompt=${1:-'blue'}
  prompt_necoro_user=${2:-'green'}
  prompt_necoro_root=${3:-'red'}

  if [ "$USER" = 'root' ]
  then
    base_prompt="%B%{$fg[$prompt_necoro_root]%}%m%k "
  else
    base_prompt="%B%{$fg[$prompt_necoro_user]%}%n@%m%k "
  fi
  post_prompt="%b%{$reset_color%}%k"

  #setopt noxtrace localoptions

  path_prompt="%B%{$fg[$prompt_necoro_prompt]%}%1~"
  PS1="$base_prompt$path_prompt %# $post_prompt"
  PS2="$base_prompt$path_prompt %_> $post_prompt"
  PS3="$base_prompt$path_prompt ?# $post_prompt"
}

prompt_necoro_setup "$@"
bers the date on reloadingRené 'Necoro' Neumann1-1/+16 2020-01-11Fix from upgrading flask-sqlalchemyRené 'Necoro' Neumann2-3/+6 2020-01-11Update Flask URLRené 'Necoro' Neumann1-1/+1 2020-01-11Increase copyrightRené 'Necoro' Neumann1-1/+1 2017-02-12Incorporate API changesRené 'Necoro' Neumann3-6/+6 2017-02-12Migrate flask.ext.foo to flask_fooRené 'Necoro' Neumann3-4/+4 2017-02-12Enable debugging for manage.shRené 'Necoro' Neumann1-1/+1 2017-02-12No need for flask-script anymore; flask provides this out of the boxRené 'Necoro' Neumann3-28/+17 2017-02-12No need for flask-sqlalchemy to track modifications and send eventsRené 'Necoro' Neumann1-0/+1 2017-02-12FixRené 'Necoro' Neumann1-1/+1 2016-07-08Constant -> KonstantRené 'Necoro' Neumann1-1/+1 2016-07-052to3 fixed too muchRené 'Necoro' Neumann1-1/+1 2016-07-052to3 conversionRené 'Necoro' Neumann12-42/+42 2016-07-05First batch of py3 changesRené 'Necoro' Neumann7-8/+7 2016-05-01Removed base 'Expense' class; introduce CategoryModel insteadRené 'Necoro' Neumann1-6/+7 2016-05-01Ignore .pyoRené 'Necoro' Neumann1-0/+1