Browse Source

bash prompt

master
Juni Kim 3 years ago
parent
commit
e0e163d721
  1. 2
      config.scm
  2. 18
      guix/.bashrc

2
config.scm

@ -27,7 +27,7 @@
"git" "ncurses" "xrandr" "stow" "curl" "git" "ncurses" "xrandr" "stow" "curl"
"nss-certs" "icecat" "neovim" "kitty" "nss-certs" "icecat" "neovim" "kitty"
"i3-gaps" "i3status" "dmenu" "neofetch" "pfetch" "i3-gaps" "i3status" "dmenu" "neofetch" "pfetch"
"nfs-utils" "scrot"
"nfs-utils" "scrot" "xclip"
)) ))
%base-packages)) %base-packages))
(services (services

18
guix/.bashrc

@ -46,10 +46,26 @@ timeout 5s pfetch
export TERM=alacritty export TERM=alacritty
export VISUAL=nvim export VISUAL=nvim
export PS1="\[\e[33;1m\][\u@\h] \W$ \[\e[0m\]"
NORMAL="\[\e[0m\]"
RED="\[\e[31;1m\]"
GREEN="\[\e[32;1m\]"
YELLOW="\[\e[33;1m\]"
BLUE="\[\e[34;1m\]"
PURPLE="\[\e[35m\]"
NEWLINE="\n"
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
resetcursor() { resetcursor() {
printf '\033]50;CursorShape=1\x7' printf '\033]50;CursorShape=1\x7'
} }
init_ps1() {
PS1="$RED[$YELLOW\u$GREEN@$BLUE\h $PURPLE\W$GREEN`parse_git_branch` $RED]$YELLOW\$$NORMAL "
export PS1="$(resetcursor)$PS1" export PS1="$(resetcursor)$PS1"
}
export PROMPT_COMMAND=init_ps1
Loading…
Cancel
Save