From 355953dc3507ee16eb28cd8c4345e2740fcdae94 Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Fri, 19 Aug 2022 21:25:46 +0800 Subject: [PATCH] File templates (KDE) --- Makefile | 6 ++- install/file-templates-kde | 84 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100755 install/file-templates-kde diff --git a/Makefile b/Makefile index 85c64d5..4ab402d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Autogenerated at 19.08.2022 20:58 using ./gen-makefile +# Autogenerated at 19.08.2022 21:20 using ./gen-makefile ##composer: [PACK] php + composer composer: php composer-clean @@ -46,6 +46,10 @@ droidcam: droidcam-obs: @./install/droidcam-obs +##file-templates-kde: Install file templates (KDE) +file-templates-kde: + @./install/file-templates-kde + ##flameshot-build: [TODO] Build flameshot from src (latest) flameshot-build: @./install/flameshot-build diff --git a/install/file-templates-kde b/install/file-templates-kde new file mode 100755 index 0000000..0f19db7 --- /dev/null +++ b/install/file-templates-kde @@ -0,0 +1,84 @@ +#!/bin/bash +##makedesc: Install file templates (KDE) + +echo +echo "===============================================" +echo "Installing file templates (KDE)..." +echo "===============================================" +echo + +TPL_DIR="$HOME/.local/share/templates" +TPL_SRC="$TPL_DIR/.source" +[ ! -d "$TPL_SRC" ] && mkdir -p "$TPL_SRC" + +echo "- Markdown" #################################################### +cat < "$TPL_SRC/template.md" +# Title + + +EOF + +cat << EOF > "$TPL_DIR/md.desktop" +[Desktop Entry] +Name=Документ Markdown +Icon=text-markdown +Type=Link +URL=.source/template.md +EOF + +echo "- PHP" #################################################### +cat < "$TPL_SRC/template.php" + "$TPL_DIR/php.desktop" +[Desktop Entry] +Name=PHP-скрипт +Icon=application-x-php +Type=Link +URL=.source/template.php +EOF + +echo "- Shell" #################################################### +cat < "$TPL_SRC/template.sh" +#!/bin/bash +EOF + +cat << EOF > "$TPL_DIR/sh.desktop" +[Desktop Entry] +Name=Bash-скрипт +Icon=terminal +Type=Link +URL=.source/template.sh +EOF + +echo "- Go" #################################################### +cat < "$TPL_SRC/template.go" +package main + +import "fmt" + +func main() { + fmt.Println("hello world") +} +EOF + +cat << EOF > "$TPL_DIR/go.desktop" +[Desktop Entry] +Name=Golang файл +Type=Link +URL=.source/template.go +EOF + +echo +echo "Finish! You can find them here:" +echo -e "\t$TPL_DIR" +echo +