lockbox

password manager
Log | Files | Refs | README | LICENSE

commit 9dc4f7ea1cefd7d96357309fa063774c22b19d59
parent 49bc1e19dbeb783d0e0add0a3cbb114e71e0cf33
Author: Sean Enck <sean@ttypty.com>
Date:   Sun, 12 Dec 2021 18:05:39 -0500

Detection fixups for X

Diffstat:
Minternal/clip.go | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/internal/clip.go b/internal/clip.go @@ -31,6 +31,9 @@ func GetClipboardCommand() ([]string, []string, error) { env = pbClipMode case "Linux": if strings.TrimSpace(os.Getenv("WAYLAND_DISPLAY")) == "" { + if strings.TrimSpace(os.Getenv("DISPLAY")) == "" { + return nil, nil, stock.NewBasicError("unable to detect clipboard mode") + } env = xClipMode } else { env = waylandClipMode @@ -90,5 +93,4 @@ func pipeTo(command, value string, wait bool, args ...string) { if ran != nil { stock.Die("failed to run command", ran) } - }