13 lines
369 B
Bash
Executable file
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!"
|