diff --git a/modules/shell/files/.zshrc b/modules/shell/files/.zshrc index b8eeafa..afacda5 100644 --- a/modules/shell/files/.zshrc +++ b/modules/shell/files/.zshrc @@ -20,11 +20,6 @@ source $ZSH/oh-my-zsh.sh autoload -U compinit && compinit -# You may need to manually set your language environment -export LANG=en_GB.UTF-8 - -# Compilation flags -export ARCHFLAGS="-arch x86_64" autoload -Uz colors && colors local ret_status="%(?:%{$fg_bold[green]%}λ :%{$fg_bold[red]%}λ )" diff --git a/modules/shell/files/applications.sh b/modules/shell/files/applications.sh index c6dab2e..c017954 100644 --- a/modules/shell/files/applications.sh +++ b/modules/shell/files/applications.sh @@ -50,5 +50,3 @@ alias sc="screenshot --to img" recreatedb() { dropdb $1 && createdb $1 } - -# colored GCC warnings and errors diff --git a/modules/shell/files/base.sh b/modules/shell/files/base.sh index eafb4a4..c357982 100644 --- a/modules/shell/files/base.sh +++ b/modules/shell/files/base.sh @@ -5,15 +5,6 @@ case $- in esac -# Extend path -export PATH=${PATH}:${ANDROID_HOME}/tools -export PATH=${PATH}:${ANDROID_HOME}/platform-tools -export PATH=${PATH}:/opt/genymobile/genymotion -export PATH=${PATH}:${HOME}/.bin - -export DOTFILES=~/.dotfiles - - # bash aliases alias refresh="cd $PWD > /dev/null" alias c="clear" @@ -31,4 +22,3 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" # don't put duplicate lines or lines starting with space in the history. -HISTCONTROL=ignoreboth diff --git a/modules/shell/files/environment.sh b/modules/shell/files/environment.sh index 2d4568b..c40c8b5 100644 --- a/modules/shell/files/environment.sh +++ b/modules/shell/files/environment.sh @@ -1,6 +1,14 @@ -# Export some variables -ANDROID_HOME=/opt/android-sdk -EDITOR=/bin/nano -TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S' -QT_QPA_PLATFORMTHEME=gtk2 -GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# Extend path +export PATH=${PATH}:${ANDROID_HOME}/tools +export PATH=${PATH}:${ANDROID_HOME}/platform-tools +export PATH=${PATH}:/opt/genymobile/genymotion +export PATH=${PATH}:${HOME}/.bin + +export DOTFILES=${HOME}/.dotfiles + +export EDITOR=$(which nano) +export BROWSER=$(which firefox) + +export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S' +export HISTCONTROL=ignoreboth diff --git a/modules/shell/files/global-environment b/modules/shell/files/global-environment new file mode 100644 index 0000000..6be1310 --- /dev/null +++ b/modules/shell/files/global-environment @@ -0,0 +1,9 @@ +ANDROID_HOME=/opt/android-sdk +QT_QPA_PLATFORMTHEME=gtk2 +GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# You may need to manually set your language environment +LANG=en_GB.UTF-8 + +# Compilation flags +ARCHFLAGS="-arch x86_64" diff --git a/modules/shell/manifests/init.pp b/modules/shell/manifests/init.pp index e713ec6..c27ae94 100644 --- a/modules/shell/manifests/init.pp +++ b/modules/shell/manifests/init.pp @@ -6,7 +6,8 @@ class shell { 'puppet:///modules/shell/base.sh', 'puppet:///modules/shell/applications.sh', 'puppet:///modules/shell/catfish.sh', - 'puppet:///modules/shell/javascript.sh' + 'puppet:///modules/shell/javascript.sh', + 'puppet:///modules/shell/environment.sh' ]; concat {'zshrc': @@ -52,7 +53,7 @@ class shell { mode => '0644', owner => 'root', group => 'root', - source => 'puppet:///modules/shell/environment.sh', + source => 'puppet:///modules/shell/global-environment', path => '/etc/environment' } }