ref: 4e4a6d321cde14dc730f9e8a80b7ab94238ff616
author: Jacobo Da Riva Muñoz <jdrm@disroot.org>
date: Sat Feb 5 07:46:11 EST 2022
Initial commit
--- /dev/null
+++ b/acme/Slide
@@ -1,0 +1,8 @@
+#!/bin/rc
+# Tanto este script como Slide+ y Slide- son una
+# adaptación del ejemplo visto es
+# https://pspodcasting.net/dan/blog/2019/plan9_desktop.html
+
+echo 'name '`{pwd}^/$1'' > /mnt/acme/$winid/ctl
+echo clean > /mnt/acme/$winid/ctl
+echo get > /mnt/acme/$winid/ctl
--- /dev/null
+++ b/acme/Slide+
@@ -1,0 +1,9 @@
+#!/bin/rc
+
+page=`{echo `{basename $%} +1 | hoc}
+if(! test -f $page) {
+ echo no such page
+ exit 0
+}
+
+Slide $page
--- /dev/null
+++ b/acme/Slide-
@@ -1,0 +1,9 @@
+#!/bin/rc
+
+page=`{echo `{basename $%} -1 | hoc}
+if(! test -f $page) {
+ echo no such page
+ exit 0
+}
+
+Slide $page
--- /dev/null
+++ b/install/rioTheming
@@ -1,0 +1,17 @@
+#!/bin/rc
+
+if(~ $#* 0){
+ echo 'Usage: rioTheming install|uninstall'
+}
+
+bind -ac /dist/plan9front /
+cd /sys/src/cmd/rio
+switch($1){
+case 'install'
+ hget https://ftrv.se/_/9/patches/rio-themes.patch | ape/patch -p5
+ mk install
+case 'uninstall'
+ git/revert .
+ rm -f *.rej *.orig menuhit.c col.h
+ mk install
+}
\ No newline at end of file
--- /dev/null
+++ b/lib/themes/rio/default
@@ -1,0 +1,19 @@
+rioback 777777
+back ffffff
+high cccccc
+border 999999
+text 000000
+htext 000000
+title 55aaaa
+ltitle 9eeeee
+hold 000099
+lhold 005dbb
+palehold 4993dd
+paletext 666666
+size ff0000
+menubar 448844
+menuback eaffea
+menuhigh 448844
+menubord 88cc88
+menutext 000000
+menuhtext eaffea
\ No newline at end of file
--- /dev/null
+++ b/lib/themes/rio/mytheme
@@ -1,0 +1,19 @@
+rioback /usr/glenda/img/apotd_011.img
+back e2e8e8
+high abb7ba
+border abb7ba
+text 000000
+htext 000000
+title 8795bf
+ltitle 4f5165
+hold cd664d
+lhold d49b82
+palehold d49b82
+paletext 75878f
+size cd664e
+menubar 846d21
+menuback e2e8e8
+menuhigh cd664d
+menubord cd664d
+menutext 000000
+menuhtext 000000
--- /dev/null
+++ b/util/riostart
@@ -1,0 +1,10 @@
+#!/bin/rc
+window 0,0,170,200 stats -lmwIisce
+window 0,200,100,550 winwatch -e '^(cat|winwatch|stats|faces|vol)'
+window 0,550,100,600 vol
+window 170,0,600,117 faces -i
+window -hide 'cat /dev/kprint'
+auth/fgui
+
+# run a system shell on the serial console
+~ $#console 0 || window -scroll console
--- /dev/null
+++ b/util/savehist
@@ -1,0 +1,14 @@
+#!/bin/rc
+# savehist - prune and save command history
+# usage: savehist
+
+rfork ne
+temp=/tmp/quit-$pid
+hist=$home/lib/text
+touch $hist
+#sigexit{ rm -f $temp }
+
+grep 'term% ' /dev/text > $temp
+cat $temp $hist | sort | uniq > /tmp/TMP-$pid
+mv /tmp/TMP-$pid $hist
+rm -f $temp
--- /dev/null
+++ b/util/theme
@@ -1,0 +1,18 @@
+#!/bin/rc
+
+if(~ $#* 0){
+ echo 'Usage: theme [ls|set theme]'
+}
+
+comm=$1
+
+switch($comm){
+
+case 'ls'
+ lc $home/lib/themes/rio/
+case 'set'
+ theme=$2
+
+ cat $home/lib/themes/rio/$theme > /dev/theme
+ grep softscreen /dev/vgactl >> /dev/vgactl
+}
--- /dev/null
+++ b/util/wifi
@@ -1,0 +1,22 @@
+#!/bin/rc
+rfork e
+fn Ask{
+ echo -n $1
+ essid=`{dd -bs 64 -count 1 >[2]/dev/null}
+}
+
+if(test -e /net/ether1)
+ echo "/net/ether1 exists"
+if not
+ bind -a '#l1' /net
+
+if(~ $#* 0){
+ echo "Wifis disponibles"
+ grep node '#'l1/ether1/ifstats
+ echo
+ Ask 'essid='
+}
+
+aux/wpa -s $essid -p /net/ether1
+ip/ipconfig ether /net/ether1
+cat /net/ndb