Compare commits

...

2 commits

Author SHA1 Message Date
mwiegand
5fd9452a6c hhtop resets htop config 2022-06-01 14:01:28 +02:00
mwiegand
2a84822cfe zsh namspacing 2022-06-01 13:50:20 +02:00
2 changed files with 12 additions and 4 deletions

View file

@ -1,4 +1,4 @@
function spwd {
function zsh_spwd {
paths=(${(s:/:)PWD})
cur_path='/'
@ -21,7 +21,7 @@ function spwd {
echo
}
function root_color {
function zsh_root_color {
if test "$EUID" -eq 0
then
echo "%{$fg_bold[green]%}"
@ -30,11 +30,11 @@ function root_color {
fi
}
function exitcode_color {
function zsh_exitcode_color {
echo "%(?:%{$fg_bold[green]%}:%{$fg_bold[red]%})"
}
PROMPT='$(root_color)$(whoami)%{$reset_color%}@$(exitcode_color)$(hostname -s) %{$fg[cyan]%}$(spwd)%{$reset_color%} $(git_prompt_info)'
PROMPT='$(zsh_root_color)$(whoami)%{$reset_color%}@$(zsh_exitcode_color)$(hostname -s) %{$fg[cyan]%}$(zsh_spwd)%{$reset_color%} $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "

View file

@ -8,6 +8,14 @@
alias s='sudo su - root -s /usr/bin/zsh'
function hhtop {
# mkdir -p ~/.config/htop
# cp /etc/htoprc.global ~/.config/htop/htoprc
# cp /etc/htoprc.global ~/.htoprc
rm -rf ~/.config/htop ~/.htoprc
htop
}
ZSH_THEME=bw
DISABLE_AUTO_UPDATE=true
plugins=(