hlfw.ca

rc

ref: b83af1b4771da71841bc4f3a94f831d4d16a724e
dir: /wm/

View raw version
#!/bin/rc

aux/acpi
done=0

fn sigint {
	pid=`{cat /tmp/wm.pid}
	echo kill >/proc/$pid/ctl
}

mount /srv/plumb /mnt/plumb

touch /tmp/wm.proj /tmp/wm.pid
echo '○ │ ○ │  ○ │ ○ │ ○ │ ○' > /tmp/wm.tags
	
</dev/kbdtap ktrans -G | 9hkd -t  >/dev/kbdtap |[3] {
	{
		cat /mnt/plumb/notify | while(~ $done 0){
			cmd=`{read}
			port=`{read}
			usr=`{read}
			text=`{read}
			msg=`{read}
			echo $msg | sed 's/message=//; s/$/ │/' > /tmp/wm.proj
			tags=`{cat /tmp/wm.tags}
			proj=`{cat /tmp/wm.proj}
			echo $proj $tags
			ndata=`{read}
			data=`{read -c $ndata}
		} &
		echo $apid > /tmp/wm.pid

		# Plain pipe reads here
		while(tags=`{read}){
			proj=`{cat /tmp/wm.proj}
			echo $tags > /tmp/wm.tags
			echo $proj $tags
		}
		done=1
	}
}| bar -p bottom | dropbar