Templates
This commit is contained in:
parent
cfd2ad4fb6
commit
b02433c10c
7 changed files with 48 additions and 0 deletions
6
Templates/Latex document.desktop
Normal file
6
Templates/Latex document.desktop
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Name=Latex document
|
||||
Comment=A blank latex document
|
||||
Type=Link
|
||||
URL=src/Latex document.tex
|
||||
Icon=text-x-bibtex
|
6
Templates/Shell script.desktop
Normal file
6
Templates/Shell script.desktop
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Name=Shell script
|
||||
Comment=A blank shell script
|
||||
Type=Link
|
||||
URL=src/Shell script.sh
|
||||
Icon=text-x-script
|
9
Templates/src/Latex document.tex
Normal file
9
Templates/src/Latex document.tex
Normal file
|
@ -0,0 +1,9 @@
|
|||
\documentclass{article} % This command is used to set the type of document you are working on such as an article, book, or presenation
|
||||
|
||||
\usepackage{geometry} % This package allows the editing of the page layout
|
||||
\usepackage{amsmath} % This package allows the use of a large range of mathematical formula, commands, and symbols
|
||||
\usepackage{graphicx} % This package allows the importing of images
|
||||
|
||||
\begin{document}
|
||||
|
||||
\end{document}
|
1
Templates/src/Shell script.sh
Executable file
1
Templates/src/Shell script.sh
Executable file
|
@ -0,0 +1 @@
|
|||
#!/usr/bin/env bash
|
12
scripts/new
Executable file
12
scripts/new
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
TEMPLATE_DIR="$HOME/Templates/src"
|
||||
|
||||
src=`ls "$TEMPLATE_DIR" | fzf --preview="$HOME/.dots/scripts/template_preview $TEMPLATE_DIR/{}"`
|
||||
|
||||
if [ -n "$src" ]; then
|
||||
read -p "File name: " name
|
||||
if [ -n "$name" ]; then
|
||||
cp "$TEMPLATE_DIR/$src" "$name" -r
|
||||
fi
|
||||
fi
|
8
scripts/template_preview
Executable file
8
scripts/template_preview
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
file="$TEMPLATE_DIR/$1"
|
||||
if [ -d "$file" ]; then
|
||||
tree -C "$file"
|
||||
else
|
||||
bat -pf "$file"
|
||||
fi
|
6
setup.sh
6
setup.sh
|
@ -111,3 +111,9 @@ else
|
|||
mkdir "$HOME/bin"
|
||||
ln -s $DOTS_DIR/scripts $SCRIPT_DIR
|
||||
fi
|
||||
|
||||
# Templates
|
||||
TEMPLATE_DIR="$HOME/Templates"
|
||||
|
||||
rmdir "$TEMPLATE_DIR"
|
||||
ln -s "$DOTS_DIR/Templates" "$TEMPLATE_DIR"
|
||||
|
|
Loading…
Add table
Reference in a new issue