dotfiles/scripts/menu/menu-templates
2023-09-15 13:00:49 -06:00

13 lines
369 B
Bash
Executable file

#!/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!"