Merge branch 'master' of https://github.com/xlogerais/config-bash
This commit is contained in:
commit
e97192ab3f
2
bashrc
2
bashrc
@ -26,6 +26,8 @@ if [ -d $HOME/.bash/aliases.d ]; then for file in $(ls $HOME/.bash/aliases.d/*);
|
||||
# Source bash completion definitions
|
||||
[[ -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.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 [ -d $HOME/.bash/completion ]; then for file in $(ls $HOME/.bash/completion/*); do source $file; done; fi
|
||||
|
@ -1,7 +1,4 @@
|
||||
#!/bin/bash
|
||||
URXVT_FONT_NAME="Terminus"
|
||||
URXVT_FONT_SIZE=8
|
||||
URXVT_FONT_INCREMENT=1
|
||||
|
||||
function urxvt_set_font
|
||||
{
|
||||
@ -14,15 +11,3 @@ function urxvt_set_title
|
||||
# set window title
|
||||
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
19
rc.d/urxvt
Executable 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}"
|
||||
}
|
@ -1,14 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Powerline
|
||||
SCRIPT=/usr/lib64/python3.2/site-packages/powerline/bindings/bash/powerline.sh
|
||||
if [ -f $SCRIPT ]
|
||||
POWERLINE_FILE=/usr/share/powerline/bash/powerline.sh
|
||||
|
||||
if [ -f "${POWERLINE_FILE}" -a -z "$SSH_CONNECTION" ]
|
||||
then
|
||||
if [ -n "$SSH_CONNECTION" ]
|
||||
then
|
||||
#urxvt_set_font "Terminus for Powerline-12"
|
||||
export URXVT_FONT_NAME="DejaVu Sans Mono"
|
||||
urxvt_set_font "DejaVu Sans Mono for Powerline-10"
|
||||
source $SCRIPT
|
||||
fi
|
||||
|
||||
#export URXVT_FONT_NAME="Terminus for Powerline"
|
||||
export URXVT_FONT_NAME="DejaVu Sans Mono for Powerline"
|
||||
export URXVT_FONT_SIZE="8"
|
||||
|
||||
xrdb -merge <<"EOF"
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user