pass: support Haiku clipboard (#12410)

This commit is contained in:
Peter van Dijk
2025-05-21 09:05:00 +02:00
committed by GitHub
parent 4d36a3d403
commit 881b8941fb
2 changed files with 34 additions and 1 deletions

View File

@@ -45,10 +45,11 @@ COPYRIGHT="2005-2012, Git project
2017, Sam Mason 2017, Sam Mason
" "
LICENSE="GNU GPL v2" LICENSE="GNU GPL v2"
REVISION="3" REVISION="4"
SOURCE_URI="https://git.zx2c4.com/password-store/snapshot/password-store-$portVersion.tar.xz" SOURCE_URI="https://git.zx2c4.com/password-store/snapshot/password-store-$portVersion.tar.xz"
SOURCE_DIR="password-store-$portVersion" SOURCE_DIR="password-store-$portVersion"
CHECKSUM_SHA256="cfa9faf659f2ed6b38e7a7c3fb43e177d00edbacc6265e6e32215ff40e3793c0" CHECKSUM_SHA256="cfa9faf659f2ed6b38e7a7c3fb43e177d00edbacc6265e6e32215ff40e3793c0"
PATCHES="pass-$portVersion.patchset"
ARCHITECTURES="all" ARCHITECTURES="all"

View File

@@ -0,0 +1,32 @@
From 539760544d05f4e17dabdccda61e2467e15e30c0 Mon Sep 17 00:00:00 2001
From: Peter van Dijk <peter@7bits.nl>
Date: Tue, 20 May 2025 21:35:09 +0200
Subject: Haiku clipboard support
diff --git a/src/password-store.sh b/src/password-store.sh
index a0dcf2e..0a34c43 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -155,6 +155,9 @@ check_sneaky_paths() {
#
clip() {
+ local copy_cmd=( clipboard -i )
+ local paste_cmd=( echo -n $(clipboard -p) )
+ local display_name="Haiku"
if [[ -n $WAYLAND_DISPLAY ]]; then
local copy_cmd=( wl-copy )
local paste_cmd=( wl-paste -n )
@@ -168,7 +171,7 @@ clip() {
local paste_cmd=( xclip -o -selection "$X_SELECTION" )
local display_name="$DISPLAY"
else
- die "Error: No X11 or Wayland display detected"
+ : # die "Error: No X11 or Wayland display detected"
fi
local sleep_argv0="password store sleep on display $display_name"
--
2.48.1