- The attributes used with the items are customisable via strings
used before and after the actual item.
- The available items are: rc, rc-always, change-root, user, at, host, path,
- vcs, percent, sad-smiley, battery.
+ The available items are: at, battery, change-root, date, grml-chroot,
+ history, host, jobs, newline, path, percent, rc, rc-always, sad-smiley,
+ shell-level, time, user, vcs
The actual configuration is done via zsh's \`zstyle' mechanism. The
context, that is used while looking up styles is:
- items (list): The list of items used in the prompt. If \`vcs' is
present in the list, the theme's code invokes \`vcs_info'
- accordingly. Default: rc user change-root at host path vcs precent
+ accordingly. Default (left): rc change-root user at host path vcs
+ percent; Default (right): sad-smiley
Available styles in 'items:<item>' are: pre, post. These are strings that
are inserted before (pre) and after (post) the item in question. Thus, the
__EOF0__
}
+function prompt_grml-chroot_help () {
+ cat <<__EOF0__
+ prompt grml-chroot
+
+ This is a variation of the grml prompt, see: prompt -h grml
+
+ The main difference is the default value of the \`items' style. The rest
+ behaves exactly the same. Here are the defaults for \`grml-chroot':
+
+ - left: grml-chroot user at host path percent
+ - right: (empty list)
+__EOF0__
+}
+
+function prompt_grml-large_help () {
+ cat <<__EOF0__
+ prompt grml-large
+
+ This is a variation of the grml prompt, see: prompt -h grml
+
+ The main difference is the default value of the \`items' style. In
+ particular, this theme uses _two_ lines instead of one with the plain
+ \`grml' theme. The rest behaves exactly the same. Here are the defaults
+ for \`grml-chroot':
+
+ - left: rc jobs history shell-level change-root time date newline user
+ at host path vcs percent
+ - right: sad-smiley
+__EOF0__
+}
+
function grml_prompt_setup () {
emulate -L zsh
autoload -Uz vcs_info
grml_prompt_token_default
grml_prompt_pre_default=(
- rc '%F{red}'
- rc-always ''
- change-root ''
- user '%B%F{blue}'
at ''
+ battery ' '
+ change-root ''
+ date '%F{blue}'
+ grml-chroot '%F{red}'
+ history '%F{green}'
host ''
- path '%b'
- vcs ''
+ jobs '%F{cyan}'
+ newline ''
+ path '%B'
percent ''
+ rc '%F{red}'
+ rc-always ''
sad-smiley ''
- battery ' '
- newline ''
- jobs '%F{cyan}'
- history '%F{green}'
- date '%F{blue}'
- time '%F{blue}'
shell-level '%F{red}'
- grml-chroot '%F{red}'
+ time '%F{blue}'
+ user '%B%F{blue}'
+ vcs ''
)
grml_prompt_post_default=(
- rc '%f'
- rc-always ''
- change-root ''
- user '%f%b'
at ''
+ battery ''
+ change-root ''
+ date '%f'
+ grml-chroot '%f '
+ history '%f'
host ''
- path '%B'
- vcs ''
+ jobs '%f'
+ newline ''
+ path '%b'
percent ''
+ rc '%f'
+ rc-always ''
sad-smiley ''
- battery ''
- newline ''
- jobs '%f'
- history '%f'
- date '%f'
- time '%f'
shell-level '%f'
- grml-chroot '%f '
+ time '%f'
+ user '%f%b'
+ vcs ''
)
grml_prompt_token_default=(
- rc '%(?..%? )'
- rc-always '%?'
- change-root 'debian_chroot'
- user '%n'
at '@'
+ battery 'PERCENT'
+ change-root 'debian_chroot'
+ date '%D{%Y-%m-%d}'
+ grml-chroot 'GRML_CHROOT'
+ history '{history#%!} '
host '%m '
+ jobs '[%j running job(s)] '
+ newline $'\n'
path '%40<..<%~%<< '
- vcs '0'
- percent '%% '
+ percent '% # '
+ rc '%(?..%? )'
+ rc-always '%?'
sad-smiley '%(?..:()'
- battery 'PERCENT'
- newline $'\n'
- jobs '[%j running job(s)] '
- history '{history#%!} '
- date '%D{%Y-%m-%d}'
- time '%D{%H:%M:%S} '
shell-level '%(3L.+ .)'
- grml-chroot 'GRML_CHROOT'
+ time '%D{%H:%M:%S} '
+ user '%n'
+ vcs '0'
)
function grml_typeset_and_wrap () {