shithub: ninethings

ref: f5270cc29ed8b3336d0623ad3458acac20692626
dir: /profile/

View raw version
bind -qa $home/bin/rc /bin
bind -qa $home/bin/$cputype /bin

upasname='aaron@bolddaemon.com'

go_version=1.21.3
go_path=/sys/lib/go/$objtype-$go_version
if(test -d $go_path){
	GOROOT=$go_path
	bind -b $go_path/bin /bin
}

font=/lib/font/bit/vga/unicode.font
if(test -d /lib/font/bit/Go-Mono){
	truetypefs
	font=/lib/font/bit/Go-Mono/Go-Mono.14.font
}

machine=`{echo $terminal | awk -F/ '{print $5}'}

switch($service){
case terminal
	truetypefs

	if(! ~ $machine 'imx8')
		aux/acpi
	
	auth/factotum
	webcookies
	webfs
	plumber
	echo -n accelerated > '#m/mousectl'
	echo -n 'res 3' > '#m/mousectl'
	prompt=('% ' '	')
	fn term%{ $* }
	rio -i riostart
case cpu
	bind /mnt/term/dev/cons /dev/cons
	bind -q /mnt/term/dev/consctl /dev/consctl
	>[2] /dev/null {
		cp /dev/sysname /mnt/term/dev/label
		if(wsys=`{cat /mnt/term/env/wsys})
			wsys=/mnt/term^$wsys
	} 
	bind -a /mnt/term/dev /dev
	prompt=('cpu% ' '	')
	fn cpu%{ $* }
	if(! test -e /mnt/term/dev/wsys){
		# call from drawterm
		if(test -e /mnt/term/dev/secstore){
			auth/factotum -n
			read -m /mnt/term/dev/secstore >/mnt/factotum/ctl
			echo >/mnt/term/dev/secstore
		}
		if not
			auth/factotum
		truetypefs
		webcookies
		webfs
		plumber
		rio -i riostart
	}
case con
	prompt=('cpu% ' '	')
}