]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Fixes sclip and adds XDOTOOL_NEXT_WINDOW config
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 19 Dec 2016 14:02:48 +0000 (12:02 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 19 Dec 2016 14:02:48 +0000 (12:02 -0200)
lib/keyringer/actions/sclip

index e4c88fa79161be8de034ab4c26ec2d90f9a2523f..a941fd075f119477ad4a45fc4e054c1c19ca41d9 100755 (executable)
@@ -11,13 +11,18 @@ source "$LIB" || exit 1
 shift
 keyringer $KEYRING xclip $*
 
+# Se window switch combo
+if [ -z "$XDOTOOL_NEXT_WINDOW" ]; then
+  XDOTOOL_NEXT_WINDOW="alt+Tab"
+fi
+
 # Move to the next window
 if which xdotool &> /dev/null; then
-  xdotool key alt+Tab
+  xdotool key $XDOTOOL_NEXT_WINDOW
 fi
 
 # Sleep
 sleep 5
 
 # Overwrite clipboard
-cat $RANDOM | sha256sum | base64 -d | xclip
+echo $RANDOM | sha256sum | base64 -d | xclip