4 Commits 505766e759 ... b53e65107e

Author SHA1 Message Date
  Kyle P Davis b53e65107e feat: add multi key path support to node-print alias 5 years ago
  Kyle P Davis 2e55f53f2b feat: added support for an optional 2nd arg to node-print alias for traversing printing a subset of the results 5 years ago
  Kyle P Davis be76d03f50 feat: add a few more keyboard shortcuts 5 years ago
  Kyle P Davis bb03d4987e feat: add node-print alias 5 years ago
2 changed files with 6 additions and 1 deletions
  1. 1 0
      .profile
  2. 5 1
      install.sh

+ 1 - 0
.profile

@@ -87,6 +87,7 @@ alias l="ls -FC"
 alias d="l"
 alias tree="tree -CF"
 alias grep="grep --color --exclude-dir={.svn,.git,node_modules}"
+alias node-print="node -p -e 'l=(a=process.argv.slice(2)).length; o=require(path.resolve(process.argv[1])); pl=l>0?a.map(s=>s.split(\".\")):[[]]; r=pl.map(p=>p.reduce((o,k)=>o[k],o)); l?r:r[0]'"
 
 # color diffs
 ! command -v colordiff &>/dev/null  ||  alias diff="colordiff"

+ 5 - 1
install.sh

@@ -54,5 +54,9 @@ if [ "$OS" = "Darwin" ]; then
 	defaults write -globalDomain AppleKeyboardUIMode -int 3
 	# Setup things for SystemPreferences->Keyboard->Shortcuts->App Shortcuts
 	defaults write -globalDomain NSUserKeyEquivalents -dict \
-		'\033Window\033Zoom' '@~^m'
+		'\033Window\033Zoom' '@~^m' \
+		'\033Window\033Move Window to Left Side of Screen' '@~^\U2190' \
+		'\033Window\033Move Window to Right Side of Screen' '@~^\U2192' \
+		'\033Window\033Tile Window to Left of Screen' '@~^$\U2190' \
+		'\033Window\033Tile Window to Right of Screen' '@~^$\U2192'
 fi