summaryrefslogtreecommitdiff
path: root/zsh/.zsh/functions
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2016-04-28 15:15:41 +0100
committerUrbain Vaes <urbain@vaes.uk>2016-04-28 15:15:41 +0100
commit14453e17a8c8a50ff18673c2c9992329f9314d04 (patch)
tree02859f2af11e5047420ba54aa1faf3b03e30b07f /zsh/.zsh/functions
parent4bb73ea2141a405c6c22ed273f92247df3e18b9f (diff)
Fix minor things
Diffstat (limited to 'zsh/.zsh/functions')
-rw-r--r--zsh/.zsh/functions12
1 files changed, 4 insertions, 8 deletions
diff --git a/zsh/.zsh/functions b/zsh/.zsh/functions
index 86c1894..5d629c7 100644
--- a/zsh/.zsh/functions
+++ b/zsh/.zsh/functions
@@ -4,8 +4,10 @@ if [[ -z ${ZSH_COLORS} ]]; then
ZSH_COLORS=${HOME}/.local/share/zsh/colors.zsh
fi
-colorschemes=$(echo ${HOME}/.Xresources/**/*.xresources | sed "s#${HOME}/.Xresources/##g" | sed 's#base16/base16-##g' | \
- sed 's/[^ ]\+\.256\.[^ ]\+//g' | sed 's/.xresources//g' | sed 's/[ ]\+/ /g' )
+if [[ -d ${HOME}/.Xresources ]]; then
+ colorschemes=$(echo ${HOME}/.Xresources/**/*.xresources | sed "s#${HOME}/.Xresources/##g" | sed 's#base16/base16-##g' | \
+ sed 's/[^ ]\+\.256\.[^ ]\+//g' | sed 's/.xresources//g' | sed 's/[ ]\+/ /g' )
+fi
function colo {
@@ -35,11 +37,6 @@ function colo {
bg=$(/usr/bin/cpp ${XRESOURCE_FILE} | grep "background" | sed 's/[^ ]\+[ ]\+\([^ ]\+\)$/\1/')
echo "\x1b]708;${bg}" | tr \\n \\a
- # Load Xresources file for future sessions
- xrdb ~/.Xresources/base.xresources
- xrdb -merge ${XRESOURCE_FILE}
- xrdb -merge <<< "URxvt.borderColor: ${bg}"
-
# Change default environment variable for future sessions
mkdir -p $(dirname ${ZSH_COLORS})
@@ -56,7 +53,6 @@ function colo {
if [[ -f ${ZSH_COLORS} ]]; then
source ${ZSH_COLORS}
colo ${XRESOURCE}
- # echo "sourced ${XRESOURCE}"
fi
# Completion for colorschemes (-M -> Case insensitive)