summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2014-03-22 13:06:20 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2014-03-22 13:06:20 -0600
commiteccbf87dd710982fa0d681bfdbb2a892e28e7e22 (patch)
treedd23b74c7d52ed79210e7d03e6895e3ea09894d7
parent85c48b6ac41d58abc5fae1c24b0f9616f2ea0cbf (diff)
downloadpass-eccbf87dd710982fa0d681bfdbb2a892e28e7e22.tar.gz
pass-eccbf87dd710982fa0d681bfdbb2a892e28e7e22.tar.bz2
pass-eccbf87dd710982fa0d681bfdbb2a892e28e7e22.zip
clip: rename SELECTION to X_SELECTION
-rw-r--r--man/pass.12
-rwxr-xr-xsrc/password-store.sh10
2 files changed, 6 insertions, 6 deletions
diff --git a/man/pass.1 b/man/pass.1
index c48de1b..c09e228 100644
--- a/man/pass.1
+++ b/man/pass.1
@@ -350,7 +350,7 @@ Overrides the default root of the git repository, which is helpful if
\fIPASSWORD_STORE_DIR\fP is temporarily set to a sub-directory of the default
password store.
.TP
-.I PASSWORD_STORE_SELECTION
+.I PASSWORD_STORE_X_SELECTION
Overrides the selection passed to \fBxclip\fP, by default \fIclipboard\fP. See
.BR xclip (1)
for more info.
diff --git a/src/password-store.sh b/src/password-store.sh
index 3a6cbc9..5b5d36e 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -7,7 +7,7 @@ umask 077
GPG_OPTS="--quiet --yes --batch --compress-algo=none"
PREFIX="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
-SELECTION="${PASSWORD_STORE_SELECTION:-clipboard}"
+X_SELECTION="${PASSWORD_STORE_X_SELECTION:-clipboard}"
CLIP_TIME="${PASSWORD_STORE_CLIP_TIME:-45}"
export GIT_DIR="${PASSWORD_STORE_GIT:-$PREFIX}/.git"
export GIT_WORK_TREE="${PASSWORD_STORE_GIT:-$PREFIX}"
@@ -118,11 +118,11 @@ clip() {
sleep_argv0="password store sleep on display $DISPLAY"
pkill -f "^$sleep_argv0" 2>/dev/null && sleep 0.1
- before="$(xclip -o -selection "$SELECTION" | base64)"
- echo -n "$1" | xclip -selection "$SELECTION"
+ before="$(xclip -o -selection "$X_SELECTION" | base64)"
+ echo -n "$1" | xclip -selection "$X_SELECTION"
(
( exec -a "$sleep_argv0" sleep "$CLIP_TIME" )
- now="$(xclip -o -selection "$SELECTION" | base64)"
+ now="$(xclip -o -selection "$X_SELECTION" | base64)"
[[ $now != $(echo -n "$1" | base64) ]] && before="$now"
# It might be nice to programatically check to see if klipper exists,
@@ -134,7 +134,7 @@ clip() {
# so we axe it here:
qdbus org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory &>/dev/null
- echo "$before" | base64 -d | xclip -selection "$SELECTION"
+ echo "$before" | base64 -d | xclip -selection "$X_SELECTION"
) 2>/dev/null & disown
echo "Copied $2 to clipboard. Will clear in $CLIP_TIME seconds."
}
mpletion fileChristophe Fergeau1-1/+1 2012-09-06Update COPYING to reflect man page and project page.1.1.2Jason A. Donenfeld1-10/+11 2012-09-06Use BINDIR, MANDIR and SYSCONFDIR vars in MakefileChristophe Fergeau1-5/+8 2012-09-06Add dependencies to README.Jason A. Donenfeld1-0/+8 2012-09-06Change debian name.Jason A. Donenfeld5-5/+4 2012-09-06Use more normal sleep variant.1.1.1Jason A. Donenfeld1-1/+1 2012-09-06Use --noreport instead of head -n -2 for tree so that it works on mac.Jason A. Donenfeld1-1/+1 2012-09-05Be sure to explicitly state that install is a phony target.Jason A. Donenfeld1-0/+2 2012-09-05Bump debian version horribly.1.1Jason A. Donenfeld2-2/+2 2012-09-04No echo mode.Jason A. Donenfeld2-16/+42 2012-09-04Properly quote the path too.Jason A. Donenfeld1-1/+1 2012-09-04Allow passwords having spaces to go unbroken to the clipboard.Bernardo Freitas Paulo da Costa1-1/+1 2012-09-04Separate out the massive git example.Jason A. Donenfeld1-10/+14 2012-09-04Prepare for debianification.1.0Jason A. Donenfeld9-4/+60 2012-09-03Fix readme typo.Jason A. Donenfeld1-1/+1 2012-09-03Show program name properly in error message.Jason A. Donenfeld1-1/+1 2012-09-03Move examples into manpage.Jason A. Donenfeld4-93/+224 2012-09-03Make into a real project.Jason A. Donenfeld8-5/+173 2012-09-03Support pass gitJason A. Donenfeld2-1/+15 2012-08-31Add remove synonyms.Jason A. Donenfeld1-2/+2 2012-08-31Use basename in usage.Jason A. Donenfeld1-2/+1 2012-08-19now using gpg_id as a varMatthew Ramirez1-2/+2 2012-08-07Forty five seconds.Jason A. Donenfeld1-1/+1 2012-08-06Deal with klipper and new lines.Jason A. Donenfeld1-3/+19 2012-08-06Update examples.Jason A. Donenfeld1-7/+7 2012-08-06Update readme.Jason A. Donenfeld1-11/+13 2012-08-06Be slicker and more like git.Jason A. Donenfeld1-114/+173