This commit is contained in:
Daniel Bauer
2018-09-14 11:56:02 +02:00
parent e0b529b91a
commit a807f5eb1e
45 changed files with 53 additions and 14 deletions

43
.zshrc_functions Normal file
View File

@@ -0,0 +1,43 @@
#!/bin/bash
# open a web browser on google for a query
function google {
function urlencode {
print "${${(j: :)@}//(#b)(?)/%$[[##16]##${match[1]}]}"
}
xdg-open "https://www.google.com/search?q=`urlencode "${(j: :)@}"`"
}
# open a web browser on google for a query
function google {
function urlencode {
print "${${(j: :)@}//(#b)(?)/%$[[##16]##${match[1]}]}"
}
xdg-open "https://www.google.com/search?q=`urlencode "${(j: :)@}"`"
}
# alter keyboard layout
setKeyboard() {
setxkbmap -layout $1
}
# download pdb file to current dir
pdb() {
URL=http://www.rcsb.org/pdb/files/$1.pdb.gz
if [ -z "$2" ]; then
2="./"
fi
wget $URL -P $2
gunzip $2/$1.pdb.gz
}
# clipboard
alias clip='xsel --clipboard'
alias groclean='rm \#*'
alias sm='snakemake'
alias ls='ls -lh'