We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question: is there a way to add on the right side of prompt information about time, last command exit code and last command history number?
The text was updated successfully, but these errors were encountered:
I have this one https://github.com/romkatv/powerlevel10k
Sorry, something went wrong.
Hi,
I've changed a little bit agnostic theme attached to oh-my-zsh:
prompt_agnoster_precmd() { RV=$? vcs_info PROMPT='%{%f%b%k%}$(prompt_agnoster_main) ' RPROMPT="$(my_right_prompt)" } my_right_prompt() { local BATTERYLEVEL=`pmset -g batt | grep -Eo "\d+%" | cut -d% -f1` local BATTERYCOLOR=green if [ $BATTERYLEVEL -lt 90 ]; then BATTERYCOLOR=191 fi if [ $BATTERYLEVEL -lt 70 ]; then BATTERYCOLOR=179 fi if [ $BATTERYLEVEL -lt 50 ]; then BATTERYCOLOR=174 fi if [ $BATTERYLEVEL -lt 30 ]; then BATTERYCOLOR=209 fi if [ $BATTERYLEVEL -lt 15 ] ; then BATTERYCOLOR=001 [[ $RV -ne 0 ]] && line="%{%F{red}%}$CROSS" [[ $RV -eq 0 ]] && line="%{%F{green}%}$TICK" local DATALONG=$(date +%Y-%m-%d\ %H:%M:%S) local DATASHORT=$(date +%H:%M:%S) $(battery_time_remaining) $BATTERYLEVEL%%]" line+="[$DATASHORT]%{%F{$BATTERYCOLOR}%}[$BATTERYICON $BATTERYLEVEL%%]" echo -n $line }
No branches or pull requests
question: is there a way to add on the right side of prompt information about time, last command exit code and last command history number?
The text was updated successfully, but these errors were encountered: