hlfw.ca

hwwm

Download patch

ref: 4092c8180df20032a53f95f2eb078d2cae85070c
parent: 43eb744fa3594234b01dbf41837489f6224f4e99
author: Halfwit <michaelmisch1985@gmail.com>
date: Tue Apr 4 12:45:56 PDT 2017

Changes to make fullscreen work; wip

--- a/hwwm
+++ b/hwwm
@@ -3,18 +3,27 @@
 
 wew | while read -r ev; do
 	wid=`echo "$ev" | sed 's/.*://'`
-    case "$ev" in
-		18*) $DIR/wshuf | xargs -n 5 wtp
-			wtf `lsw | tail -n1`
+	fullscreen="$(watom `lsw -r` FS 2>/dev/null)"
+	case "$ev" in
+		# Unmap
+		18*)	if test -z $fullscreen; then 
+				$DIR/wshuf | xargs -n 5 wtp
+				wtf `lsw | tail -n1`
+			fi
 			$DIR/groupsbar           ;;
-		19*) $DIR/wshuf | xargs -n 5 wtp
-			$DIR/autotag "$wid"
-			wtf "$wid"
+		# Map
+		19*)	if test -z $fullscreen; then
+				$DIR/wshuf | xargs -n 5 wtp
+				$DIR/autotag "$wid"
+				wtf "$wid"
+			fi
 			$DIR/groupsbar           ;;
-		17*) wtf `lsw | tail -n1`
-			if watom `lsw -r` FS | grep "$wid"; then
-				xprop -root -remove FS
+		# Destroy
+		17*)	wtf `lsw | tail -n1`
+			if test -z $fullscreen; then
 				$DIR/wshuf | xargs -n 5 wtp
+			else
+				xprop -root -remove FS
 			fi
 			$DIR/groupsbar           ;;
 	esac