dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit af12e50342289f5276ccc35222588cdaf61de8c7
parent 9aa917f77adef2bb3b7aaeee7cc57fa67be70a7f
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Wed, 25 Nov 2020 12:39:45 -0500

don't use rc shell; this is unix

Diffstat:
M.profile | 10++++++++--
M.xsession | 2+-
Metc/shrc | 12++++++++----
Dlib/profile | 40----------------------------------------
4 files changed, 17 insertions(+), 47 deletions(-)

diff --git a/.profile b/.profile @@ -2,7 +2,8 @@ PATH="$PATH:$HOME/bin"; export PATH HOSTNAME=$(hostname | cut -d. -f1); export HOSTNAME ENV="$HOME/etc/shrc"; export ENV LANG=en_US.UTF-8; export LANG -FCEDIT=$EDITOR; export FCEDIT +EDITOR=ed; export EDITOR +FCEDIT=ed; export FCEDIT XDG_CONFIG_HOME="$HOME/etc"; export XDG_CONFIG_HOME XDG_CACHE_HOME="$HOME/var/cache"; export XDG_CACHE_HOME XDG_DATA_HOME="$HOME/var"; export XDG_DATA_HOME @@ -12,11 +13,12 @@ TMPDIR="$HOME/tmp"; export TMPDIR case $HOSTNAME in carbon) + font=/lib/font/bit/lucsans/unicode.7.font; export font PLAN9=/usr/local/plan9; export PLAN9 PATH="$PATH:$PLAN9/bin"; export PATH BROWSER=w3m; export BROWSER WWW_HOME=https://www.danielmoch.com; export WWW_HOME - EDITOR=ed; export EDITOR + EDITOR=E; export EDITOR FCEDIT=$EDITOR; export FCEDIT unset SSH_AGENT_PID SSH_AUTH_SOCK=`gpgconf --list-dirs agent-ssh-socket`; export SSH_AUTH_SOCK @@ -30,5 +32,9 @@ case $HOSTNAME in MOZ_ACCELERATED=1; export MOZ_ACCELERATED XAUTHORITY="$XDG_CACHE_HOME/Xauthority"; export XAUTHORITY wsconsctl mouse.reverse_scrolling=1 >/dev/null + if [ "$(tty)" = "/dev/ttyC0" ] + then + startx + fi ;; esac diff --git a/.xsession b/.xsession @@ -12,4 +12,4 @@ xcompmgr & plumber & riostart & -exec rc -l rio +exec rio diff --git a/etc/shrc b/etc/shrc @@ -1,16 +1,20 @@ -set -o emacs - +unset HISTFILE case $TERM in st*|rxvt*|xterm*|tmux*) printf "\033]0;$LOGNAME@$HOSTNAME\007" ;; esac if [ "$termprog" = "9term" -o "$termprog" = "win" ] then + set +o emacs + set +o vi + set +m cd() { [ -z "$1" ] && set -- "$HOME" command cd "$1" && awd $HOSTNAME } awd $HOSTNAME +else + set -o emacs fi if type gpg-connect-agent > /dev/null 2>&1 @@ -21,8 +25,8 @@ fi if [ -n "$SSH_TTY" ] then - PS1="${HOSTNAME}\$(if [ \$(id -u) -ne 0 ]; then echo \$; else echo \#; fi) " + PS1=$HOSTNAME='; ' else - PS1="\$(if [ \$(id -u) -ne 0 ]; then echo \$; else echo \#; fi) " + PS1=':; ' fi export PS1 diff --git a/lib/profile b/lib/profile @@ -1,40 +0,0 @@ -fn addpath { - if(~ $PATH *^$1^*) {} - if not { - PATH=$PATH:$1 - } -} - -fn %{ $* } -font=/lib/font/bit/lucsans/unicode.7.font -addpath $home/bin -HOSTNAME=`{hostname | cut -d. -f1} -LANG=en_US.UTF-8 -XDG_CONFIG_HOME=$home/etc -XDG_CACHE_HOME=$home/var/cache -XDG_DATA_HOME=$home/var -PYTHONUSERBASE=$home -GOPATH=$home -TMPDIR=$home/tmp - -switch($HOSTNAME) { -case carbon - PLAN9=/usr/local/plan9 - addpath $PLAN9/bin - BROWSER=firefox-esr - EDITOR=E - PAGER=nobs - SSH_AGENT_PID=() - SSH_AUTH_SOCK=`{gpgconf --list-dirs agent-ssh-socket} - GPG_TTY=`{tty} - gpg-connect-agent updatestartuptty /bye >/dev/null >[2=1] - PKG_PATH=https://cdn.openbsd.org/pub/OpenBSD/snapshots/packages/amd64 - MOZ_ACCELERATED=1 - XAUTHORITY=$XDG_CACHE_HOME/Xauthority - wsconsctl mouse.reverse_scrolling=1 >/dev/null - if(~ $#DISPLAY 0) { - exec startx - } -} - -fn addpath