hlfw.ca

rc

ref: d40306334969a1b745b9c3ae273be0d66fe5deae
dir: /wm/

View raw version
#!/bin/rc

aux/acpi

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

fn sigkill {
	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(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
		}
		echo kill > /proc/$apid/ctl
	}
}| bar -p bottom | dropbar