summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc51
1 files changed, 21 insertions, 30 deletions
diff --git a/.bashrc b/.bashrc
index 3318cd5..ee507e8 100644
--- a/.bashrc
+++ b/.bashrc
@@ -1,14 +1,3 @@
-# /etc/skel/.bashrc
-#
-# This file is sourced by all *interactive* bash shells on startup,
-# including some apparently interactive shells such as scp and rcp
-# that can't tolerate any output. So make sure this doesn't display
-# anything or bad things will happen !
-
-
-# Test for an interactive shell. There is no need to set anything
-# past this point for scp and rcp, and it's important to refrain from
-# outputting anything in those cases.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
@@ -18,20 +7,31 @@ export LC_ALL=en_US.UTF-8
alias clr="echo -ne '\033c'"
alias mv="mv -i"
alias cp="cp -i"
-alias btd="bittorrent-curses --max_upload_rate 6 "
export history_control=ignoreboth
export command_oriented_history
export HISTIGNORE='&:[bf]g:exit:ls'
+
+export LESSCOLORIZER='pygmentize -O bg=dark,style=github-dark -f terminal16m'
+
shopt -s extglob
shopt -s cmdhist
shopt -s histappend
shopt -s no_empty_cmd_completion
+shopt -s checkwinsize
+
+eval "$(dircolors -b)"
-[ -f /etc/profile.d/xprint.sh ] && source /etc/profile.d/xprint.sh
+if ! shopt -oq posix; then
+ if [ -f /usr/share/bash-completion/bash_completion ]; then
+ . /usr/share/bash-completion/bash_completion
+ elif [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+ fi
+fi
function xtitle() {
case $TERM in
- xterm*|rxvt|Eterm|eterm)
+ xterm*|rxvt*|Eterm|eterm|alacritty)
echo -ne "\e]0;$1\007"
;;
screen)
@@ -40,21 +40,12 @@ function xtitle() {
esac
}
-function xreset() {
- case $TERM in
- xterm*|rxvt|Eterm|eterm)
- echo -ne '\ec'
- ;;
- esac
-}
-
-. ~/src/git-prompt/git-prompt.sh
+function starship_set_win_title() {
+ local cwd="${PWD/$HOME/\~}"
+ cwd="${cwd##[/~]*/}/"
-#export PS1="\
-#\[\033[1;37m\]\u@\h\
-#\[\033[0;37m\]:\w\n\
-#\[\033[1;34m\](\$?)\
-#\[\033[0;33m\][\j]\
-#\[\033[0;34m\]\$\
-#\[\033[0m\] "
+ xtitle "$USER@$(hostname):$cwd"
+}
+starship_precmd_user_func=starship_set_win_title
+eval "$(starship init bash)"