diff --git a/functions b/functions index 4ff1b79..a58d809 100755 --- a/functions +++ b/functions @@ -51,6 +51,10 @@ function virtualenv_prompt_info(){ echo "${ZSH_THEME_VIRTUALENV_PREFIX:=[}${VIRTUAL_ENV:t}${ZSH_THEME_VIRTUALENV_SUFFIX:=]}" } +last_status () { + echo "%(?..%{$fg_no_bold[red]%}[%?])" +} + # disables prompt mangling in virtual_env/bin/activate export VIRTUAL_ENV_DISABLE_PROMPT=1 @@ -58,12 +62,12 @@ function _prompt_chars() { if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then local _GIT_CHAR="%{$fg_no_bold[blue]%}±%{$reset_color%}" else - local _GIT_CHAR=' ' + local _GIT_CHAR='' fi local _VENV_PROMPT="%{%}$(virtualenv_prompt_info)" - echo "$_GIT_CHAR$_VENV_PROMPT $(color_prompt_char)" + echo "$_GIT_CHAR$_VENV_PROMPT$(last_status) $(color_prompt_char)" } function charge_batterie { diff --git a/zshrc b/zshrc index 92eed69..e0e6732 100644 --- a/zshrc +++ b/zshrc @@ -72,10 +72,11 @@ alias -g ......='../../../../..' alias -g .......='../../../../../..' alias -g ........='../../../../../../..' # Hackish tweaks -alias steam-wine='WINEDEBUG=-all wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe -no-dwrite -no-cef-sandbox >/dev/null 2>&1 &' +alias steam-wine="WINEDEBUG=-all wine ~/$WINEPREFIX/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe -no-dwrite -no-cef-sandbox >/dev/null 2>&1 &" alias pacaur='AURDEST=$HOME/aur pacaur' alias redwm='cd ~/aur/dwm-git; updpkgsums; makepkg -fi --noconfirm; killall dwm' alias minecraft='java -jar $HOME/.minecraft/launcher.jar' +alias shuffle='mpv --shuffle --volume=50 --no-audio-display' alias steam="LD_PRELOAD='/usr/\$LIB/libstdc++.so.6 /usr/\$LIB/libgcc_s.so.1 /usr/\$LIB/libxcb.so.1 /usr/\$LIB/libgpg-error.so' /usr/bin/steam" alias surftor='http_proxy=socks5://127.0.0.1:9050/ surf' @@ -101,7 +102,7 @@ esac # ZSH options # ############### -unsetopt rm_star_silent # Demande confirmation pour 'rm *' -> ou 'rm patth/*' +unsetopt rm_star_silent # Demande confirmation pour 'rm *' -> ou 'rm path/*' unsetopt glob_dots # (disabled) Do not require a leading `.' in a filename to be matched explicitly. setopt null_glob # Delete pattern when no match found, instead of erroring # (disabled) If there is an unambiguous prefix to insert on @@ -111,24 +112,21 @@ setopt null_glob # Delete pattern when no match found, instead of err # # le fichier ne sera pas écrasé avec '>' #unsetopt clobber setopt auto_remove_slash # Auto remove slash at the end of autocomp when appropriate -setopt auto_cd # Perform cd if command is directory and can't be executed setopt chase_links # Traite les liens symboliques comme il faut setopt hist_verify # !! n'est pas exécuté directement setopt promptsubst # Enable prompt substitution: vars are recalculated. you need '$foo' setopt hist_ignore_all_dups # Only keep last version of duplicate command setopt sharehistory # Import new cmds from hist file & append typed cmds setopt hist_ignore_space # Ignore cmds with leading space -setopt print_exit_value # Afficher «zsh: exit ERREUR» en cas d'erreur ≠ 0 setopt autopushd # cd pushes old dir to dir stack setopt pushdsilent # Silent pushd & popd setopt pushdtohome # pushd = pushd $HOME setopt pushdignoredups setopt pushdminus # This reverts the +/- operators for pushd. setopt extendedglob # Treat `#', `~' and `^' chars as part of patterns for filenames, etc. -setopt correct # Provide correction to mistyped commands EXPORTTIME=0 # (Disabled) Display command execution time -COMPLETION_WAITING_DOTS="true" # Display red dots while zsh autocompletes +COMPLETION_WAITING_DOTS=1 # Display red dots while zsh autocompletes HISTSIZE=10000000 SAVEHIST=10000000 HISTFILE=~/.history