shithub: ninethings

ref: 3e8831a56c04e4c464b42956a5e2211a67afda7b
dir: /profile/

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

upasname='aaron@bolddaemon.com'

mouse_opts=(accelerated 'res 3' 'blanktime 5')

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

	webcookies
	webfs
	plumber

	for(o in $mouse_opts) echo -n $o >'#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% ' '	')
}