shithub: riow

Download patch

ref: 30a8847db8aed5cc6fcb75fc563aa52f12a93d62
parent: 3e85a5601786c3fee1e1f959f510ab8224ad025e
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Tue Apr 7 21:02:52 EDT 2020

partially revert the prev commit

--- a/riow
+++ b/riow
@@ -56,15 +56,6 @@
 			echo -n $winid >/env/windeskcur_^$curdesktop
 		if not
 			rm -f /env/windeskcur_^$curdesktop
-
-		# show current window right away
-		if(test -f /env/windeskcur_^$1){
-			winid=`{cat /env/windeskcur_^$1}
-			if(test -f /dev/wsys/^$winid && test -f /env/windesk_^$winid && ~ `{cat /env/windesk_^$winid} $1){
-				echo unhide >/dev/wsys/^$winid^/wctl
-				echo current >/dev/wsys/^$winid^/wctl
-			}
-		}
 	}
 
 	hide=()
@@ -103,8 +94,14 @@
 			}
 		}
 	}
-	if(~ $shift 0)
+	if(~ $shift 0){
+		if(test -f /env/windeskcur_^$1){
+			winid=`{cat /env/windeskcur_^$1}
+			if(test -d /dev/wsys/^$winid && test -f /env/windesk_^$winid && ~ `{cat /env/windesk_^$winid} $1)
+				echo current >/dev/wsys/^$winid^/wctl
+		}
 		curdesktop=$1
+	}
 	for(w in $hide)
 		echo hide >$w
 }