From 3aee19333c92d6650935066862af354f7b2f2b09 Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Sun, 11 Sep 2016 18:00:03 +0200 Subject: [PATCH] Add .profile Signed-off-by: Severin Kaderli --- .bash_profile | 12 ++++++++++-- .bashrc | 8 ++++---- .config/i3/config | 1 - .profile | 22 ++++++++++++++++++++++ 4 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 .profile diff --git a/.bash_profile b/.bash_profile index df06e13..ce28490 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,5 +1,13 @@ +# If .bash_profile exists, bash doesn't read .profile +if [[ -f $HOME/.profile ]]; then + . $HOME/.profile +fi + +# If the shell is interactive and .bashrc exists, get the aliases and functions +if [[ $- == *i* && -f $HOME/.bashrc ]]; then + . $HOME/.bashrc +fi + if [ "$(tty)" = "/dev/tty1" ]; then startx && exit fi - -source $HOME/.bashrc diff --git a/.bashrc b/.bashrc index 9fdf896..769ee67 100644 --- a/.bashrc +++ b/.bashrc @@ -3,10 +3,10 @@ # for examples # If not running interactively, don't do anything -case $- in - *i*) ;; - *) return;; -esac +#case $- in +# *i*) ;; +# *) return;; +#esac # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options diff --git a/.config/i3/config b/.config/i3/config index 4383d4a..f903b03 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -217,7 +217,6 @@ exec audacious # Assign programs to specific workspaces ### assign [class="google-chrome-beta"] $workspace1 -assign [class="Thunar"] $workspace4 assign [class="Gnome-terminal"] $workspace2 assign [class="Atom"] $workspace3 assign [class="Steam"] $workspace6 diff --git a/.profile b/.profile new file mode 100644 index 0000000..c9db459 --- /dev/null +++ b/.profile @@ -0,0 +1,22 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# if running bash +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi