Use patched dejavu to get git and Python logo.
This commit is contained in:
parent
b0065b0d68
commit
7c18a26b6a
28
.bashrc
28
.bashrc
|
@ -46,8 +46,6 @@ USERNAME_HUE=$(( ($USERNAME_SUM + 2) % 6 + 31))
|
|||
HOSTNAME_COLOR=$'\E'"[$HOSTNAME_BOLD;${HOSTNAME_HUE}m"
|
||||
USERNAME_COLOR=$'\E'"[$USERNAME_BOLD;${USERNAME_HUE}m"
|
||||
|
||||
WHITE=$'\E[00m'
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
|
||||
|
||||
|
@ -72,6 +70,21 @@ do
|
|||
done
|
||||
|
||||
|
||||
python_ps1()
|
||||
{
|
||||
local pypath="$(which python 2>/dev/null)"
|
||||
if [[ -z "$pypath" ]] || [[ "$pypath" == "/usr/bin/python" ]]
|
||||
then
|
||||
return
|
||||
fi
|
||||
local relative="$(realpath --relative-to=$(pwd) -s "$pypath")"
|
||||
if [[ ${#relative} -lt ${#pypath} ]]
|
||||
then
|
||||
pypath="$relative"
|
||||
fi
|
||||
printf "$1" "${pypath%/bin/python}"
|
||||
}
|
||||
|
||||
if [[ "$TERM" != 'dumb' ]]
|
||||
then
|
||||
_TITLE="\[\e]0;\H \W\a\]"
|
||||
|
@ -79,7 +92,16 @@ else
|
|||
_TITLE=''
|
||||
fi
|
||||
_PREV_FAIL="\`PREV_FAIL=\$?; if [ \$PREV_FAIL != 0 ]; then echo \[\e[31m\]\$PREV_FAIL \[\e[0m\]; fi\`"
|
||||
PS1="$_TITLE$_PREV_FAIL\[$USERNAME_COLOR\]\u\[$WHITE\]@\[$HOSTNAME_COLOR\]\H\[$WHITE\]:\[\e[32m\]\w\[$WHITE\]"'$(__git_ps1 " (%s)")\n\$ '
|
||||
|
||||
if ! [[ -f ~/.fonts/dejavu/DejaVuSansMonoNerdFontCompleteMono.ttf ]]
|
||||
then
|
||||
mkdir -p ~/.fonts/dejavu/
|
||||
wget -qO ~/.fonts/dejavu/DejaVuSansMonoNerdFontCompleteMono.ttf https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DejaVuSansMono/Regular/complete/DejaVu%20Sans%20Mono%20Nerd%20Font%20Complete%20Mono.ttf
|
||||
fi
|
||||
|
||||
PS1="$_TITLE$_PREV_FAIL\[$USERNAME_COLOR\]\u\[\e[0m\]@\[$HOSTNAME_COLOR\]\H\[\e[0m\]:\[\e[32m\]\w\[\e[0m\]"'$(python_ps1 " \[\e[30;44m\e[38;5;11m\] %s \[\e[0m\]")$(__git_ps1 " \[\e[30;41m\e[97m\] %s \[\e[0m\]")\n\$ '
|
||||
|
||||
eval "$(direnv hook bash)"
|
||||
|
||||
jsonpp()
|
||||
{
|
||||
|
|
19
README.md
19
README.md
|
@ -73,16 +73,27 @@ apt install \
|
|||
## Packages I may need
|
||||
|
||||
```
|
||||
apt-get install firmware-iwlwifi
|
||||
apt-get install firmware-nonfree
|
||||
apt-get install tlp # Optimize Laptop Battery Life
|
||||
apt-get install opensc opensc-pkcs11 # For yubikey
|
||||
apt install firmware-iwlwifi
|
||||
apt install firmware-nonfree
|
||||
apt install tlp # Optimize Laptop Battery Life
|
||||
apt install opensc opensc-pkcs11 # For yubikey
|
||||
```
|
||||
|
||||
With:
|
||||
|
||||
echo'CPU_ENERGY_PERF_POLICY_ON_BAT=power > /etc/tlp.d/50-cpu.conf
|
||||
|
||||
|
||||
## Packages I don't want
|
||||
|
||||
```
|
||||
aptitude purge ttf-bitstream-vera
|
||||
```
|
||||
|
||||
see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=981577 or simply `echo $'e\xcc\x81a'`
|
||||
|
||||
|
||||
|
||||
# What I typically do on a new laptop
|
||||
|
||||
- Change grub sleep time in `/etc/default/grub` (and run `update-grub`)
|
||||
|
|
Loading…
Reference in New Issue