global pkgs
This commit is contained in:
1
custom-pkgs/wl-copy-both/default.nix
Normal file
1
custom-pkgs/wl-copy-both/default.nix
Normal file
@@ -0,0 +1 @@
|
||||
{ util, ... }: util.package
|
||||
14
custom-pkgs/wl-copy-both/package.nix
Normal file
14
custom-pkgs/wl-copy-both/package.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ pkgs }:
|
||||
pkgs.writeShellScriptBin "wl-copy" ''
|
||||
set -euo pipefail
|
||||
copy="${pkgs.wl-clipboard}/bin/wl-copy"
|
||||
paste="${pkgs.wl-clipboard}/bin/wl-paste"
|
||||
|
||||
"$copy" "$@"
|
||||
args="$*"
|
||||
if [[ "$args" =~ /(^| )(-p|--primary)($| )/ ]]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
"$paste" -n | "$copy" -p "$@"
|
||||
''
|
||||
Reference in New Issue
Block a user