From 52b8328a78b6a6a78639f8ebec30c03f65a32d99 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Tue, 22 Jan 2019 08:28:15 +0000 Subject: [PATCH] add aliases for keyboard layouts --- shells/aliases | 3 +++ shells/functions | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/shells/aliases b/shells/aliases index 14f26c28..fb623244 100644 --- a/shells/aliases +++ b/shells/aliases @@ -151,3 +151,6 @@ alias updateTime="sudo ntpd -qg" # Keyboard - reset # Sometimes, if I turn the screens off, the keyboard resets itself to defaults. Not sure why but this will put my keyboard back to how I like it alias kb="xmodmap ~/.Xmodmap; xset r rate 200 70; xcape" + +alias colemak="setxkbmap -layout gb,gb -variant \"colemak,\" -option grp:shifts_toggle" +alias qwerty="setxkbmap -layout gb" diff --git a/shells/functions b/shells/functions index b462fd77..70adc740 100644 --- a/shells/functions +++ b/shells/functions @@ -276,17 +276,25 @@ function debugToggle(){ #These search functions use grep to search all sub-folders of the current working directory searchjs() { # This will search through .js and .es6 files but won't search minified files - grep -r -i -n --color="always" --include=\*.{js,es6} --exclude=\*.min.js "$1" . + grep -r -i -n --color="always" --include=\*.{js,es6} --exclude=\*.min.js "$1" . | tee /tmp/lastSearch } searchcss() { # This will search through .css and .less files but won't search minified files - grep -r -i -n --color="always" --include=\*.{css,less,scss,sass} --exclude=\*.min.css "$1" . + grep -r -i -n --color="always" --include=\*.{css,less,scss,sass} --exclude=\*.min.css "$1" . | tee /tmp/lastSearch } searchphp() { - grep -r -i -n --color="always" --include=\*.{php,phtml} "$1" . + grep -r -i -n --color="always" --include=\*.{php,phtml} "$1" . | tee /tmp/lastSearch } searchhtml() { - grep -r -i -n --color="always" --include=\*.{html,htm} "$1" . + grep -r -i -n --color="always" --include=\*.{html,htm} "$1" . | tee /tmp/lastSearch +} + +ops() { + responce=$(cat /tmp/lastSearch | slmenu -b -l $(tput lines) | sed 's/\x1B\[[0-9;]\+[A-Za-z]//g') + echo "responce" + file=$(echo "$responce" | awk -F ':' '{print $1}') + line=$(echo "$responce" | awk -F ':' '{print $2}') + vim +${line} ${file} } png() {