1
0
mirror of https://gitlab.com/ceda_ei/wish synced 2025-10-28 00:50:07 +01:00

3 Commits

Author SHA1 Message Date
e05f37b5b9 Merge branch 'config-file' of ceda/Wish into master
Wish is now configured by a config file (although WISH_PLUGINS and
WISH_RIGHT_PLUGINS are still used as a fallback if no config file is
found. This way old setups won't break). Config file allows for higher
customization and re-use of plugins and is easier to maintain for
users. Add gINIe parser to Wish. Parse a gINIe config file for wish
config. Wrappers around plugins are created to allow re-use with
multiple configs and themes.
2019-12-31 13:41:47 +05:30
c53939cdfe Subtract length of powerline symbols from prompt length max length. 2019-12-31 11:25:55 +05:30
48ff98764d [Feature] Allow WISH_VCS_DEFAULT to be empty 2019-12-29 22:26:08 +05:30
2 changed files with 3 additions and 3 deletions

View File

@@ -24,7 +24,7 @@ function wish_path_lensum() {
function wish_path_powerline_shrink() { function wish_path_powerline_shrink() {
local IFS='/' local IFS='/'
local path=( $1 ) local path=( $1 )
local max=$2 local max=$(( $2 - 3 * ${#path[@]} ))
for ((i=0; i <$((${#path[@]} - 1)); i++)); do for ((i=0; i <$((${#path[@]} - 1)); i++)); do
path[$i]=${path[$i]:0:1} path[$i]=${path[$i]:0:1}
if [[ $(wish_path_lensum ${path[@]}) -lt $max ]]; then if [[ $(wish_path_lensum ${path[@]}) -lt $max ]]; then

View File

@@ -10,7 +10,7 @@ function wish_vcs_set_colors() {
WISH_VCS_FG=${WISH_VCS_FG:-$WISH_DEFAULT_FG} WISH_VCS_FG=${WISH_VCS_FG:-$WISH_DEFAULT_FG}
WISH_VCS_BG=${WISH_VCS_BG:-$WISH_DEFAULT_BG} WISH_VCS_BG=${WISH_VCS_BG:-$WISH_DEFAULT_BG}
WISH_VCS_GIT_SYMBOL=${WISH_VCS_GIT:-} WISH_VCS_GIT_SYMBOL=${WISH_VCS_GIT:-}
WISH_VCS_DEFAULT=${WISH_VCS_DEFAULT:-$} [[ -v WISH_VCS_DEFAULT ]] || WISH_VCS_DEFAULT="$"
WISH_VCS_GIT_UNTRACKED_SYMBOL=${WISH_VCS_GIT_UNTRACKED_SYMBOL:-} WISH_VCS_GIT_UNTRACKED_SYMBOL=${WISH_VCS_GIT_UNTRACKED_SYMBOL:-}
} }
@@ -32,7 +32,7 @@ function wish_vcs_main() {
fi fi
wish_append $WISH_VCS_BG $WISH_VCS_FG "$git" wish_append $WISH_VCS_BG $WISH_VCS_FG "$git"
else else
wish_append $WISH_VCS_BG $WISH_VCS_FG " $WISH_VCS_DEFAULT " wish_append $WISH_VCS_BG $WISH_VCS_FG "$WISH_VCS_DEFAULT"
fi fi
} }