From 84fb3829b9ed7fb2424a25d56f590172f69320a9 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Wed, 9 Apr 2014 18:17:59 +0200 Subject: [PATCH 1/5] Add support for gentoo completion --- bashrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bashrc b/bashrc index f41d142..e9b5696 100644 --- a/bashrc +++ b/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 From 05ba4ab8246bf07a80b0c20eaed8618867ae1ad1 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Wed, 9 Apr 2014 18:19:57 +0200 Subject: [PATCH 2/5] Split lib urxvt --- libs/urxvt.bash | 15 --------------- rc.d/urxvt | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 15 deletions(-) create mode 100755 rc.d/urxvt diff --git a/libs/urxvt.bash b/libs/urxvt.bash index 7f90ad9..fd5f30e 100755 --- a/libs/urxvt.bash +++ b/libs/urxvt.bash @@ -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}" -} diff --git a/rc.d/urxvt b/rc.d/urxvt new file mode 100755 index 0000000..83f4728 --- /dev/null +++ b/rc.d/urxvt @@ -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}" +} From 68a41f157f2fc6553b52e7e33ac5bac144d55f16 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Wed, 9 Apr 2014 18:20:49 +0200 Subject: [PATCH 3/5] Fix rc.d/zz-powerline --- rc.d/zz-powerline | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/rc.d/zz-powerline b/rc.d/zz-powerline index 3471fea..b4a1e3c 100644 --- a/rc.d/zz-powerline +++ b/rc.d/zz-powerline @@ -1,9 +1,25 @@ #!/bin/bash # Powerline -if [ -f /usr/lib64/python3.2/site-packages/powerline/bindings/bash/powerline.sh ] +POWERLINE_FILE=/usr/share/powerline/bash/powerline.sh + +#export URXVT_FONT_NAME="Terminus for Powerline" +export URXVT_FONT_NAME="DejaVu Sans Mono for Powerline" +export URXVT_FONT_SIZE="8" + +if [ -f "${POWERLINE_FILE}" ] then - #urxvt_set_font "Terminus for Powerline-12" - urxvt_set_font "DejaVu Sans Mono for Powerline-10" - source /usr/lib64/python3.2/site-packages/powerline/bindings/bash/powerline.sh + + 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 + xrdb -merge ~/.Xresources.powerline + urxvt_set_font "${URXVT_FONT_NAME}-${URXVT_FONT_SIZE}" + source ${POWERLINE_FILE} fi From 66f7b0957ae3c2d2835d15844a3b23ee5fe4b943 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Wed, 9 Apr 2014 18:37:06 +0200 Subject: [PATCH 4/5] Fix rc.d/zz-powerline --- rc.d/zz-powerline | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/rc.d/zz-powerline b/rc.d/zz-powerline index 0d8f560..01c0bd8 100644 --- a/rc.d/zz-powerline +++ b/rc.d/zz-powerline @@ -3,14 +3,14 @@ # Powerline POWERLINE_FILE=/usr/share/powerline/bash/powerline.sh -#export URXVT_FONT_NAME="Terminus for Powerline" -export URXVT_FONT_NAME="DejaVu Sans Mono for Powerline" -export URXVT_FONT_SIZE="8" - if [ -f "${POWERLINE_FILE}" -a -z "$SSH_CONNECTION" ] then - xrdb -merge <<"EOF" + #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} @@ -19,7 +19,8 @@ UXTerm*faceName: ${URXVT_FONT_NAME} UXTerm*faceSize: ${URXVT_FONT_SIZE} URxvt*font: xft:${URXVT_FONT_NAME}-${URXVT_FONT_SIZE} EOF - xrdb -merge ~/.Xresources.powerline - urxvt_set_font "${URXVT_FONT_NAME}-${URXVT_FONT_SIZE}" - source ${POWERLINE_FILE} + xrdb -merge ~/.Xresources.powerline + + urxvt_set_font "${URXVT_FONT_NAME}-${URXVT_FONT_SIZE}" + source ${POWERLINE_FILE} fi From 7567a2c63f27564d7f0ff9d802b65500ff13e3ed Mon Sep 17 00:00:00 2001 From: root home-station Date: Sat, 10 May 2014 18:58:00 +0200 Subject: [PATCH 5/5] Modified rc.d/zz-powerline --- rc.d/zz-powerline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc.d/zz-powerline b/rc.d/zz-powerline index 01c0bd8..bb906e5 100644 --- a/rc.d/zz-powerline +++ b/rc.d/zz-powerline @@ -19,7 +19,7 @@ UXTerm*faceName: ${URXVT_FONT_NAME} UXTerm*faceSize: ${URXVT_FONT_SIZE} URxvt*font: xft:${URXVT_FONT_NAME}-${URXVT_FONT_SIZE} EOF - xrdb -merge ~/.Xresources.powerline + test -f ~/.Xresources.powerline && xrdb -merge ~/.Xresources.powerline urxvt_set_font "${URXVT_FONT_NAME}-${URXVT_FONT_SIZE}" source ${POWERLINE_FILE}