This commit is contained in:
Xavier Logerais (Numericable - Ingénierie Système) 2014-05-21 11:28:03 +02:00
commit e97192ab3f
4 changed files with 42 additions and 24 deletions

2
bashrc
View File

@ -26,6 +26,8 @@ if [ -d $HOME/.bash/aliases.d ]; then for file in $(ls $HOME/.bash/aliases.d/*);
# Source bash completion definitions # Source bash completion definitions
[[ -f /etc/bash-completion ]] && source /etc/bash-completion [[ -f /etc/bash-completion ]] && source /etc/bash-completion
[[ -f /etc/profile.d/bash-completion ]] && source /etc/profile.d/bash-completion [[ -f /etc/profile.d/bash-completion ]] && source /etc/profile.d/bash-completion
[[ -f /etc/profile.d/bash-completion.sh ]] && source /etc/profile.d/bash-completion.sh
if [ -f $HOME/.bash_completion ]; then source $HOME/.bash_completion; fi if [ -f $HOME/.bash_completion ]; then source $HOME/.bash_completion; fi
if [ -f $HOME/.bash/completion ]; then source $HOME/.bash/completion; fi if [ -f $HOME/.bash/completion ]; then source $HOME/.bash/completion; fi
if [ -d $HOME/.bash/completion ]; then for file in $(ls $HOME/.bash/completion/*); do source $file; done; fi if [ -d $HOME/.bash/completion ]; then for file in $(ls $HOME/.bash/completion/*); do source $file; done; fi

View File

@ -1,7 +1,4 @@
#!/bin/bash #!/bin/bash
URXVT_FONT_NAME="Terminus"
URXVT_FONT_SIZE=8
URXVT_FONT_INCREMENT=1
function urxvt_set_font function urxvt_set_font
{ {
@ -14,15 +11,3 @@ function urxvt_set_title
# set window title # set window title
printf '\33]2;%s\007' "$1" printf '\33]2;%s\007' "$1"
} }
# Quick functions
zp() {
URXVT_FONT_SIZE=$(echo "$URXVT_FONT_SIZE+$URXVT_FONT_INCREMENT" | bc )
urxvt_set_font "${URXVT_FONT_NAME}:size=${URXVT_FONT_SIZE}"
}
zm() {
URXVT_FONT_SIZE=$(echo "$URXVT_FONT_SIZE-$URXVT_FONT_INCREMENT" | bc )
urxvt_set_font "${URXVT_FONT_NAME}:size=${URXVT_FONT_SIZE}"
}

19
rc.d/urxvt Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
URXVT_FONT_NAME="Terminus"
URXVT_FONT_SIZE=8
URXVT_FONT_INCREMENT=1
urxvt_set_font "${URXVT_FONT_NAME}:size=${URXVT_FONT_SIZE}"
# Quick functions
zp() {
URXVT_FONT_SIZE=$(echo "$URXVT_FONT_SIZE+$URXVT_FONT_INCREMENT" | bc )
urxvt_set_font "${URXVT_FONT_NAME}:size=${URXVT_FONT_SIZE}"
}
zm() {
URXVT_FONT_SIZE=$(echo "$URXVT_FONT_SIZE-$URXVT_FONT_INCREMENT" | bc )
urxvt_set_font "${URXVT_FONT_NAME}:size=${URXVT_FONT_SIZE}"
}

View File

@ -1,14 +1,26 @@
#!/bin/bash #!/bin/bash
# Powerline # Powerline
SCRIPT=/usr/lib64/python3.2/site-packages/powerline/bindings/bash/powerline.sh POWERLINE_FILE=/usr/share/powerline/bash/powerline.sh
if [ -f $SCRIPT ]
if [ -f "${POWERLINE_FILE}" -a -z "$SSH_CONNECTION" ]
then then
if [ -n "$SSH_CONNECTION" ]
then #export URXVT_FONT_NAME="Terminus for Powerline"
#urxvt_set_font "Terminus for Powerline-12" export URXVT_FONT_NAME="DejaVu Sans Mono for Powerline"
export URXVT_FONT_NAME="DejaVu Sans Mono" export URXVT_FONT_SIZE="8"
urxvt_set_font "DejaVu Sans Mono for Powerline-10"
source $SCRIPT xrdb -merge <<"EOF"
fi XTerm*utf8: 1
XTerm*faceName: ${URXVT_FONT_NAME}
XTerm*faceSize: ${URXVT_FONT_SIZE}
UXTerm*utf8: 1
UXTerm*faceName: ${URXVT_FONT_NAME}
UXTerm*faceSize: ${URXVT_FONT_SIZE}
URxvt*font: xft:${URXVT_FONT_NAME}-${URXVT_FONT_SIZE}
EOF
test -f ~/.Xresources.powerline && xrdb -merge ~/.Xresources.powerline
urxvt_set_font "${URXVT_FONT_NAME}-${URXVT_FONT_SIZE}"
source ${POWERLINE_FILE}
fi fi