Merge branch 'master' of bitbucket.org:glenux/glenuxnet-desktop-playbook

This commit is contained in:
Glenn Y. Rolland 2015-12-15 09:33:47 +01:00
commit 94b1a0fe4d
28 changed files with 138 additions and 63 deletions

70
files/bash_aliases Normal file
View file

@ -0,0 +1,70 @@
### ALIASES SUDO
alias apt-get='sudo apt-get'
alias apt-cache='sudo apt-cache'
alias dpkg='sudo dpkg'
alias photo_dl='sudo gphoto2 --auto-detect -P'
alias gnux_dvd='sudo /home/warbrain/bin/gnux_dvd'
alias svnforget='svn st | egrep '\''^(\!|\?).*\.(cpp|cc|am|h|hh|hxx|tex|png)$'\'''
## ALIASES
alias atodo='todo -G'
alias tdg='todo -G'
alias be='bundle exec'
alias ls='ls --color=auto -F'
alias makepatch='LC_ALL=C TZ=UTC0 diff -Naur '
alias timidity='timidity -Oe'
alias synaptic='gksu synaptic'
alias sl='ls'
#alias cmake='colormake'
alias music123='esddsp music123'
alias xdu='du > ~/.tmp/du.out && xdu -n -c 7 ~/.tmp/du.out'
alias gnux_bgfiles='find -exec du -sh "{}" \; | egrep [0-9]M | sort -n | tail -n 11 | head -n 10'
alias fr='file-roller'
alias mp3blaster='esddsp mp3blaster'
alias ll='ls -lh'
alias llla='ls -la | less'
alias lsd="ls -F | egrep '\/$'"
alias speech='esddsp festival --tts'
alias gvimr='gvim --remote-tab'
alias grep='grep --color'
## SERVERS SSH
alias host_dptmaths='ssh -X -C ssh.dptmaths.ens-cachan.fr -l rolland'
alias host_shamox='ssh -X -c arcfour -C -p 22 shamox.ath.cx -l warbrain'
alias host_darby='ssh -X -c arcfour -C darby -l warbrain'
alias host_daka='ssh -X -c arcfour -C daka -l warbrain'
# pass 'noir'
alias tunnel_murlock='ssh -L8882:localhost:8888 bewan@murlock.hd.free.fr -N'
#alias diades='ssh -X -c arcfour -C diades.glenux.net -l warbrain'
#alias dungeon='ssh -X -c blowfish -C dungeon -l warbrain'
#alias djeke='ssh -X -c blowfish -C djeke -l warbrain'
#alias sword='ssh -X -c blowfish -C sword.ath.cx -l warbrain'
alias ykhoo='ssh -X -c blowfish -C ykhoo.ath.cx -l warbrain'
alias daneel='ssh -X -c blowfish -C daneel.glenux.net -l warbrain'
alias ef='LD_PRELOAD=libefence.so.0.0 '
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias divx='find /cdrom -name \*.[Aa][Vv][Ii] -o -name \*.[oO][Gg][Mm] -ok mplayer \-fs \-x 512 \-y 300 {} \;'
#alias ip='/sbin/ifconfig eth0 | grep adr | sed -e "s/^.*adr://" |sed -e "s/ Bcast.*//" '
alias rmplayer="mplayer -ao esd -nocache"
alias filter_video="egrep -i '\.(avi|mov|mpe?g|mkv|wmv|rm)$'"
alias filter_audio="egrep -i '\.(wav|flac|mp3|aac|m4a|ogg|wma)$'"
alias filter_image="egrep -i '\.(jpe?g|png|xcf(.gz)|eps|svg|gif)$'"
alias filter_imageart="egrep -i '\.(xcf(.gz)?|psd|ora|svg)$'"
alias filter_archive="egrep -i '\.(tar\.)?(gz|bz2|7z|tgz|zip|rar|ace|zoo|arj|lha)$'"
alias filter_document="egrep -i '\.(txt|pdf|ps|sxw|odt|doc|rtf)$'"
alias pwgen="pwgen -B 10 14"
alias http_serve="python -m SimpleHTTPServer 5001"
alias scp="BINARY_SSH=scp $HOME/bin/ssh"
alias rsync="BINARY_SSH=rsync $HOME/bin/ssh"
alias fuck='$(thefuck $(fc -ln -1))'
alias baloostatus='balooctl status 2>/dev/null |grep Indexed |awk -v p=200 "{print int(p * \$2/\$4)/p; }"'

9
files/bash_profile Normal file
View file

@ -0,0 +1,9 @@
##
## BASH PROFILE - Only for login shells
##
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

View file

@ -2,6 +2,12 @@
## BASH RC - every new shell
## 
## 01-29 environment changes (XX-bin-... and XX-env-)
## 40-69 development settings (XX-dev)
## 70-89 utilities and applications specific environment changes (XX-app-...)
## 90-99 shell customisation : colors, prompt, etc.
## 95-99 miscelanous or low priority : aliases and completion (XX-misc-)
if [ -d "$HOME/.bashrc.d" ]; then
for script in $(find "$HOME/.bashrc.d/" -name '*.sh' |sort -n) ; do
# echo "Loading `basename \"$script\"`..." # >&2

View file

@ -5,6 +5,7 @@
#
GNUSIDE_CLOUD_PATH="$HOME/Documents/_GnusideCloud"
if [[ -s "$GNUSIDE_CLOUD_PATH/bin" ]]; then
if [ -d "$GNUSIDE_CLOUD_PATH/bin" ]; then
export PATH="$GNUSIDE_CLOUD_PATH/bin:$PATH"
fi

View file

@ -1,3 +1,4 @@
export PATH
export ANDROID_HOME

View file

@ -0,0 +1,4 @@
# Disable ansible cowsay
export ANSIBLE_NOCOWS=1

View file

@ -0,0 +1,4 @@
# Help darcs on network mounts
export DARCS_SLOPPY_LOCKS=1

View file

@ -0,0 +1,10 @@
#!/bin/sh
# Pager detection
for pager in vim nano emacs ; do
if hash $pager 2> /dev/null ; then
export PAGER=$pager
break
fi
done

View file

@ -0,0 +1,8 @@
if hash gx-search-baloo >/dev/null 2>&1 ; then
function godir() {
dir=$(gx-search-baloo "$@")
cd "$dir"
}
fi

View file

@ -3,3 +3,7 @@
#export GREP_OPTIONS="--color"
#GREP_COLORS="ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36"
#export GREP_COLORS
# disable deprecated variable
export GREP_OPTIONS=

View file

@ -0,0 +1,4 @@
# This line was appended by KDE
# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES=$HOME/.gtkrc-2.0

View file

@ -0,0 +1,3 @@
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

View file

@ -0,0 +1,3 @@
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups

View file

@ -1,4 +1,3 @@
#!/bin/sh
##
# BASH COMPLETION
@ -6,3 +5,4 @@
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi

View file

@ -1,57 +0,0 @@
#source /etc/bash_completion
export EDITOR=vim
# disable deprecated variable
export GREP_OPTIONS=
# load sub-bashrc
## 01-10 environment changes (XX-environment-...)
## 11-20 applications specific environment changes (XX-application-...)
## 81-99 shell customisation (colors, prompt, etc.)
## 91-99 aliases and completion
export SHELL_ISLOGIN=${SHELL_ISLOGIN:-0}
#echo $SHELL_ISLOGIN
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
###
# DISPLAY & COLORS
#
export LS_COLORS="$LS_COLORS*.flac=01;35:"
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
#??? shopt -s checkwinsize
# This line was appended by KDE
# Make sure our customised gtkrc file is loaded.
# export GTK2_RC_FILES=$HOME/.gtkrc-2.0
##
# APPLICATION-SPECIFIC SETUP
#
# This line was appended by KDE
# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES=$HOME/.gtkrc-2.0
# Help darcs on network mounts
export DARCS_SLOPPY_LOCKS=1
# Disable ansible cowsay
export ANSIBLE_NOCOWS=1
function godir() {
dir=$(gx-search-baloo "$@")
cd "$dir"
}

View file

@ -4,11 +4,16 @@
register: bash_scripts
# tasks file for roles/glenux.bash
- name: Install bashrc
copy: src=bashrc dest=~/.bashrc
- name: Install main configuration files for bash
copy:
src={{item[1]}}
dest=~/.{{item[1]|basename}}
mode=0644
become: true
become_user: "{{item}}"
with_items: bash_users
become_user: "{{item[0]}}"
with_nested:
- bash_users
- ['bashrc', 'bash_profile', 'bash_aliases']
- name: Create bashrc.d directory
file: path=~/.bashrc.d state=directory