1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-10-16 13:50:46 +00:00

Compare commits

...

3 commits

Author SHA1 Message Date
Benjamin "Ziirish" SANS
245c7f02fb
Merge 672b958a7e into d39e426835 2024-03-12 01:32:06 -07:00
Roman Perepelitsa
d39e426835 docs: mention sessions in the font instructions for MobaXterm (#2599) 2024-03-12 08:07:40 +01:00
ziirish
672b958a7e add support for poetry virtualenv 2022-08-25 17:39:47 +02:00
7 changed files with 64 additions and 2 deletions

View file

@ -685,7 +685,9 @@ If you are using a different terminal, proceed with manual font installation.
tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`.
Exit the Preferences dialog by clicking *Close*.
- **MobaXterm**: Open *Settings**Configuration**Terminal* → (under *Terminal look and feel*)
and change *Font* to `MesloLGS NF`.
and change *Font* to `MesloLGS NF`. If you have *sessions*, you need to change the font in each
of them through *Settings* → right click on an individual session → *Edit Session* → *Terminal
Settings* → *Font settings*.
- **Asbrú Connection Manager**: Open *Preferences → Local Shell Options → Look and Feel*, enable
*Use these personal options* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.
To change the font for the remote host connections, go to *Preferences → Terminal Options →

View file

@ -47,6 +47,7 @@
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
anaconda # conda environment (https://conda.io/)
pyenv # python environment (https://github.com/pyenv/pyenv)
poetry # python poetry (https://python-poetry.org/)
goenv # go environment (https://github.com/syndbg/goenv)
nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
@ -950,6 +951,10 @@
# If set to "false", won't show virtualenv if pyenv is already shown.
# If set to "if-different", won't show virtualenv if it's the same as pyenv.
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
# If set to "true", get the virtualenv from poetry if available
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_POETRY=false
# Show poetry venv only when in a directory tree containing pyproject.toml.
typeset -g POWERLEVEL9K_POETRY_VENV_PROJECT_ONLY=true
# Separate environment name from Python version only with a space.
typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
# Custom icon.

View file

@ -47,6 +47,7 @@
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
anaconda # conda environment (https://conda.io/)
pyenv # python environment (https://github.com/pyenv/pyenv)
poetry # python poetry (https://python-poetry.org/)
goenv # go environment (https://github.com/syndbg/goenv)
nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
@ -929,6 +930,10 @@
# If set to "false", won't show virtualenv if pyenv is already shown.
# If set to "if-different", won't show virtualenv if it's the same as pyenv.
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
# If set to "true", get the virtualenv from poetry if available
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_POETRY=false
# Show poetry venv only when in a directory tree containing pyproject.toml.
typeset -g POWERLEVEL9K_POETRY_VENV_PROJECT_ONLY=true
# Separate environment name from Python version only with a space.
typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
# Custom icon.

View file

@ -47,6 +47,7 @@
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
anaconda # conda environment (https://conda.io/)
pyenv # python environment (https://github.com/pyenv/pyenv)
poetry # python poetry (https://python-poetry.org/)
goenv # go environment (https://github.com/syndbg/goenv)
nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
@ -925,6 +926,10 @@
# If set to "false", won't show virtualenv if pyenv is already shown.
# If set to "if-different", won't show virtualenv if it's the same as pyenv.
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
# If set to "true", get the virtualenv from poetry if available
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_POETRY=false
# Show poetry venv only when in a directory tree containing pyproject.toml.
typeset -g POWERLEVEL9K_POETRY_VENV_PROJECT_ONLY=true
# Separate environment name from Python version only with a space.
typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
# Custom icon.

View file

@ -47,6 +47,7 @@
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
anaconda # conda environment (https://conda.io/)
pyenv # python environment (https://github.com/pyenv/pyenv)
poetry # python poetry (https://python-poetry.org/)
goenv # go environment (https://github.com/syndbg/goenv)
nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
@ -998,6 +999,10 @@
# If set to "false", won't show virtualenv if pyenv is already shown.
# If set to "if-different", won't show virtualenv if it's the same as pyenv.
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
# If set to "true", get the virtualenv from poetry if available
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_POETRY=false
# Show poetry venv only when in a directory tree containing pyproject.toml.
typeset -g POWERLEVEL9K_POETRY_VENV_PROJECT_ONLY=true
# Separate environment name from Python version only with a space.
typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
# Custom icon.

View file

@ -70,7 +70,9 @@ If you are using a different terminal, proceed with manual font installation.
tab, uncheck *Use the system fixed width font* (if not already) and select `MesloLGS NF Regular`.
Exit the Preferences dialog by clicking *Close*.
- **MobaXterm**: Open *Settings**Configuration**Terminal* → (under *Terminal look and feel*)
and change *Font* to `MesloLGS NF`.
and change *Font* to `MesloLGS NF`. If you have *sessions*, you need to change the font in each
of them through *Settings* → right click on an individual session → *Edit Session* → *Terminal
Settings* → *Font settings*.
- **Asbrú Connection Manager**: Open *Preferences → Local Shell Options → Look and Feel*, enable
*Use these personal options* and change *Font:* under *Terminal UI* to `MesloLGS NF Regular`.
To change the font for the remote host connections, go to *Preferences → Terminal Options →

View file

@ -4286,6 +4286,44 @@ function _p9k_parse_virtualenv_cfg() {
reply=(1 "$res")
}
################################################################
# Segment to display poetry virtualenv information
# https://python-poetry.org/
prompt_poetry() {
local msg=''
if (( _POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION )) && _p9k_python_version; then
msg="${_p9k__ret//\%/%%} "
fi
_p9k_poetry_compute || return
msg+="$P9K_POETRY_PYTHON_VENV"
_p9k_prompt_segment "$0" "blue" "$_p9k_color1" 'PYTHON_ICON' 0 '' "$msg"
}
_p9k_prompt_poetry_init() {
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${commands[poetry]:-${${+functions[poetry]}:#0}}'
}
function _p9k_poetry_compute() {
unset P9K_POETRY_PYTHON_VENV
case $_POWERLEVEL9K_VIRTUALENV_SHOW_WITH_POETRY in
true)
_p9k_upglob pyproject.toml
local idx=$?
if (( idx == 1 )); then
_p9k_cached_cmd 0 $_p9k__parent_dirs[idx]/pyproject.toml poetry env info -p || return
elif (( idx > 1 )); then
(( _POWERLEVEL9K_POETRY_VENV_PROJECT_ONLY )) && return
_p9k_cached_cmd 0 '' poetry env info -p || return
fi
if [[ $_p9k__ret == (#b)*/([^/]##) ]]; then
typeset -g P9K_POETRY_PYTHON_VENV=$match[1]
return
fi
;;
esac
return 1
}
################################################################
# Virtualenv: current working virtualenv
# More information on virtualenv (Python):