Exactly. But that’s just a bit of playing around. You really don’t need it, but a nerdy saying at the start of a terminal is funny
I personally don’t like Powerline. I just wanted to have it simple.
There really is a lot to configure. But you can also just leave it simple.
If you are interested, this is my starship.toml
starship.toml
format = """
$directory\
$git_branch\
$git_status\
$fill\
$python\
$lua\
$nodejs\
$golang\
$haskell\
$rust\
$ruby\
$aws\
$docker_context\
$jobs\
$time\
$username\
$hostname\
$cmd_duration\
$line_break\
$character"""
add_newline = true
palette = "nord"
[character]
success_symbol = '[❯](bold green) '
error_symbol = '[✗](bold red) '
[cmd_duration]
min_time = 5
show_milliseconds = true
style = 'fg:yellow'
format = '[$duration]($style)'
[time]
disabled = false
time_format = "%R" # Hour:Minute Format
style = "fg:yellow"
format = '[ $time ]($style)'
[username]
style_user = "fg:green"
style_root = "fg:red"
format = "[$user ]($style) "
disabled = false
show_always = true
[hostname]
ssh_only = false
ssh_symbol = " "
format = 'on [EndeavourOS ](purple) '
trim_at = "."
disabled = false
[directory]
style = 'bold fg:blue'
format = '[$path ]($style)[$read_only]($read_only_style)'
truncation_length = 4
truncation_symbol = '…/'
truncate_to_repo = false
#[directory.substitutions]
#"Dokumente" = " "
#"Downloads" = " "
#"Musik" = " "
#"Bilder" = " "
[git_branch]
style = 'fg:green'
symbol = ' '
format = '[on](white) [$symbol$branch ]($style)'
[git_status]
style = 'fg:red'
format = '([$all_status$ahead_behind]($style) )'
[fill]
symbol = ' '
[python]
style = 'teal'
symbol = ' '
format = '[${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'
pyenv_version_name = true
pyenv_prefix = ''
[lua]
symbol = ' '
[nodejs]
style = 'blue'
symbol = ' '
[golang]
style = 'blue'
symbol = ' '
[haskell]
style = 'blue'
symbol = ' '
[rust]
style = 'orange'
symbol = ' '
[ruby]
style = 'blue'
symbol = ' '
[package]
symbol = ' '
[aws]
symbol = ' '
style = 'yellow'
format = '[$symbol($profile )(\[$duration\] )]($style)'
[docker_context]
symbol = ' '
style = 'fg:teal'
format = '[$symbol]($style) $path'
detect_files = ['docker-compose.yml', 'docker-compose.yaml', 'Dockerfile']
detect_extensions = ['Dockerfile']
[jobs]
symbol = ' '
style = 'red'
number_threshold = 1
format = '[$symbol]($style)'
[palettes.nord]
dark_blue = '#5E81AC'
blue = '#81A1C1'
teal = '#88C0D0'
red = '#BF616A'
orange = '#D08770'
green = '#A3BE8C'
yellow = '#EBCB8B'
purple = '#B48EAD'
gray = '#434C5E'
black = '#2E3440'
white='#D8DEE9'
[palettes.onedark]
dark_blue='#61afef'
blue='#56b6c2'
red='#e06c75'
green='#98c379'
purple='#c678dd'
cyan='#56b6c2'
orange='#be5046'
yellow='#e5c07b'
gray='#828997'
white ='#abb2bf'
black='#2c323c'
And thats my zshrc, its all for my needs.
zshrc
`# Created by swh for 5.9
#exa alias
alias la=“eza --long --all --group”
alias ll=‘eza -la --icons --octal-permissions --group-directories-first’
alias ls=‘eza -1 --icons --group-directories-first’
#Plugins
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
if [ $TERM = “xterm-256color” ]; then
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=“fg=#404040”
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(bracketed-paste)
fi
#bracked paste-magic
if [ $TERM = “xterm-256color” ]; then
autoload -U url-quote-magic bracketed-paste-magic
zle -N self-insert url-quote-magic
zle -N bracketed-paste bracketed-paste-magic
fi
Now the fix, setup these two hooks:
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic
}
pastefinish() {
zle -N self-insert $OLD_SELF_INSERT
}
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
#gpg passwort
alias gen=‘< /dev/urandom tr -dc A-Za-z0-9_/ | head -c30; echo’
Passwort erzeugen. Aufruf: pw Länge_des_Passwortes
function pw() {
< /dev/urandom tr -dc A-Za-z0-9_/ | head -c$1; echo
}
#passwort mit pwgen
alias pw=‘pwgen -sy 32 6’
#eos-updater
alias upd=‘eos-update’
alias ua=‘eos-update --aur’
#meld pacdiff
alias diff=‘fd pacnew /etc’
#ytfzf mit thumbnauils
alias ytf=‘ytfzf -T chafa --show-thumbnails’
#Plasma Shell replace
alias shell=‘systemctl --user restart plasma-plasmashell.service’
#Letzte updates
alias last=‘paclog | grep upgraded | tail -n 200’
#history
alias list=‘history 0 | fzf’
#source /usr/share/zsh/plugins/zsh-sudo/sudo.plugin.zsh
#sudo with esc esc
sudo-command-line() {
[[ -z $BUFFER ]] && zle up-history
if [[ $BUFFER == sudo\ * ]]; then
LBUFFER=“${LBUFFER#sudo }”
elif [[ $BUFFER == $EDITOR\ * ]]; then
LBUFFER=“${LBUFFER#$EDITOR }”
LBUFFER=“sudoedit $LBUFFER”
elif [[ $BUFFER == sudoedit\ * ]]; then
LBUFFER=“${LBUFFER#sudoedit }”
LBUFFER=“$EDITOR $LBUFFER”
else
LBUFFER=“sudo $LBUFFER”
fi
}
zle -N sudo-command-line
bindkey “\e\e” sudo-command-line
bindkey -M vicmd ‘\e\e’ sudo-command-line
#History
export HISTFILE=~/.zsh_history
export HISTSIZE=10000
export SAVEHIST=10000
#fortune
fortune
#mcfly
eval “$(mcfly init zsh)”
export MCFLY_PROMPT=“❯”
#export MCFLY_KEY_SCHEME=vim
export MCFLY_FUZZY=2
export MCFLY_RESULTS=50
export MCFLY_INTERFACE_VIEW=BOTTOM
export MCFLY_RESULTS_SORT=LAST_RUN
#starship
eval “$(starship init zsh)”
`