added send to device shell script.
[my-dotfiles.git] / bashrc
diff --git a/bashrc b/bashrc
index 64257a2..6eade8a 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -3,11 +3,6 @@ if [ -f /etc/profile.d/bash_completion.sh ]; then
  . /etc/profile.d/bash_completion.sh
 fi
 
-# sets buttons on wacom tablet
-if [ -f ~/.local/share/wacomsetter.sh ]; then
-       . ~/.local/share/wacomsetter.sh
-fi
-
 user_color=32m
 if [ ${UID} -eq 0 ]
 then
@@ -50,9 +45,10 @@ bash_prompt() {
     local UC=$EMG
     [ $UID -eq "0" ] && UC=$EMR
 
-    PS1="${UC}\u ${NONE}@ ${EMB}\h ${NONE}{ ${M}\d ${NONE}} ${W}${BGG}[ \w ]${NONE}\n\#$(__git_ps1) ${UC}\\$> ${NONE}"
+    PS1="${UC}\u ${NONE}@ ${EMB}\h ${NONE}{ ${M}\d ${NONE}} ${W}${BGY}${EMK}[ \w ]${NONE}\n\#$(__git_ps1) ${UC}\\$> ${NONE}"
 }
 export PROMPT_COMMAND=bash_prompt
+printf "\033]0;%s@%s\007" "${LOGNAME}" "${HOSTNAME%%.*}"
 
 # turns on git prompt
 if [ -f /home/danix/.git-prompt.sh ]; then
@@ -79,12 +75,11 @@ alias du="du -sh"
 alias diff='diff --color=auto'
 alias grep='grep --color=auto'
 alias path='(IFS=:;ls -1d $PATH |  nl)'
-alias hf='history|grep'
 
 # history as big as possible!!
 HISTSIZE=1000000
 HISTFILESIZE=2000000
-HISTIGNORE='hf *'
+HISTIGNORE='hf *'
 # unix.stackexchange.com/a/18443
 # history: erase duplicates...
 HISTCONTROL=ignoreboth:erasedups
@@ -92,19 +87,28 @@ shopt -s histappend
 
 
 
-export PATH=~/.platformio/penv/bin:~/.config/composer/vendor/bin:~/.local/bin:~/bin:$PATH
+#export PATH=~/.platformio/penv/bin:~/.config/composer/vendor/bin:~/.local/bin:~/bin:$PATH
+#export PATH=~/.config/composer/vendor/bin:~/.local/bin:~/bin:$PATH
 export INTEL_BATCH=1
 export QT_QPA_PLATFORMTHEME="lxqt"
 export QT_STYLE_OVERRIDE="kvantum-dark"
 export XDG_DATA_DIRS="/usr/local/share/:/usr/share/"
+export CM_LAUNCHER=rofi
 
 # Tailoring LESS
+# If any syntax highlighters are available, use them.
+# # pygmentize does more, but source-highlight is still good.
+if command -v pygmentize > /dev/null 2>&1; then
+    export LESSCOLOURIZER="pygmentize -f terminal"
+elif command -v source-highlight > /dev/null 2>&1; then
+    export LESSCOLOURIZER="source-highlight --failsafe --infer-lang -f esc --style-file=esc.style -i"
+fi
 alias more='less'
-export LESS='-R'
+export LESS=' -R'
 export LESSOPEN='|~/.lessfilter %s'
 export PAGER=less
 export SVN_EDITOR=vim
-export LESSCHARSET='latin1'
+export LESSCHARSET='utf-8'
 
 man() {
     LESS_TERMCAP_md=$'\e[01;31m' \
@@ -124,11 +128,12 @@ export PASSWORD_STORE_DIR=/home/danix/Programming/GIT/password_store/
 
 # logdate appends a date to a script output
 logdate() {
-       while IFS= read -r line; do
-               echo "$(date +"%F_%R.%S") $line"
-       done
+    while IFS= read -r line; do
+        echo "$(date +"%F_%R.%S") $line"
+    done
 }
 
+# start gpg-agent for ssh authentication as well as key management
 unset GPG_AGENT_INFO
 unset SSH_AGENT_PID
 if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
@@ -136,7 +141,7 @@ if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
 fi
 export GPG_TTY=$(tty)
 if [ -x "$(which gpg-connect-agent)" ]; then
-       gpg-connect-agent updatestartuptty /bye > /dev/null
+    gpg-connect-agent updatestartuptty /bye > /dev/null
 fi
 
 mount-fs () {