config

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

commit 66f347c1096d8bdff98801070cbf58cba4641054
parent 41faf1dd62abdf14b7ad56c8c64fb80ff2f10ae7
Author: Jacob R. Edwards <n/a>
Date:   Wed, 17 Nov 2021 01:44:13 -0800

Update rc profile style and organization

Diffstat:
Mlocal/rc/lib/profile | 42+++++++++++++++++++++++-------------------
1 file changed, 23 insertions(+), 19 deletions(-)

diff --git a/local/rc/lib/profile b/local/rc/lib/profile @@ -1,14 +1,20 @@ -# rc profile +# Rc Profile -PLAN9 = /usr/local/plan9 +# General Variables +if (~ $#PLAN9 0) + PLAN9 = /usr/local/plan9 font = $PLAN9/font/misc/unicode.6x13.font -path = (. $home/bin /bin /sbin /usr/^(bin sbin)\ - /usr/local/^(bin sbin) $PLAN9/bin /usr/X11R6/bin) +path = (. $home/bin /bin /sbin /usr/^(bin sbin) /usr/local/^(bin sbin) \ + ($PLAN9 /usr/X11R6)^/bin) + + +# Rc or Function Variables prompt = ('; ' ' ') ifs = ' ' +dirlog = $home/log/dir -# Programs +# Program Preferences BROWSER = dillo CC = tcc EDITOR = sam @@ -18,18 +24,16 @@ TERMINAL = 9term VISUAL = $EDITOR # XDG Directories -XDG_CACHE_HOME = $home/local/cache/ -XDG_CONFIG_HOME = $home/config/ -XDG_DATA_HOME = $home/local/share/ +XDG_CACHE_HOME = $home/local/cache +XDG_CONFIG_HOME = $home/config +XDG_DATA_HOME = $home/local/share -# Make +# Make Variables MAKEFLAGS = -e -MANPREFIX = /usr/local/man/ -PREFIX = /usr/local/ +MANPREFIX = /usr/local/man +PREFIX = /usr/local # Working Directory Functions -dirlog = $home/log/dir - fn cd { if (builtin cd $*) { if (flag i) { @@ -47,19 +51,16 @@ fn cdp { cd ''^`{ fgrep -vx `{ pwd } < $dirlog | tail -1 } } if (~ `{ uname } OpenBSD) { fn pa { doas pkg_add -x $* } fn pd { doas pkg_delete -x $* } - fn pf { pkg_locate $* } # package find/files + fn pf { pkg_locate $* } fn pi { pkg_info -q $* } fn pl { pkg_list $* } fn pr { pkg_root $* } fn pt { pkg_tree $* } } -# List Functions -fn fns { whatis `{ printenv | awk -F '[#=]' '/^fn#/ { print $2 }' } } - # Don't Wait for Various Programs -for (prog in acme dillo mupage mupdf page sam) - eval 'fn '^$prog^' { builtin '^$prog^' $* & }' +for (p in acme dillo mupage mupdf page sam) + eval 'fn '^$p^' { builtin '^$p^' $* & }' # Short and Simple fn f { $EDITOR $* } @@ -67,6 +68,9 @@ fn g { git $* } fn ls { 9 ls $* } fn rm { 9 rm $* } +# Etc. +fn fns { whatis `{ printenv | awk -F '[#=]' '/^fn#/ { print $2 }' } } + # Run Daemons with a Full Environment { aps && {