shithub: riow

Download patch

ref: f5998e74c6964a5118c1ab97038b38401f3e684f
parent: 7daab6308be2a52987b760d4141ed79b3a31bdbd
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Feb 22 04:48:24 EST 2021

curwindow: fix race condition

--- a/riow
+++ b/riow
@@ -28,11 +28,13 @@
 }
 
 fn curwindow {
+	cur=''
 	for(f in /dev/wsys/*){
 		a=`{winread $f}
 		if(~ $a(5) current)
-			basename $f
+			cur=`{basename $f}
 	}
+	echo -n $cur
 }
 
 fn togglefullscreen {