config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit edb28a6b7ba3bb53e9599d7b9e91fef08671d1de
parent f5c8aaff5c12ade4d410c6a18edfb3f44d84e399
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Sat, 21 Aug 2021 15:35:23 -0700

Switch to the rc(1) shell

Unfortunately rc(1) doesn't allow redundent flags rcl cannot pass
the 'i' flag or 9term will break since it adds the 'i' flag itself.
This means other terminals will not have a prompt, a better solution
will be added at some point.

Also lib/profile is only interpreted once at X startup. This might
change since you have to manually restore your X session if you
restart it.

Diffstat:
Alocal/bin/.local/bin/rcl | 7+++++++
Mlocal/ksh/.profile | 2+-
Mlocal/rc/lib/profile | 34+++++++++++++++++++++++++++++-----
Mlocal/xenodm/.config/xsession | 2+-
4 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/local/bin/.local/bin/rcl b/local/bin/.local/bin/rcl @@ -0,0 +1,7 @@ +#!/bin/sh -a +# Copyright 2021 Jacob R. Edwards +# License: GPLv3 + +history="${history:-$HOME/lib/history}" + +tee -a "$history" | exec "${PLAN9:-/usr/local/plan9}/bin/rc" "$@" diff --git a/local/ksh/.profile b/local/ksh/.profile @@ -9,7 +9,7 @@ export CC=tcc export EDITOR=sam export LOCKER=slock export PAGER=cat -export SHELL=ksh +export SHELL=rcl export TERMINAL=9term export VISUAL=$EDITOR diff --git a/local/rc/lib/profile b/local/rc/lib/profile @@ -2,13 +2,37 @@ flag -s -if (! printenv XDG_DATA_HOME >/dev/null) - XDG_DATA_HOME = $home/.local/share -wdlog = $XDG_DATA_HOME/cd +# programs +BROWSER = www +CC = tcc +EDITOR = sam +LOCKER = slock +PAGER = cat +SHELL = rcl +TERMINAL = 9term +VISUAL = $EDITOR + +# XDG directories +XDG_CACHE_HOME = $home/local/cache/ +XDG_CONFIG_HOME = $home/local/config/ +XDG_DATA_HOME = $home/local/share/ + +# make(1) +MAKEFLAGS = -e +MANPREFIX = /usr/local/man/ +PREFIX = /usr/local/ + +# etc +PLAN9 = /usr/local/plan9/ +path = ($home/local/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin\ + /usr/local/sbin /usr/X11R6/bin /usr/games $PLAN9/bin $PLAN9/bin/fs) +font = $PLAN9/font/misc/unicode.6x13.font +dirlog = $XDG_DATA_HOME/cd +prompt = '; ' # cd -fn cd { builtin cd $* && pwd >>$wdlog } -fn cdl { uniq <$wdlog | stest -d } +fn cd { builtin cd $* && pwd >>$dirlog } +fn cdl { uniq <$dirlog | stest -d } fn cdr { cd `{ cdl | egrep $* | tail -1 } } fn cds { cd `{ pwd | sed s.$1.$2.g } } diff --git a/local/xenodm/.config/xsession b/local/xenodm/.config/xsession @@ -10,4 +10,4 @@ bg xbanish bg xmodmap "${XDG_CONFIG_HOME:-$HOME/.config}/xmodmaprc" bg xrdb -load "${XDG_CONFIG_HOME:-$HOME/.config}/Xresources" bg xset dpms 360 600 960 r rate 250 30 s 0 b 0 0 0 m 3 1 -exec dwm 2>&1 >"${XDG_DATA_HOME:-$HOME/.local/share}/dwm" +exec rc -lc "dwm >[1=2] >'${XDG_DATA_HOME:-$HOME/.local/share}/dwm'"