Show Us Your baschrc or zshrc or Whatever-rc

What is your zsh theme set to?

simpl

oh i added export TERM=alacritty in zshrc and now it’s fine
thanks man

2020-04-28_03-14

Many thanks for all people to participate at this topic.
By sharing we progress :wink:
I have update my prompt to like with the zshrc
`

  • PS1="\n\[\033[33m\]\$(/bin/date '+%A %B %d %Y %T')\n\[\033[32m\]\w\n\[\033[1;31m\]\u@\h:\[\033[1;34m\]\$(/usr/bin/tty | /bin/sed -e 's:/dev/::'): \[\033[1;36m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files \[\033[1;33m\]\$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\033[0m\] -> \[\033[0m\]"
    

`
With the picture :wink:
prompt

1 Like

~/.xstefenrc loaded from .bashrc or .bash_profile if var XSTFNRC doesnt exist via:

[[ -z "$XSTFNRC" ]] && . ~/.xstefenrc

#
# ~/.xstefenrc
#

# some options
export HISTCONTROL='ignoreboth'
export HISTFILESIZE="${HISTSIZE}"
export HISTIGNORE='&:ls:ll:la:cd:exit:clear:history'
export HISTSIZE='1000'
shopt -s autocd cdable_vars cdspell
shopt -s autocd cdspell
shopt -s checkhash
shopt -s checkwinsize
shopt -s cmdhist histappend histreedit histverify
shopt -s direxpand
shopt -s expand_aliases
shopt -s extglob dotglob
shopt -s no_empty_cmd_completion
shopt -s sourcepath

# gpg/ssh-agent start
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
  export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null

# some functions
0file() { curl -F"file=@$1" https://envs.sh ; }
0pb() { curl -F"file=@-;" https://envs.sh ; }
0short() { curl -F"shorten=$1" https://envs.sh ; }
0url() { curl -F"url=$1" https://envs.sh ; }
mkcd(){ NAME=$1; mkdir -p "$NAME"; cd "$NAME"; }
repofastsync() {
  time schedtool -B -n 1 -e ionice -n 1 \
  "$(which repo)" sync -c --optimized-fetch --no-tags --no-clone-bundle -j8 "$@" ;
}

# some aliases
alias ..='cd ..'
alias adp='adb push'
alias cls="echo -e '\0033\0143'"
alias df='df -h'
alias diff='colordiff'
alias dir='dir --color=auto'
alias du='du -c -h'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias free='free -m'
alias git='hub'
alias grep='grep --color=tty -d skip'
alias ll='ls -Alh --color=auto'
alias ls='ls --color=none'
alias mirrorz='sudo reflector --verbose --latest 200 --protocol https --sort rate --save /etc/pacman.d/mirrorlist'
alias mkdir='mkdir -p -v'
alias more='less'
alias nano='nano -w'
alias ping='ping -c 5'
alias reboot='sudo reboot'
alias reload='clear && reset && cls && source ~/.xstefenrc'
alias rp='repopick '
alias sudo='sudo '
alias sysu='systemctl --user'
alias update-grub='grub-mkconfig -o /boot/grub/grub.cfg'
alias wttr='curl wttr.in/dfw?format=3'
alias xobwin='obxprop | grep "^_OB_APP"'
alias xup='sudo pacman -Sy && sudo powerpill -Su && yay -Su'

# add ~/bin to path like a sir
[[ $PATH != ?(*:)$HOME/bin?(:*) ]] && export PATH=$HOME/bin:$PATH

# export some vars
export CCACHE_COMPRESS="1"
export CCACHE_DIR="$HOME/.ccache"
export CCACHE_EXEC="$(which ccache)"
export EDITOR="micro"
export WITHOUT_CHECK_API="true"
export USE_CCACHE="1"
export XSTFNRC="true"

# sexy-bash-prompt
. $HOME/.bash_prompt
PROMPT_SYNCED_SYMBOL=""
PROMPT_DIRTY_SYNCED_SYMBOL="*"
PROMPT_UNPUSHED_SYMBOL="↑"
PROMPT_DIRTY_UNPUSHED_SYMBOL="*↑"
PROMPT_UNPULLED_SYMBOL="↓"
PROMPT_DIRTY_UNPULLED_SYMBOL="*↓"
PROMPT_UNPUSHED_UNPULLED_SYMBOL="*↑↓"
PROMPT_DIRTY_UNPUSHED_UNPULLED_SYMBOL="*↑↓"
PROMPT_SYMBOL="$"

am pretty proud of this one, for those who dont like PATH dupe spam:

# add ~/bin to path like a sir
[[ $PATH != ?(*:)$HOME/bin?(:*) ]] && export PATH=$HOME/bin:$PATH

The rest https://git.sr.ht/~xstefen/dotfiles, yadm annoyed me today along with gpg so looking for another management solution

2 Likes

New two-line prompt:

PS1='\D{%T • %F} • \s • \u@\h: \w \e[1;31m${?#0}\e[0m\n\e[1;37m\$\e[0m '

Which looks like this (130 exit status shown as example, that space is blank unless the exit status is non-zero):

09:56:11 • 2020-11-01 • oksh • empty@E485: ~ 130
$

So I have lots of information in the prompt (time & date, shell, user name, host name, current working directory and exit status if non-zero) but it doesn’t eat into my typing space. Nice.

3 Likes

image

@anon42040838, yes it is better.
more clean for the prompt.

1 Like