mirror of https://gitlab.com/ceda_ei/wish
Add python_venv plugin. Update path plugin.
Add icon for non-writable directories.
This commit is contained in:
parent
713da785c4
commit
66f31d957b
|
@ -9,8 +9,14 @@ function wish_path_end() {
|
|||
function wish_path_set_colors() {
|
||||
WISH_PATH_FG=${WISH_PATH_FG:-$WISH_DEFAULT_FG}
|
||||
WISH_PATH_BG=${WISH_PATH_BG:-$WISH_DEFAULT_BG}
|
||||
WISH_PATH_NO_WRITE_SUFFIX=${WISH_PATH_NO_WRITE_SUFFIX:- }
|
||||
}
|
||||
|
||||
function wish_path_main() {
|
||||
wish_append $WISH_PATH_BG $WISH_PATH_FG " \w "
|
||||
if [[ -w $PWD ]]; then
|
||||
local path=" \w "
|
||||
else
|
||||
local path=" \w$WISH_PATH_NO_WRITE_SUFFIX "
|
||||
fi
|
||||
wish_append $WISH_PATH_BG $WISH_PATH_FG "$path"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
function wish_python_venv_start() {
|
||||
return 0
|
||||
}
|
||||
|
||||
function wish_python_venv_end() {
|
||||
return 0
|
||||
}
|
||||
|
||||
function wish_python_venv_set_colors() {
|
||||
WISH_PYTHON_VENV_FG=${WISH_PYTHON_VENV_FG:-$WISH_DEFAULT_FG}
|
||||
WISH_PYTHON_VENV_BG=${WISH_PYTHON_VENV_BG:-$WISH_DEFAULT_BG}
|
||||
}
|
||||
|
||||
function wish_python_venv_main() {
|
||||
if [[ -v VIRTUAL_ENV ]]; then
|
||||
local venv=$(echo $VIRTUAL_ENV | sed 's|.*/||')
|
||||
wish_append $WISH_PYTHON_VENV_BG $WISH_PYTHON_VENV_FG " $venv "
|
||||
else
|
||||
wish_append $WISH_PYTHON_VENV_BG $WISH_PYTHON_VENV_FG ""
|
||||
fi
|
||||
}
|
Loading…
Reference in New Issue