first push of my config files
[my-dotfiles.git] / bashrc
CommitLineData
fdd76fc5 1export GIT_PS1_SHOWCOLORHINTS=true
2export GIT_PS1_SHOWUNTRACKEDFILES=true
3export GIT_PS1_SHOWDIRTYSTATE=true
4export GIT_PS1_SHOWSTASHSTATE=true
5
6# turns on bash autocompletion
7if [ -f /etc/profile.d/bash_completion.sh ]; then
8 . /etc/profile.d/bash_completion.sh
9fi
10
11# actual theme "MATERIAL DARK"
12#if [ "$TERM" = "linux" ]; then
13# echo -en "\e]P0303030"
14# echo -en "\e]P1d32f2f"
15# echo -en "\e]P2388e3c"
16# echo -en "\e]P3f57c00"
17# echo -en "\e]P4303f9f"
18# echo -en "\e]P5c51162"
19# echo -en "\e]P61976d2"
20# echo -en "\e]P7bdbdbd"
21# echo -en "\e]P8424242"
22# echo -en "\e]P9e57373"
23# echo -en "\e]PA81c784"
24# echo -en "\e]PBffb74d"
25# echo -en "\e]PC7986cb"
26# echo -en "\e]PDff4081"
27# echo -en "\e]PE64b5f6"
28# echo -en "\e]PFf5f5f5"
29# clear
30#fi
31
32user_color=32m
33if [ ${UID} -eq 0 ]
34then
35 user_color=31m
36fi
37
38PS1='[\[\e[$user_color\]\u\[\e[37m\]@\[\e[34m\]\h \[\e[37m\]- \w] \d \t\n$(__git_ps1)\\$ '
39
40case "$TERM" in
41 xterm*|*rxvt*)
42 PROMPT_COMMAND='echo -ne "\033]0;${USER}@`echo $HOSTNAME|cut -d"." -f1`: ${PWD}\007"'
43 ;;
44 *)
45 PROMPT_COMMAND=""
46 ;;
47esac
48
49alias su="su -"
50alias ls="ls --color -lh"
51alias cp="cp -v"
52alias rm="rm -v"
53alias mv="mv -v"
54alias chmod="chmod -v"
55alias chown="chown -v"
56alias apropos="wtf is"
57alias free="free -m"
58alias df="df -h"
59alias du="du -sh"
60alias diff='diff --color=auto'
61alias grep='grep --color=auto'
62
63
64export PATH=~/.local/bin:~/bin:$PATH
65export INTEL_BATCH=1
66export QT_QPA_PLATFORMTHEME="lxqt"
67export QT_STYLE_OVERRIDE="kvantum-dark"
68export XDG_DATA_DIRS="/usr/local/share/:/usr/share/"
69
70# Tailoring LESS
71alias more='less'
72export LESS='-R'
73export LESSOPEN='|~/.lessfilter %s'
74export PAGER=less
75export SVN_EDITOR=vim
76export LESSCHARSET='latin1'
77
78man() {
79 LESS_TERMCAP_md=$'\e[01;31m' \
80 LESS_TERMCAP_me=$'\e[0m' \
81 LESS_TERMCAP_se=$'\e[0m' \
82 LESS_TERMCAP_so=$'\e[01;44;33m' \
83 LESS_TERMCAP_ue=$'\e[0m' \
84 LESS_TERMCAP_us=$'\e[01;32m' \
85 command man "$@"
86}
87
88# sudo password helper
89export SUDO_ASKPASS=/usr/bin/lxsudo
90
91# logdate appends a date to a script output
92logdate() {
93 while IFS= read -r line; do
94 echo "$(date +"%F_%R.%S") $line"
95 done
96}
97
98unset GPG_AGENT_INFO
99unset SSH_AGENT_PID
100if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
101 export SSH_AUTH_SOCK="${HOME}/.gnupg/S.gpg-agent.ssh"
102fi
103GPG_TTY=$(tty)
104export GPG_TTY
105if [ -x "$(which gpg-connect-agent)" ]; then
106 gpg-connect-agent updatestartuptty /bye >& /dev/null
107fi
108