updates
This commit is contained in:
parent
e04e38d68b
commit
6ea10852a9
1 changed files with 6 additions and 2 deletions
|
|
@ -21,6 +21,7 @@ writeShellScriptBin "enc" ''
|
||||||
|
|
||||||
# Create recipient arguments for gpg
|
# Create recipient arguments for gpg
|
||||||
recipients=()
|
recipients=()
|
||||||
|
recipients+=("-r" "0x5F873416BCF59F35")
|
||||||
for recipient in "$@"; do
|
for recipient in "$@"; do
|
||||||
recipients+=("-r" "$recipient")
|
recipients+=("-r" "$recipient")
|
||||||
done
|
done
|
||||||
|
|
@ -39,14 +40,17 @@ writeShellScriptBin "enc" ''
|
||||||
--armor \
|
--armor \
|
||||||
--trust-model always \
|
--trust-model always \
|
||||||
"''${recipients[@]}" \
|
"''${recipients[@]}" \
|
||||||
"$temp_file" | ${wl-clipboard}/bin/wl-copy
|
"$temp_file"
|
||||||
|
|
||||||
|
cat "$temp_file".asc | ${wl-clipboard}/bin/wl-copy --type text/plain
|
||||||
echo "Encrypted content copied to Wayland clipboard"
|
echo "Encrypted content copied to Wayland clipboard"
|
||||||
elif [[ -n "$DISPLAY" ]]; then
|
elif [[ -n "$DISPLAY" ]]; then
|
||||||
${gnupg}/bin/gpg --encrypt \
|
${gnupg}/bin/gpg --encrypt \
|
||||||
--armor \
|
--armor \
|
||||||
--trust-model always \
|
--trust-model always \
|
||||||
"''${recipients[@]}" \
|
"''${recipients[@]}" \
|
||||||
"$temp_file" | ${xclip}/bin/xclip -selection clipboard
|
"$temp_file"
|
||||||
|
cat "$temp_file.asc" | ${xclip}/bin/xclip -selection clipboard
|
||||||
echo "Encrypted content copied to X11 clipboard"
|
echo "Encrypted content copied to X11 clipboard"
|
||||||
else
|
else
|
||||||
echo "No display detected, cannot copy to clipboard"
|
echo "No display detected, cannot copy to clipboard"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue