diff --git a/etc/bash.bashrc b/etc/bash.bashrc index 95d83b4..0debb14 100644 --- a/etc/bash.bashrc +++ b/etc/bash.bashrc @@ -25,6 +25,10 @@ function __miaou_prompt_command { PS1='' IFS=' ' + if [[ -v HOST_TYPE && -v HOST_LOCATION ]]; then + PS1+="\[\e[44;30m\]${HOST_TYPE}://${HOST_LOCATION}\[\e[49;34m\]${R} " + fi + if [[ "$UID" -eq 0 ]]; then PS1+="$Yel\u$R" PROMPT='$' @@ -95,20 +99,18 @@ function __miaou_prompt_command { # If not running interactively, don't do anything [[ $- != *i* ]] && return +# TODO: use /etc/environment for MIAOU_BASH_DIR and leave /etc/profile to reset PROMPT_AFTER after tilix/cve if [[ ! -v MIAOU_BASH_DIR ]]; then source /etc/profile.d/zz-miaou-bash.sh else PROMPT_COMMAND=__miaou_prompt_command fi +export BLOCK_SIZE=si HOSTNAME=$(hostname -f) HISTCONTROL=ignoreboth HISTSIZE=10000 HISTFILESIZE=20000 -BLOCK_SIZE=si -export BLOCK_SIZE - -export BLOCK_SIZE=si # append to the history file, don't overwrite it shopt -s histappend diff --git a/etc/profile.d/zz-miaou-bash.sh b/etc/profile.d/zz-miaou-bash.sh index f4fa742..17b9bd8 100644 --- a/etc/profile.d/zz-miaou-bash.sh +++ b/etc/profile.d/zz-miaou-bash.sh @@ -1,4 +1,3 @@ +# zz-miaou-bash.sh will be the last one to be executed, so it overrides all PROMPT_COMMAND=__miaou_prompt_command -MIAOU_BASH_DIR=/opt/miaou-bash - -export MIAOU_BASH_DIR +export MIAOU_BASH_DIR=/opt/miaou-bash diff --git a/etc/vim/vimrc.rookie b/etc/vim/vimrc.rookie index 7992337..33d5035 100644 --- a/etc/vim/vimrc.rookie +++ b/etc/vim/vimrc.rookie @@ -82,17 +82,19 @@ nnoremap g- nnoremap g+ nnoremap :earlier 1f -" Terminal -tnoremap " means imap nmap -tnoremap " Ghostty <=> ÿ means nmap ÿ imap ÿ -tnoremap ÿ +" Terminal keybindings for vim 8.1+ +if exists(':tmap') + tnoremap + tnoremap + tnoremap ÿ +endif