diff --git a/scripts/menu/menu-templates b/scripts/menu/menu-templates new file mode 100755 index 0000000..6a11945 --- /dev/null +++ b/scripts/menu/menu-templates @@ -0,0 +1,13 @@ +#!/bin/sh +# Copy templates to clipboard + +# templates directory +templates=~/Documents/templates +# Select using menu, copy if successful +template=$(ls "$templates" | menu "template:") + +# Exit if empty +[ -z "$template" ] && exit + +# Copy to clipboard and notify otherwise +cat "$templates"/"$template" | xsel -ib && notify-send "template" "'$template' copied to clipboard!"