shithub: ninethings

Download patch

ref: a9e1b0c70bb01a0cf0ef1fec5a480668703b49a8
parent: 58def1b6b397519cca5cd753fec20c102f9cdcc9
author: Aaron Bieber <[email protected]>
date: Wed Nov 8 13:48:11 EST 2023

+profile

--- /dev/null
+++ b/profile
@@ -1,0 +1,60 @@
+bind -qa $home/bin/rc /bin
+bind -qa $home/bin/$cputype /bin
+
+upasname='[email protected]'
+
+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
+}
+
+switch($service){
+case terminal
+	truetypefs
+	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% ' '	')
+}