1 # turns on bash autocompletion
2 if [ -f /etc/profile.d/bash_completion.sh ]; then
3 . /etc/profile.d/bash_completion.sh
13 local NONE="\[\033[0m\]" # unsets color to term's fg color
16 local K="\[\033[0;30m\]" # black
17 local R="\[\033[0;31m\]" # red
18 local G="\[\033[0;32m\]" # green
19 local Y="\[\033[0;33m\]" # yellow
20 local B="\[\033[0;34m\]" # blue
21 local M="\[\033[0;35m\]" # magenta
22 local C="\[\033[0;36m\]" # cyan
23 local W="\[\033[0;37m\]" # white
25 # emphasized (bolded) colors
26 local EMK="\[\033[1;30m\]"
27 local EMR="\[\033[1;31m\]"
28 local EMG="\[\033[1;32m\]"
29 local EMY="\[\033[1;33m\]"
30 local EMB="\[\033[1;34m\]"
31 local EMM="\[\033[1;35m\]"
32 local EMC="\[\033[1;36m\]"
33 local EMW="\[\033[1;37m\]"
36 local BGK="\[\033[40m\]"
37 local BGR="\[\033[41m\]"
38 local BGG="\[\033[42m\]"
39 local BGY="\[\033[43m\]"
40 local BGB="\[\033[44m\]"
41 local BGM="\[\033[45m\]"
42 local BGC="\[\033[46m\]"
43 local BGW="\[\033[47m\]"
46 [ $UID -eq "0" ] && UC=$EMR
48 PS1="${UC}\u ${NONE}@ ${EMB}\h ${NONE}{ ${M}\d ${NONE}} ${W}${BGY}${EMK}[ \w ]${NONE}\n\#$(__git_ps1) ${UC}\\$> ${NONE}"
50 export PROMPT_COMMAND=bash_prompt
51 printf "\033]0;%s@%s\007" "${LOGNAME}" "${HOSTNAME%%.*}"
54 if [ -f /home/danix/.git-prompt.sh ]; then
55 GIT_PS1_SHOWDIRTYSTATE=true
56 GIT_PS1_SHOWSTASHSTATE=true
57 GIT_PS1_SHOWUNTRACKEDFILES=true
58 GIT_PS1_SHOWUPSTREAM="auto"
59 GIT_PS1_HIDE_IF_PWD_IGNORED=true
60 GIT_PS1_SHOWCOLORHINTS=true
61 . /home/danix/.git-prompt.sh
65 alias ls="ls --color -lh"
69 alias chmod="chmod -v"
70 alias chown="chown -v"
71 alias apropos="wtf is"
75 alias diff='diff --color=auto'
76 alias grep='grep --color=auto'
77 alias path='(IFS=:;ls -1d $PATH | nl)'
78 alias hf='history|grep'
80 # history as big as possible!!
84 # unix.stackexchange.com/a/18443
85 # history: erase duplicates...
86 HISTCONTROL=ignoreboth:erasedups
91 #export PATH=~/.platformio/penv/bin:~/.config/composer/vendor/bin:~/.local/bin:~/bin:$PATH
92 export PATH=~/.config/composer/vendor/bin:~/.local/bin:~/bin:$PATH
94 export QT_QPA_PLATFORMTHEME="lxqt"
95 export QT_STYLE_OVERRIDE="kvantum-dark"
96 export XDG_DATA_DIRS="/usr/local/share/:/usr/share/"
101 export LESSOPEN='|~/.lessfilter %s'
103 export SVN_EDITOR=vim
104 export LESSCHARSET='latin1'
107 LESS_TERMCAP_md=$'\e[01;31m' \
108 LESS_TERMCAP_me=$'\e[0m' \
109 LESS_TERMCAP_se=$'\e[0m' \
110 LESS_TERMCAP_so=$'\e[01;44;33m' \
111 LESS_TERMCAP_ue=$'\e[0m' \
112 LESS_TERMCAP_us=$'\e[01;32m' \
116 # sudo password helper
117 export SUDO_ASKPASS=/usr/bin/lxsudo
119 # password store directory
120 export PASSWORD_STORE_DIR=/home/danix/Programming/GIT/password_store/
122 # logdate appends a date to a script output
124 while IFS= read -r line; do
125 echo "$(date +"%F_%R.%S") $line"
131 if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
132 export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
134 export GPG_TTY=$(tty)
135 if [ -x "$(which gpg-connect-agent)" ]; then
136 gpg-connect-agent updatestartuptty /bye > /dev/null
140 ( echo Filesystem Mountpoint Fstype;
141 mount | \grep -E '^[^[:lower:]_-]+' | awk '{print $1,$3,$5}'