Adds helper scripts, updates hammerspoon config

This commit is contained in:
2017-10-09 21:24:29 -07:00
parent b6b6a70a6a
commit 2ded1eb81e
3 changed files with 49 additions and 13 deletions

3
bin/texclean Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
rm -f *.{aux,log,toc,out}

18
bin/webapp Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
APP=$1
function app {
APP=$(echo $1 | sed -E "s/^(http)?(s)?(:\/\/)?(.+\..+)$/http\2:\/\/\4/")
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --app="$APP" &> /dev/null
}
if [[ -z $APP ]]; then
APP=$(osascript -e 'set Site to text returned of (display dialog "URL" buttons {"Cancel", "OK"} default button "OK" default answer "")')
fi
if [[ -z $APP ]]; then
exit 1
fi
app $APP