From ccdd9dd57d6ed84619ae33b48e0f8d24194be466 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Fri, 7 Jun 2019 09:24:50 +0100 Subject: [PATCH] Adds site specific .bin folder to path --- bin/search/searchcss | 2 +- dwm | 2 +- shells/functions | 9 +++++++++ x/xinitrc | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/bin/search/searchcss b/bin/search/searchcss index 860e88ce..8de9d14a 100755 --- a/bin/search/searchcss +++ b/bin/search/searchcss @@ -26,4 +26,4 @@ while [ $# != 0 ]; do esac done -grep -r -i -n --color="always" --include=\*.{css,less,scss,sass} --exclude=\*.min.css -A "$after" -B "$before" "$search" . +grep -r -i -n --color="always" --include=\*.{css,less,scss,sass} --exclude=\*.min.css -A $after -B $before $search . diff --git a/dwm b/dwm index 7c01eac9..046b66b1 160000 --- a/dwm +++ b/dwm @@ -1 +1 @@ -Subproject commit 7c01eac9a7e543a78240c36e254a51ea2907aed7 +Subproject commit 046b66b1d614883e8987d4a1fa9b0a0890c813d6 diff --git a/shells/functions b/shells/functions index 1ebee11b..da5c3a92 100644 --- a/shells/functions +++ b/shells/functions @@ -50,6 +50,7 @@ function mycd() { echo "Can't cd" fi fi + updatePath } alias cd="mycd" @@ -221,11 +222,19 @@ function debugToggle(){ } # Adds sub folders in by .bin directory to the PATH if they are not already in it +# Also adds .bin to the path adjacent to any public_html folder function updatePath(){ + # Reset the path + PATH=$(echo $PATH | sed -E "s/:\/home\/jonathan\/\.bin\/.*//g") for d in ~/.bin/*/; do if [[ :$PATH: != *:"$d":* ]] ; then PATH+=":$d" fi done + public_html=${PWD%/public_html*}/public_html + if [ -d $public_html ]; then + PATH+=":${PWD%/public_html*}/.bin" + fi + } diff --git a/x/xinitrc b/x/xinitrc index 06c6a412..86790cb3 100644 --- a/x/xinitrc +++ b/x/xinitrc @@ -1,5 +1,5 @@ # Make keyboard layout coleemak but pushing both shifts will toggle to qwerty -setxkbmap -layout gb,gb -variant "colemak," -option grp:shifts_toggle +# setxkbmap -layout gb,gb -variant "colemak," -option grp:shifts_toggle # Make key firing much faster xset r rate 200 70 # Need this for making qt applications use gtk theme ( I think )