dotfiles/bin/copy

9 lines
158 B
Plaintext
Raw Normal View History

2019-05-03 08:45:06 +01:00
#!/usr/bin/env bash
2019-02-11 16:40:33 +00:00
if [ $# -eq 0 ]; then
xclip -selection c
else
file_type=$(file -b --mime-type "$1")
xclip -selection c -t $file_type < $1
fi