summaryrefslogtreecommitdiffstats
path: root/roles/common/files/bashrc
diff options
context:
space:
mode:
authorMatthieu Saulnier <fantom@fedoraproject.org>2014-05-19 05:04:32 +0200
committerMatthieu Saulnier <fantom@fedoraproject.org>2014-05-19 05:04:32 +0200
commit9487577f083513c740cd8c8da40bc34d56e71254 (patch)
treeb89ccbddb48bb203e7467a3e229bc5d84ccd5467 /roles/common/files/bashrc
parent97761df44dfd32d86b489275785559dc3393d4ef (diff)
downloadplaybooks-ansible-9487577f083513c740cd8c8da40bc34d56e71254.tar.gz
playbooks-ansible-9487577f083513c740cd8c8da40bc34d56e71254.tar.xz
playbooks-ansible-9487577f083513c740cd8c8da40bc34d56e71254.zip
Create common role
Diffstat (limited to 'roles/common/files/bashrc')
-rw-r--r--roles/common/files/bashrc52
1 files changed, 52 insertions, 0 deletions
diff --git a/roles/common/files/bashrc b/roles/common/files/bashrc
new file mode 100644
index 0000000..1a1ae1e
--- /dev/null
+++ b/roles/common/files/bashrc
@@ -0,0 +1,52 @@
+# .bashrc
+
+# User specific aliases and functions
+
+alias rm='rm -i'
+alias cp='cp -i'
+alias mv='mv -i'
+alias pop='popd'
+alias up='popd'
+alias myip='wget http://checkip.dyndns.org/ -O - -o /dev/null | awk "{ print \$6 }" | cut -d\< -f1'
+alias f='find . -name'
+alias beep='echo -e "\a"'
+alias screenoff='xset dpms force off'
+alias ltx='tmux ls'
+alias atx='tmux attach -t'
+
+# Source global definitions
+if [ -f /etc/bashrc ]; then
+ . /etc/bashrc
+fi
+
+# Define personal variables
+if [ -f $HOME/bin/setvars ]; then
+ . $HOME/bin/setvars
+fi
+
+# Print fedora linux logo in interactive shell
+if [ -n "$PS1" ]; then
+ if which linux_logo >/dev/null 2>&1; then
+ linux_logo -L 12 -F "Bienvenue sur l'hôte #H\n#V, Compilé #C \n#P #X #T, #R, #U"
+ fi
+fi
+
+HISTSIZE=1500
+HISTIGNORE="history:exit:logout:[ ]*"
+
+RESET='\[$(tput sgr0)\]'
+BOLD='\[$(tput bold)\]'
+ULINE='\[$(tput smul)\]'
+
+BLUE='\[$(tput setaf 4)\]'
+GREEN='\[$(tput setaf 2)\]'
+RED='\[$(tput setaf 1)\]'
+YELLOW='\[$(tput setaf 3)\]'
+CYAN='\[$(tput setaf 6)\]'
+
+if [ $UID -eq 0 ]; then
+ PS1="$BOLD$RED\h$BLUE:$YELLOW\w$RED\\$ $RESET$RED"
+else
+ PS1="$BOLD$GREEN\u$BLUE@$YELLOW\h$BLUE:\w$GREEN\\$ $RESET$GREEN"
+fi
+PS2='suite-> '