1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-09 19:11:15 +02:00

bin structure and vifm preview

This commit is contained in:
TiynGER
2020-03-31 20:32:16 +02:00
parent 148aaee349
commit 3ca4ecaaa1
27 changed files with 316 additions and 59 deletions

View File

@@ -1,13 +0,0 @@
#!/bin/sh
# opout: "open output": A general handler for opening a file's intended output,
# usually the pdf of a compiled document. I find this useful especially
# running from vim.
basename="$(echo "$1" | sed 's/\.[^\/.]*$//')"
case "$1" in
*.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid xdg-open "$basename".pdf >/dev/null 2>&1 & ;;
*.html) setsid "$BROWSER" "$basename".html >/dev/null 2>&1 & ;;
*.sent) setsid sent "$1" >/dev/null 2>&1 & ;;
esac

5
.local/bin/etc/sshmenu Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
ssh_host=$(cat ~/.ssh/config | grep "Host " | sed "s/Host\ //g" | dmenu)
[[ -z ssh_host ]] || st -e ssh -t $ssh_host

27
.local/bin/etc/textemp Executable file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env sh
# copying tex templates
[ -z "$2" ] && echo "missing argument: filename (no ending)" && return 1
articletemp=~/gitrepos/tools/latex_templates/latex_article/article.tex
beamertemp=~/gitrepos/tools/latex_templates/latex_beamer/beamer.tex
exercisetemp=~/gitrepos/tools/latex_templates/latex_exercise_header/header.tex
handouttemp=~/gitrepos/tools/latex_templates/latex_handout/handout.tex
case "$1" in
a*) cp "$articletemp" $2.tex ;;
b*) cp "$beamertemp" $2.tex ;;
e*) cp "$exercisetemp" $2.tex ;;
h*) cp "$handouttemp" $2.tex ;;
*) cat << EOF
Allowed options
article NAME get handout-template with given NAME
beamer NAME get handout-template with given NAME
exercise NAME get handout-template with given NAME
handout NAME get handout-template with given NAME
All of these commands can be truncated,
i.e. \`textemp a\` for \`textemp article`\.
EOF
esac