-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bashrc
58 lines (46 loc) · 1.9 KB
/
.bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#
# Bash Interative Initialization
#
# This file is sourced when an interactive shell is started.
#
# NOT for login shells (Like logging on to a TTY)
# See https://superuser.com/questions/183870/difference-between-bashrc-and-bash-profile/183980#183980
# Set up powerline
#powerline-daemon -q
#POWERLINE_BASH_CONTINUATION=1
#POWERLINE_BASH_SELECT=1
# This uses the user's local python package index ($HOME/.local/lib/pythonX.Y/site-packages)
#source "$(python -c 'import site; print(site.getusersitepackages())')/powerline/bindings/bash/powerline.sh"
PS_BOLD=$(tput bold)
PS_NORM=$(tput sgr0)
export PS1="${PS_BOLD}\u@\H \W\$${PS_NORM} "
# If stdin is a terminal
if [ -t 0 ]; then
# Set GPG_TTY so gpg-agent knows where to prompt. See gpg-agent(1)
export GPG_TTY="$(tty)"
# Set PINENTRY_USER_DATA so pinentry-auto knows to present a text UI.
export PINENTRY_USER_DATA=USE_TTY=1
fi
alias whatsmyip='curl https://ipinfo.io/ip; echo'
alias ls='ls --color=auto'
alias ll='ls -l --color=auto'
alias top='htop'
# I can't find any filters for kissanime on the pihole, sooo....
alias anime='ssh pihole pihole disable'
alias vim='nvim'
# https://wiki.archlinux.org/title/TeX_Live#tlmgr
alias tlmgr='/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode'
# https://unix.stackexchange.com/questions/215124/remove-whitespace-from-all-items-in-a-directory-and-sub-directory
function antispaces() {
find $1 -name '* *' -exec bash -c 'mv "$0" "${0// /}"' {} \;
}
alias gksu='pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY'
# https://wiki.archlinux.org/title/Alacritty#%22user@host:cwd%22_in_window_title_bar
case ${TERM} in
xterm*|rxvt*|alacritty*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
screen*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
esac