diff --git a/README.md b/README.md index 447d6f2..ee38404 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,13 @@ It is an original prompt design, very carefully designed, that will completely changes the way you imagine the prompt. It is focused on *improving the user experience*, -by vastly improving the ability of the user to immediately spot +by vastly improving the ability of the user to immediatly spot what she should do following her system's state changes. Has such, you may find it a little bit disconcerting at first. But we believe that the advantages of this design makes it worth the effort. -![A ship with black sails, three of which are printed with the symbols "~", "$", and ">"; going out of a circling boat wheel with sun rays in her back; and navigating a blue wave with froth going over a banner that reads "Liquid Prompt". A large black flag is attached to the front shroud, showing a skull and two crossed bones, on top of a legend reading "jolly roger".](docs/jolly_emblem.svg) - - Preview ------- @@ -63,7 +60,7 @@ The prompt itself is designed in three lines: ### Example For instance, in the following prompt, you can see that the user is in a Git repository and has some action waiting to be done: -- the rightmost blue "≠" indicates that there are some modifications waiting to be committed (hence the directional hint, from a diff to the branch). +- the rightmost blue "≠" indicates that there are some modifications waiting to be commited (hence the directional hint, from a diff to the branch). - the leftmost blue segment indicates that there are some commits that may be pushed to the remote (hence the directional hint, from the branch to the VCS symbol). ![](screenshots/variant-chevron.png) @@ -100,7 +97,7 @@ For example: source ~/lp-jolly/jolly.theme && lp_theme jolly ``` -NOTE: The recommended segment markers (the "chevron" variant) uses characters in the private section of Unicode +NOTE: The recommended segment markers (the "chevron" variant) uses characters in the private section of unicode that are defined by the "Nerd-fonts" project. You will either need a compatible font, or use a variant that does not need them, like "text" and "jolly". @@ -152,6 +149,8 @@ except for the ones defining colors, specific marks and disabling some features. The following options are honored: - [`LP_ENABLE_PERM`](https://liquidprompt.readthedocs.io/en/stable/config.html#LP_ENABLE_PERM), +- [`LP_ENABLE_VCS_DIFFSTATS`](https://liquidprompt.readthedocs.io/en/stable/config.html#LP_ENABLE_VCS_DIFFSTATS), +- [`LP_ENABLE_UNCOMMITED`](https://liquidprompt.readthedocs.io/en/stable/config.html#LP_ENABLE_UNCOMMITED), - [`LP_MARK_BATTERY`](https://liquidprompt.readthedocs.io/en/stable/config.html#LP_MARK_BATTERY), - [`LP_MARK_LOAD`](https://liquidprompt.readthedocs.io/en/stable/config.html#LP_MARK_LOAD), - [`LP_MARK_TEMP`](https://liquidprompt.readthedocs.io/en/stable/config.html#LP_MARK_TEMP), @@ -174,13 +173,13 @@ Note: the order in which you load the presets may be important. When changing the colors of the first line, presets needs to be loaded from your shell configuration and not just sourced in the prompt. -A first set is called "variants" and mainly change the segment joints, +A first set is are called "variants" and mainly change the segment joints, but can also impact the icons on some variants: -- `source presets/variant-chevron.conf` (the *recommended*, need a Nerd-fonts font), -- `source presets/variant-slant.conf` (need a Nerd-fonts font), -- `source presets/variant-round.conf` (need a Nerd-fonts font), -- `source presets/variant-text.conf` (the one that works anywhere). +- `source presets/variant-chevron.conf" (the *recommended*, need a Nerd-fonts font), +- `source presets/variant-slant.conf" (need a Nerd-fonts font), +- `source presets/variant-round.conf" (need a Nerd-fonts font), +- `source presets/variant-text.conf" (the one that works anywhere). A second set changes the colors: @@ -517,7 +516,6 @@ The color starting the gradient of the line of the middle section. Default is white. Valus being linearly interpolated up to `JOLLY_COLOR_LINE_END`, - it is recommended to stick to aligned ANSI values (i.e. greys) @@ -526,9 +524,7 @@ it is recommended to stick to aligned ANSI values (i.e. greys) The color ending the gradient of the line of the middle section. Default is black. - Valus being linearly interpolated from `JOLLY_COLOR_LINE_START`, - it is recommended to stick to aligned ANSI values (i.e. greys). diff --git a/docs/README.md b/docs/README.md index 65b50e3..c2ea1e0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -149,13 +149,6 @@ States that rarely change or evolve slowly are less important. Each aspect of theming should have a related configuration variable. -## More details - -If you want to know more, check our -[opinionated prompt systems comparison](https://github.com/liquidprompt/liquidprompt/wiki/Why) -that goes into more details and give examples across various other prompt systems. - - # Jolly's Design Principles ## Stability @@ -171,8 +164,6 @@ change too much the location of information previously displayed. > Sections are thus organized from left to right, in decreasing order of stability. > Jolly always displays important segments, even in their default state, so that they are always located where the user expect them to be. -![](../screenshots/variant-chevron.png) - ## Sectioning @@ -204,8 +195,6 @@ To ease the visual browsing of those segments, it uses the visual separators int > While Jolly can theoretically use many of the "powerline" characters as separators, it recommends using the "arrow" one, which fits better the *semantic sequence* principle. -![](../screenshots/variant-round.png) - ## Semantic Sequences @@ -217,8 +206,6 @@ For instance from the more generic to the more specific, from a natural order of > Spaced reverse arrows in the VCS sections actually show the direction of the expected action > (e.g. "to be pushed" = local-to-remote = right-to-left). -![](../screenshots/git_commits.png) - ## Semantic Spaces @@ -247,8 +234,6 @@ Important information may be displayed using two other colors: one for informati > Its default is set to blue/yellow, following the most classical recommendation to bypass the most common colorblindness issues. > The basic segments use tones of dark and light greys with AAA contrast between them, appearing as black and white on many classical terminal backgrounds. -![](../screenshots/variant-chevron_colors-cyan-magenta.png) - ## Semantic Thresholds diff --git a/docs/jolly_emblem.svg b/docs/jolly_emblem.svg deleted file mode 100644 index 3ecd7ff..0000000 --- a/docs/jolly_emblem.svg +++ /dev/null @@ -1,2761 +0,0 @@ - - - -Liquid Prompt — Jolly Roger Emblem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - nojhan, dolmen, Rycieos & co~ https://github.com/ liquidprompt/liquidprompt - - - Liquid Prompt — Jolly Roger Emblem2024-04-01nojhanLiquid PromptBashZshAGPL~$>Jolly Rogeren_USA ship with black sails, three of which are printed with the symbols "~", "$", and ">"; going out of a circling boat wheel with sun rays in her back; and navigating a blue wave with froth going over a banner that reads "Liquid Prompt". A large black flag is attached to the front shroud, showing a skull and two crossed bones, on top of a legend reading "jolly roger".Mariana Ruiz "LadyofHats " Villarreal diff --git a/jolly.theme b/jolly.theme index 184b94e..c8e6a0c 100644 --- a/jolly.theme +++ b/jolly.theme @@ -444,37 +444,40 @@ _lp_jolly_make_env() { if _lp_env_vars "${LP_COLOR_ENV_VARS_SET}" "${LP_COLOR_ENV_VARS_UNSET}"; then local lp_join _lp_join "$I" ${lp_env_vars[@]} - _lp_jolly_make_env_inline_left+="${d}${lp_join}$b" + _lp_jolly_make_env_inline_left+="$d${lp_join}$b" fi if _lp_software_collections ; then - _lp_jolly_make_env_inline_left+="${d}sc:${lp_software_collections}$b" + _lp_jolly_make_env_inline_left+="$d${lp_software_collections}$b" fi if _lp_python_env ; then - _lp_jolly_make_env_inline_left+="${d}py:${lp_python_env}$b" + _lp_jolly_make_env_inline_left+="$d${lp_python_env}$b" fi if _lp_node_env ; then - _lp_jolly_make_env_inline_left+="${d}node:${lp_node_env}$b" + _lp_jolly_make_env_inline_left+="$d${lp_node_env}$b" fi if _lp_ruby_env ; then - _lp_jolly_make_env_inline_left+="${d}ruby:${lp_ruby_env}$b" + _lp_jolly_make_env_inline_left+="$d${lp_ruby_env}$b" fi if _lp_container ; then - _lp_jolly_make_env_inline_left+="${d}c:${lp_container}$b" + _lp_jolly_make_env_inline_left+="$d${lp_container}$b" fi if _lp_kubernetes_context ; then - _lp_jolly_make_env_inline_left+="${d}kub:${lp_kubernetes_context}$b" + _lp_jolly_make_env_inline_left+="$d${lp_kubernetes_context}$b" fi if _lp_terraform_env ; then - _lp_jolly_make_env_inline_left+="${d}tf:${lp_terraform_env}$b" + _lp_jolly_make_env_inline_left+="$d${lp_terraform_env}$b" fi if _lp_aws_profile ; then - _lp_jolly_make_env_inline_left+="${d}aws:${lp_aws_profile}$b" + _lp_jolly_make_env_inline_left+="$d${lp_aws_profile}$b" fi if _lp_cmake ; then local lp_join _lp_join "$I" ${lp_cmake_c_compiler} ${lp_cmake_cxx_compiler} ${lp_cmake_generator} ${lp_cmake_buildtype} _lp_jolly_make_env_inline_left+="$d${lp_join}$b" fi + if _lp_container; then + _lp_jolly_make_env_inline_left+="$d$lp_container$b" + fi if _lp_modules; then _lp_jolly_make_env_inline_left+="$d" _lp_join "$I" "${lp_modules[@]}" @@ -482,7 +485,7 @@ _lp_jolly_make_env() { fi # History section. - _lp_jolly_make_env_inline_right= + local _lp_jolly_make_env_inline_right= if _lp_os; then _lp_join "$I" ${lp_os_arch} ${lp_os_family} ${lp_os_kernel} ${lp_os_distrib} ${lp_os_version} _lp_jolly_make_env_inline_right+="$d${lp_join}$b" @@ -848,18 +851,17 @@ __jolly_activate_user() { __jolly_activate_hostname() { - local hostname= + local hostname if _lp_hostname; then case "$lp_connection" in ssh) - hostname="$lp_hostname" - local client_ip client_port server_ip server_port + local client_ip client_port server_ip server_port hostname= IFS=" " read -r client_ip client_port server_ip server_port <<<"$SSH_CONNECTION" local username=${USER:-${USERNAME:-${LOGNAME-}}} - if _lp_create_link "ssh://${username}@${server_ip}:${server_port}" "$hostname"; then + if _lp_create_link "ssh://${username}@${server_ip}:${server_port}" "$lp_hostname"; then hostname="$link" else - hostname="$hostname" + hostname="$lp_hostname" fi # If we want a different color for each host if (( LP_ENABLE_SSH_COLORS )); then @@ -880,15 +882,8 @@ __jolly_activate_hostname() { hostname="${JOLLY_HOST_LOCAL}" fi - if __jolly_make_field "$hostname" ${JOLLY_COLOR_LITE[@]+"${JOLLY_COLOR_LITE[@]}"} ; then - _JOLLY_HOSTNAME="${jolly_field}" - else - if __jolly_make_field "$lp_hostname" ${JOLLY_COLOR_LITE[@]+"${JOLLY_COLOR_LITE[@]}"} ; then - _JOLLY_HOSTNAME="${jolly_field}" - else - _JOLLY_HOSTNAME="${lp_hostname}" - fi - fi + __jolly_make_field "$hostname" ${JOLLY_COLOR_LITE[@]+"${JOLLY_COLOR_LITE[@]}"} + _JOLLY_HOSTNAME="${jolly_field}" } @@ -1229,8 +1224,7 @@ __jolly_join_fields() { } __jolly_make_field() { # string, color_array - local string="${1-}" - local lp_terminal_format + local lp_terminal_format string="${1-}" [[ -z $string ]] && return 1 shift