Adds open-local script
This commit is contained in:
parent
670de54f63
commit
b40c13d3f8
2 changed files with 23 additions and 0 deletions
21
bin/open-local
Executable file
21
bin/open-local
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
# absolute path to image folder
|
||||||
|
FOLDER="$PWD"
|
||||||
|
|
||||||
|
PH="${${PWD%/public_html*}%/wiki*}"
|
||||||
|
|
||||||
|
FILE="https://${PH##*/}.local.jh"
|
||||||
|
|
||||||
|
# get current open browser command
|
||||||
|
case $( uname -s ) in
|
||||||
|
Darwin) open=open;;
|
||||||
|
MINGW*) open=start;;
|
||||||
|
CYGWIN*) open=cygstart;;
|
||||||
|
MSYS*) open="powershell.exe –NoProfile Start";;
|
||||||
|
*) open=${BROWSER:-xdg-open};;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# open it in a browser
|
||||||
|
$open "$FILE" &> /dev/null & disown
|
||||||
|
exit $?
|
|
@ -154,3 +154,5 @@ alias kb="xmodmap ~/.Xmodmap; xset r rate 200 70; xcape"
|
||||||
|
|
||||||
alias colemak="setxkbmap -layout gb,gb -variant \"colemak,\" -option grp:shifts_toggle"
|
alias colemak="setxkbmap -layout gb,gb -variant \"colemak,\" -option grp:shifts_toggle"
|
||||||
alias qwerty="setxkbmap -layout gb"
|
alias qwerty="setxkbmap -layout gb"
|
||||||
|
|
||||||
|
alias ol="open-local"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue