shithub: riow

Download patch

ref: 112687f2970b447c8421ef4c12629af847194b10
parent: 6c86354713d55ecdb7540ca91df17ae0e0a27068
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sun Mar 29 20:47:55 EDT 2020

remember current window on each desktop

--- a/riow
+++ b/riow
@@ -57,6 +57,8 @@
 			if not {
 				# go through all visible windows
 				if(~ $a(6) visible){
+					if(~ $a(5) current)
+						echo -n $f >/env/windeskcur_^$curdesktop
 					if(~ $#windesk 0){ # no desktop and visible
 						# assign to the current one
 						echo -n $curdesktop >/env/windesk_^$winid
@@ -71,8 +73,11 @@
 			}
 		}
 	}
-	if(~ $shift 0)
+	if(~ $shift 0){
+		if(test -f /env/windeskcur_^$1)
+			echo current >`{cat /env/windeskcur_^$1}^/wctl
 		curdesktop=$1
+	}
 }
 
 fn handle {