mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-12 19:27:17 +00:00
Adds shell function - copy file to system clipboard
This commit is contained in:
parent
e25c0ee553
commit
9a08dcc333
1 changed files with 9 additions and 0 deletions
|
@ -42,6 +42,15 @@
|
||||||
else
|
else
|
||||||
eval "$(/usr/local/bin/brew shellenv)"
|
eval "$(/usr/local/bin/brew shellenv)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
file-to-clipboard() {
|
||||||
|
filepath=$(realpath $1)
|
||||||
|
osascript \
|
||||||
|
-e 'on run args' \
|
||||||
|
-e "set the clipboard to POSIX file \"$filepath\"" \
|
||||||
|
-e end \
|
||||||
|
"$@"
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
targets.darwin = {
|
targets.darwin = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue