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
|
# 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
|
||||||
|
@ -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
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
|
#!/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
|
||||||
|
Loading…
Reference in New Issue
Block a user