]> git.zndr.dk Git - dotfiles.git/commitdiff
Cleanup bash
authorJannik ZANDER <jannikz@gmail.com>
Sat, 30 Jun 2018 07:32:55 +0000 (09:32 +0200)
committerJannik ZANDER <jannikz@gmail.com>
Sat, 30 Jun 2018 07:33:17 +0000 (09:33 +0200)
.bash_profile [new file with mode: 0644]
.bashrc
.config/bash/environ [deleted file]
.config/mimeapps.list
.profile

diff --git a/.bash_profile b/.bash_profile
new file mode 100644 (file)
index 0000000..aa90e65
--- /dev/null
@@ -0,0 +1,4 @@
+# .bash_profile is for making sure that both the things in .profile and .bashrc are loaded for login shell.
+
+[ -f "${HOME}/.profile" ] && . "${HOME}/.profile"
+[ -f "${HOME}/.bashrc" ] && . "${HOME}/.bashrc"
diff --git a/.bashrc b/.bashrc
index ad4cbcfade4c8c18fcea66f7abf3ab4017bc585c..f25a908bb9c720c911bb202d39e1230c720266c6 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -1,12 +1,32 @@
-# User dependent .bashrc file
+# .bashrc is for configuring the interactive Bash usage, like Bash aliases, setting favorite editor, setting Bash prompt, etc.
 
 # If not running interactively, don't do anything
 [[ -z "$PS1" ]] && return
 
-# Load settings
+# Set prompt
+export PS1="\\w\$(__git_ps1 '(%s)') \$ "
+
+# Set favorites
+export SHELL='bash'
+export EDITOR='vim'
+export VISUAL='vim'
+export PAGER='less -eFRX'
+export MANPAGER="less -eFRX"
+export BROWSER='lynx -vikeys -use_mouse'
+
+# Larger bash history
+export HISTFILESIZE=10000;
+export HISTSIZE=5000;
+export HISTCONTROL=ignoreboth:erasedups
+export HISTIGNORE="ll:ls:cd:cd -:pwd:exit:date:* --help";
+
+# Whenever displaying the prompt, write the previous line to disk
+export PROMPT_COMMAND="history -a;"
+
+# Load aliases, functions, etc
 for file in ${HOME}/.config/bash/*; do
     [ -f "$file" ] && . "$file";
 done;
 
-# last line
+# last line for local things
 [ -f ~/.bashrc_local ] && . ~/.bashrc_local
diff --git a/.config/bash/environ b/.config/bash/environ
deleted file mode 100644 (file)
index 7c21b81..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# set PATH so it includes user's private bin if it exists
-if [ -d "$HOME/bin" ] ; then
-    PATH="$HOME/bin:$PATH"
-fi
-
-# Set prompt 
-if [ -f /etc/profile.d/git-prompt.sh ]; then
-  . /etc/profile.d/git-prompt.sh
-fi
-
-# colored GCC warnings and errors
-export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
-
-# Larger bash history
-export HISTFILESIZE=10000;
-export HISTSIZE=5000;
-export HISTCONTROL=ignoreboth:erasedups
-export HISTIGNORE="ll:ls:cd:cd -:pwd:exit:date:* --help";
-
-# Whenever displaying the prompt, write the previous line to disk
-export PROMPT_COMMAND="history -a;"
-
-# Set defaults
-export SHELL='bash'
-export EDITOR='vim'
-export VISUAL='vim'
-export PAGER='less -eFRX'
-export MANPAGER="less -eFRX"
-export BROWSER='lynx -vikeys -use_mouse'
-
-
-# Prefer US language with SI units (Danish)
-export LANG="en_DK.UTF-8"
-export LANGUAGE="en_US.UTF-8"
-KEYMAP=us
-
-# Highlight section titles in manual pages
-export LESS_TERMCAP_md="${yellow}";
-
-# Always enable colored `grep` output
-#export GREP_OPTIONS="--color=auto";
-
-# Set up syntax highlighting for 'less' (requires source-highlight package)
-# See http://www.gnu.org/software/src-highlite/source-highlight.html
-# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
-export LESS=-eFRX
-#export JAVA_HOME='/usr/lib/jvm/java-8-openjdk-amd64'
-export GRADLE_USER_HOME=$HOME/.cache/gradle
-#export GTEST_DIR='c:/googletest-release-1.7.0'
-#export GTEST_DIR='c:/googletest-release-1.8.0'
-#export CPPUNITDIR='c:/cppunit-1.12.1'
-#export CPPUNITDIR='c:/cppunit-1.13.2'
-export CPPUNITDIR_2013='c:/programs/cppunit_2013'
-export RTEGENERATEVSCODE=1
-
-export VIRTUALENVWRAPPER_PYTHON=/mingw64/bin/python3
-
-# Set XDG directories
-if [ -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs ]; then
-  . ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
-  export XDG_DESKTOP_DIR XDG_DOWNLOAD_DIR XDG_TEMPLATES_DIR XDG_PUBLICSHARE_DIR XDG_DOCUMENTS_DIR XDG_MUSIC_DIR XDG_PICTURES_DIR XDG_VIDEOS_DIR
-fi
-#export XDG_CONFIG_HOME = $HOME/.config/
-#export XDG_DATA_HOME   = $HOME/.local/share/
-#export XDG_DATA_DIRS   = /usr/local/share/:/usr/share/
-export QT_STYLE_OVERRIDE=adwaita-dark
-
-export USERNAME=$LOGNAME
-export HOSTNAME=`hostname`
-echo Welcome $USERNAME. You are on Server: $HOSTNAME !!!
-
-
index 734055cc6519791bf35c6373a7121ecc638e8252..5f6fdc13681c413f2bd71609401449b0c649c6ca 100644 (file)
@@ -1,10 +1,10 @@
 [Default Applications]
 text/plain=vim.desktop
-text/html=firefox.desktop
-x-scheme-handler/http=firefox.desktop
-x-scheme-handler/https=firefox.desktop
-x-scheme-handler/about=google-chrome.desktop
-x-scheme-handler/unknown=google-chrome.desktop
+text/html=brave.desktop
+x-scheme-handler/http=brave.desktop
+x-scheme-handler/https=brave.desktop
+x-scheme-handler/about=brave.desktop
+x-scheme-handler/unknown=brave.desktop
 video/x-ogm+ogg=vlc.desktop
 video/ogg=vlc.desktop
 video/x-ogm=vlc.desktop
@@ -242,12 +242,4 @@ audio/x-xm=vlc.desktop;
 application/x-mimearchive=gvim.desktop;
 x-scheme-handler/http=firefox.desktop;
 x-scheme-handler/https=firefox.desktop;
-x-scheme-handler/ftp=firefox.desktop;
-x-scheme-handler/chrome=firefox.desktop;
 text/html=firefox.desktop;
-application/x-extension-htm=firefox.desktop;
-application/x-extension-html=firefox.desktop;
-application/x-extension-shtml=firefox.desktop;
-application/xhtml+xml=firefox.desktop;
-application/x-extension-xhtml=firefox.desktop;
-application/x-extension-xht=firefox.desktop;
index ed0fa38adc1ee6c9189d4a1e86d9c7657022420b..b7ddc9abd860598bfd48a4928ee197871a17ed92 100644 (file)
--- a/.profile
+++ b/.profile
@@ -1,12 +1,56 @@
-# User dependent .profile file
+# .profile is for things not specifically related to Bash, like environment variables PATH and others, and should be available anytime.
+
+# set PATH so it includes user's private bin if it exists
+if [ -d "$HOME/bin" ] ; then
+    PATH="$HOME/bin:$PATH"
+fi
+
+# colored GCC warnings and errors
+export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
+
+# Highlight section titles in manual pages
+export LESS_TERMCAP_md="${yellow}";
+
+# Always enable colored `grep` output
+#export GREP_OPTIONS="--color=auto";
+
+# Set up syntax highlighting for 'less' (requires source-highlight package)
+# See http://www.gnu.org/software/src-highlite/source-highlight.html
+# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
+export LESS=-eFRX
 
-# This file is not read by bash(1) if ~/.bash_profile or ~/.bash_login
-# exists.
 
-# the default umask is set in /etc/profile;
-umask 022
 
-# if running bash
-if [ -n "${BASH_VERSION}" ]; then
-  [ -f "${HOME}/.bashrc" ] && . "${HOME}/.bashrc"
+# Prefer US language with SI units (Danish)
+export LANG="en_DK.UTF-8"
+export LANGUAGE="en_US.UTF-8"
+export KEYMAP=us
+
+# Set XDG directories
+if [ -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs ]; then
+  . ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
+  export XDG_DESKTOP_DIR XDG_DOWNLOAD_DIR XDG_TEMPLATES_DIR XDG_PUBLICSHARE_DIR XDG_DOCUMENTS_DIR XDG_MUSIC_DIR XDG_PICTURES_DIR XDG_VIDEOS_DIR
 fi
+#export XDG_CONFIG_HOME = $HOME/.config/
+#export XDG_DATA_HOME   = $HOME/.local/share/
+#export XDG_DATA_DIRS   = /usr/local/share/:/usr/share/
+export QT_STYLE_OVERRIDE=adwaita-dark
+
+export USERNAME=$LOGNAME
+export HOSTNAME=`hostname`
+echo Welcome $USERNAME. You are on Server: $HOSTNAME !!!
+
+################################# DEBIAN LOCAL SETTINGS ##### TO BE MOVED ####
+
+#export JAVA_HOME='/usr/lib/jvm/java-8-openjdk-amd64'
+
+################################# WINDOWS LOCAL SETTINGS ##### TO BE MOVED ####
+export VIRTUALENVWRAPPER_PYTHON=/mingw64/bin/python3
+export GRADLE_USER_HOME=$HOME/.cache/gradle
+#export GTEST_DIR='c:/googletest-release-1.7.0'
+#export GTEST_DIR='c:/googletest-release-1.8.0'
+#export CPPUNITDIR='c:/cppunit-1.12.1'
+#export CPPUNITDIR='c:/cppunit-1.13.2'
+export CPPUNITDIR_2013='c:/programs/cppunit_2013'
+export RTEGENERATEVSCODE=1
+