diff --git a/home/darwin/default.nix b/home/darwin/default.nix index 735f219..641c5cc 100644 --- a/home/darwin/default.nix +++ b/home/darwin/default.nix @@ -42,6 +42,15 @@ else eval "$(/usr/local/bin/brew shellenv)" fi + + file-to-clipboard() { + filepath=$(realpath $1) + osascript \ + -e 'on run args' \ + -e "set the clipboard to POSIX file \"$filepath\"" \ + -e end \ + "$@" + } ''; targets.darwin = {