From 14453e17a8c8a50ff18673c2c9992329f9314d04 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 28 Apr 2016 15:15:41 +0100 Subject: Fix minor things --- bin/bin/tmux_attach | 2 +- zsh/.zsh/functions | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/bin/bin/tmux_attach b/bin/bin/tmux_attach index 564e3bb..151c1f8 100755 --- a/bin/bin/tmux_attach +++ b/bin/bin/tmux_attach @@ -6,4 +6,4 @@ SESSION=$(echo "$SESSIONS" | dmenu -i -p "Session:" | tr -d '[[:space:]]') [[ -n $SESSION ]] || exit -urxvt -e zsh -c "tmux new-session -A -s $SESSION" +urxvt -e zsh -c "source ~/.zshrc && tmux new-session -A -s $SESSION" 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) -- cgit v1.2.3