commit 391d141f7f3da23cf85feb203ceb018f446b9de0
parent 9dc4f7ea1cefd7d96357309fa063774c22b19d59
Author: Sean Enck <sean@ttypty.com>
Date: Sun, 12 Dec 2021 18:17:44 -0500
reuse clipmode
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/cmd/lb-bash/completions.bash b/cmd/lb-bash/completions.bash
@@ -11,8 +11,8 @@ _is_clip() {
_lb() {
local cur opts clip_enabled
clip_enabled=" -c clip"
- if [ -n "$LOCKBOX_NOCLIP" ]; then
- if [ "$LOCKBOX_NOCLIP" == "yes" ]; then
+ if [ -n "$LOCKBOX_CLIPMODE" ]; then
+ if [ "$LOCKBOX_CLIPMODE" == "off" ]; then
clip_enabled=""
fi
fi
diff --git a/internal/clip.go b/internal/clip.go
@@ -49,6 +49,8 @@ func GetClipboardCommand() ([]string, []string, error) {
return []string{"xclip"}, []string{"xclip", "-o"}, nil
case waylandClipMode:
return []string{"wl-copy"}, []string{"wl-paste"}, nil
+ case "off":
+ return nil, nil, stock.NewBasicError("clipboard is turned off")
}
return nil, nil, stock.NewBasicError("unable to get clipboard command(s)")
}