diff options
-rwxr-xr-x | bin/bin/references | 2 | ||||
-rwxr-xr-x | bin/bin/tmux_attach | 2 | ||||
-rwxr-xr-x | bin/bin/workspace | 2 | ||||
-rw-r--r-- | surfraw/.surfraw.conf | 2 | ||||
-rw-r--r-- | vim/.vimrc | 14 | ||||
-rwxr-xr-x | xinit/.xinitrc | 1 | ||||
-rw-r--r-- | zsh/.zsh/functions | 13 |
7 files changed, 20 insertions, 16 deletions
diff --git a/bin/bin/references b/bin/bin/references index a578728..eba1fb1 100755 --- a/bin/bin/references +++ b/bin/bin/references @@ -2,4 +2,4 @@ REF_DIR="$HOME/phd/references" PDF=$(locate "$REF_DIR/**/*.pdf") TARGET=$(echo "${PDF//"$REF_DIR/"/}" | dmenu -i -p "Open File:") -[[ -n $TARGET ]] && zathura "$REF_DIR/$TARGET" & +[[ -n $TARGET ]] && (zathura "$REF_DIR/$TARGET" &) diff --git a/bin/bin/tmux_attach b/bin/bin/tmux_attach index 593f53c..4938543 100755 --- a/bin/bin/tmux_attach +++ b/bin/bin/tmux_attach @@ -1,7 +1,7 @@ #!/usr/bin/env bash SESSIONS=$(tmux list-sessions | cut -d':' -f1) -TMUXINATOR=$(tmuxinator list | tail -1 | sed 's/ /\n/g') +TMUXINATOR=$(tmuxinator list | sed '1d' | sed 's/ /\n/g') UNION=$(cat <(echo "$SESSIONS") <(echo "$TMUXINATOR") | sort | uniq | sed "/^$/d") SESSION=$(echo "$UNION" | dmenu -i -p "Session:" | tr -d '[[:space:]]') diff --git a/bin/bin/workspace b/bin/bin/workspace index e380f98..d8dec79 100755 --- a/bin/bin/workspace +++ b/bin/bin/workspace @@ -11,7 +11,7 @@ workspaces=$(i3-msg -t get_workspaces | grep -Po '"name":.*?[^\\]"' | sed 's/"na workspaces=$(echo $workspaces | sed '/:/!d') # Get desired workspace -target=$(echo $workspaces | dmenu "Go to workspace:") +target=$(echo $workspaces | dmenu -i -b -p "Go to workspace:") # Exit if empty [[ -z $target ]] && exit diff --git a/surfraw/.surfraw.conf b/surfraw/.surfraw.conf index 6f76042..6985ac2 100644 --- a/surfraw/.surfraw.conf +++ b/surfraw/.surfraw.conf @@ -1,3 +1,3 @@ SURFRAW_graphical_browser=firefox SURFRAW_text_browser=w3m -SURFRAW_graphical=no +SURFRAW_graphical=yes @@ -227,13 +227,19 @@ endif " Plugins interactions function! Multiple_cursors_before() - let b:deoplete_disable_auto_complete = 1 - exe 'NeoCompleteLock' + if has("nvim") + let b:deoplete_disable_auto_complete = 1 + else + exe 'NeoCompleteLock' + endif endfunction function! Multiple_cursors_after() - let b:deoplete_disable_auto_complete = 0 - exe 'NeoCompleteUnlock' + if has("nvim") + let b:deoplete_disable_auto_complete = 0 + else + exe 'NeoCompleteUnlock' + endif endfunction "" Vim variables diff --git a/xinit/.xinitrc b/xinit/.xinitrc index 98fa988..ddbbff5 100755 --- a/xinit/.xinitrc +++ b/xinit/.xinitrc @@ -31,6 +31,5 @@ eval $(ssh-agent) nm-applet & dropbox & dunst & -conky exec i3 diff --git a/zsh/.zsh/functions b/zsh/.zsh/functions index 5ea454f..ae85104 100644 --- a/zsh/.zsh/functions +++ b/zsh/.zsh/functions @@ -3,7 +3,7 @@ [[ -z ${ZSH_COLORS} ]] && ZSH_COLORS=${HOME}/.local/share/zsh/colors.zsh [[ -f ${ZSH_COLORS} ]] && source ${ZSH_COLORS} -colorschemes=$(echo ${HOME}/.Xresources/* | sed "s#${HOME}/.Xresources/##g") +colorschemes=$(ls ${HOME}/.Xresources) function colo { @@ -15,7 +15,9 @@ function colo { -e 's/.*background:/\x1b]11;/p' \ -e 's/.*foreground:/\x1b]10;/p' \ -e 's/.*borderColor:/\x1b]708;/p' \ - -e 's/.*color\([0-9][^:]*\):/\x1b]4;\1;/p' | tr \\n \\a + -e 's/.*color\([0-9][^:]*\):/\x1b]4;\1;/p' | tr \\n "\007" + + [ ! -z "$TMUX" ] && printf '\033Ptmux;\033\033]11;white\007\033' # Change color for future sessions xrdb ${XRESOURCE_FILE} @@ -23,11 +25,8 @@ function colo { # Change default environment variable for future sessions mkdir -p $(dirname ${ZSH_COLORS}) - COLORSCHEME=$(echo ${XRESOURCE} | sed 's/\([^.]\+\)\..\+$/\1/g') - BACKGROUND=$(echo ${XRESOURCE} | sed 's/^.\+\(dark\|light\)/\1/') - - echo "export COLORSCHEME=${COLORSCHEME}" > ${ZSH_COLORS} - echo "export BACKGROUND=${BACKGROUND}" >> ${ZSH_COLORS} + echo "export COLORSCHEME=${XRESOURCE%.*}" > ${ZSH_COLORS} + echo "export BACKGROUND=${XRESOURCE#*.}" >> ${ZSH_COLORS} echo "export XRESOURCE=${XRESOURCE}" >> ${ZSH_COLORS} source ${ZSH_COLORS} } |