Some cleanup + ctrl/alt swap
This commit is contained in:
parent
fd7e872565
commit
ea3ec50467
3 changed files with 66 additions and 37 deletions
97
bashrc
97
bashrc
|
@ -1,14 +1,7 @@
|
|||
#####POUR PAS S'ECRIRE DESSUS
|
||||
shopt -s checkwinsize
|
||||
shopt -s checkwinsize #Pour pas s'écrire dessus
|
||||
shopt -s histappend
|
||||
PROMPT_COMMAND='history -a'
|
||||
|
||||
#set -o vi
|
||||
export EDITOR="vim"
|
||||
|
||||
GPG_TTY=`tty`
|
||||
export GPG_TTY
|
||||
export GPGKEY=6F36914A
|
||||
|
||||
#####ON DEFINIT LES COULEURS
|
||||
red='\033[31m'
|
||||
|
@ -20,22 +13,18 @@ CYAN='\033[36m'
|
|||
magenta='\033[35m'
|
||||
DFT='\033[0m'
|
||||
white='\033[37m'
|
||||
#####ON DEFINIT LE TITRE DE LA FENETRE PAR LE REP EN COURS
|
||||
|
||||
|
||||
#####ON DÉFINIT LE TITRE DE LA FENETRE PAR LE REP EN COURS
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
|
||||
;;
|
||||
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
#####ON MET LA COULEUR POUR ls
|
||||
if [ "$TERM" != "dumb" ]; then
|
||||
eval "`dircolors -b`"
|
||||
alias ls='ls --color=auto'
|
||||
fi
|
||||
|
||||
#####LA COULEUR DU SHELL
|
||||
#PS1="$RED\u$DFT$white@$magenta\h $DFT>>$CYAN\w $DFT"
|
||||
#PS1="\u@\h >>\w "
|
||||
|
@ -49,12 +38,17 @@ else
|
|||
MY_HOST_COL='[34m'
|
||||
fi
|
||||
|
||||
PS1='\[\e[0;36m\]\t \[\e[1;30m\][\[\e$MY_HOST_COL\]\u@\H\[\e[1;30m\]\[\e[0;32m\]\[\e[1;30m\]] \[\e[1;37m\]\w\[\e[0;37m\] \n$ '
|
||||
#PS1='\[\e[0;36m\]\t \[\e[1;30m\][\[\e$MY_HOST_COL\]\u@\H\[\e[1;30m\]\[\e[0;32m\]\[\e[1;30m\]] \[\e[1;37m\]\w\[\e[0;37m\] \n$ '
|
||||
source ~/.bash_ps1
|
||||
|
||||
#PS1='\[\e[0;36m\] \T \[\e[1;30m\][\[\e$MY_HOST_COL\]\u@\H\[\e[1;30m\]\[\e[0;32m\]\[\e[1;30m\]] \[\e[1;37m\]\w\[\e[0;37m\] \n$ '
|
||||
|
||||
|
||||
#####LES ALIAS UTILES
|
||||
|
||||
###############
|
||||
#### ALIAS ####
|
||||
###############
|
||||
# {{{
|
||||
alias ..='cd ..'
|
||||
alias vf='cd'
|
||||
alias xs='cd'
|
||||
|
@ -69,6 +63,10 @@ alias df='dfc'
|
|||
alias free='freec'
|
||||
alias shred='shred -n 35 -z -u -v -f'
|
||||
|
||||
if [ "$TERM" != "dumb" ]; then
|
||||
eval "`dircolors -b`"
|
||||
alias ls='ls --color=auto'
|
||||
fi
|
||||
alias sl='ls'
|
||||
alias la='ls -lah'
|
||||
|
||||
|
@ -121,28 +119,27 @@ alias ip6='ip -6'
|
|||
|
||||
alias disk-usage-analyser='baobab'
|
||||
|
||||
|
||||
export PYTHONPATH=/usr/local/lib/python2.7/dist-packages
|
||||
export CC=clang
|
||||
|
||||
|
||||
export DEVKITPRO=/opt/devkitpro
|
||||
export DEVKITARM=$DEVKITPRO/devkitARM
|
||||
export PATH=$PATH:$DEVKITARM/bin
|
||||
export MANPATH=$MANPATH:$DEVKITARM/man
|
||||
# }}}
|
||||
|
||||
|
||||
###############
|
||||
## FONCTIONS ##
|
||||
###############
|
||||
# {{{
|
||||
function cd()
|
||||
{
|
||||
# {{{
|
||||
if [ $# -eq 0 ]; then
|
||||
builtin cd ~ && ls
|
||||
else
|
||||
builtin cd "$*" && ls
|
||||
fi
|
||||
}
|
||||
#}}}
|
||||
|
||||
alias ssh='hh'
|
||||
function hh {
|
||||
function hh
|
||||
{ # {{{
|
||||
ssh-add -l | grep id_rsa.auth > /dev/null
|
||||
if [ $? -eq 1 ]; then
|
||||
echo -e "$RED Please enter ssh passphrase ;) $DFT"
|
||||
|
@ -150,18 +147,23 @@ function hh {
|
|||
fi;
|
||||
"/usr/bin/ssh" "$*"
|
||||
}
|
||||
# }}}
|
||||
|
||||
|
||||
function logs {
|
||||
function logs
|
||||
{ # {{{
|
||||
tail -f $1 | ccze -A
|
||||
}
|
||||
# }}}
|
||||
|
||||
function mkcd() {
|
||||
function mkcd()
|
||||
{ # {{{
|
||||
mkdir -p "$@"
|
||||
cd "$@"
|
||||
}
|
||||
# }}}
|
||||
|
||||
extract() {
|
||||
extract()
|
||||
{ # {{{
|
||||
local e=0 i c
|
||||
for i; do
|
||||
if [ -f $i && -r $i ]; then
|
||||
|
@ -189,9 +191,8 @@ extract() {
|
|||
done
|
||||
return $e
|
||||
}
|
||||
|
||||
#Launch startx when login
|
||||
[[ -z $DISPLAY && $XDG_VTNR -le 4 && -z $SSH_CLIENT ]] && exec startx
|
||||
# }}}
|
||||
# }}}
|
||||
|
||||
SSHAGENT=/usr/bin/ssh-agent
|
||||
SSHAGENTARGS="-s"
|
||||
|
@ -199,3 +200,25 @@ if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
|
|||
eval `$SSHAGENT $SSHAGENTARGS`
|
||||
trap "kill $SSH_AGENT_PID" 0
|
||||
fi
|
||||
|
||||
###############
|
||||
### EXPORTS ###
|
||||
###############
|
||||
# {{{
|
||||
export EDITOR="vim"
|
||||
|
||||
GPG_TTY=`tty`
|
||||
export GPG_TTY
|
||||
export GPGKEY=6F36914A
|
||||
|
||||
export PYTHONPATH=/usr/local/lib/python2.7/dist-packages
|
||||
export CC=clang
|
||||
|
||||
export DEVKITPRO=/opt/devkitpro
|
||||
export DEVKITARM=$DEVKITPRO/devkitARM
|
||||
export PATH=$PATH:$DEVKITARM/bin
|
||||
export MANPATH=$MANPATH:$DEVKITARM/man
|
||||
# }}}
|
||||
|
||||
#Launch startx when login
|
||||
[[ -z $DISPLAY && $XDG_VTNR -le 4 && -z $SSH_CLIENT ]] && exec startx
|
||||
|
|
|
@ -4,6 +4,7 @@ function deploy_for_desktop()
|
|||
{ # {{{
|
||||
cd ~
|
||||
ln -s $WAI/xinitrc ./.xinitrc
|
||||
ln -s $WAI/Xmodmap ./.Xmodmap
|
||||
ln -s $WAI/octaverc ./.octaverc
|
||||
ln -s $WAI/gitconfig ./.gitconfig
|
||||
|
||||
|
|
5
xinitrc
5
xinitrc
|
@ -25,6 +25,11 @@ wmname LG3D
|
|||
#Keyboard setup +compose key for "ŭ" (Win-b u) for esperanto
|
||||
setxkbmap -model pc104 -layout ch -variant fr -option compose:lwin
|
||||
|
||||
#My pinkie hurts :'(
|
||||
if [ -s ~/.Xmodmap ]; then
|
||||
xmodmap ~/.Xmodmap
|
||||
fi
|
||||
|
||||
while true; do
|
||||
$OCTOPUS refresh
|
||||
sleep 50
|
||||
|
|
Loading…
Reference in a new issue