From 987cabb841a57ccc58727253c6b1dc1048f96c3c Mon Sep 17 00:00:00 2001 From: druckdev Date: Mon, 19 Apr 2021 18:17:36 +0200 Subject: [PATCH] bin:zoom-links: Only copy if browser opened Do not overwrite the link in the clipboard if nothing opened. --- .local/bin/zoom-links | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/zoom-links b/.local/bin/zoom-links index 5d481f7..c5c55b6 100755 --- a/.local/bin/zoom-links +++ b/.local/bin/zoom-links @@ -23,5 +23,5 @@ echo "$1" | grep -Eq "^https://tu-berlin.zoom.us/(j|wc/join)/[0-9]*\?pwd=.+" || link="$(echo "${1%?pwd=*}" | sed 's_/j/_/wc/join/_')" # Open link in private browser firefox --no-remote -P zoom --private-window "$link" >/dev/null 2>&1 & -# Put password in clipboard -echo -n "${1##*pwd=}" | xclip -selection c +# Put password in clipboard if successful +(( $? )) || echo -n "${1##*pwd=}" | xclip -selection c