templates

This commit is contained in:
tavo-wasd 2023-09-15 13:00:49 -06:00
parent fd33d50950
commit cbf487a508

13
scripts/menu/menu-templates Executable file
View file

@ -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!"