Blob


1 # profile
3 I don't know how "portable" a .profile can be, but let's try!
5 Althought I'm not using acme as my go-to text editor program, I still
6 like to use it and have the rest of the plan9ports at hand.
8 I manually fetched and installed the ports in /usr/local/plan9, and need
9 to define $PLAN9 in order for the various tooling to work.
11 PLAN9=/usr/local/plan9
12 export PLAN9
14 I tend to have an abnormal $PATH
16 PATH=$HOME/bin:$HOME/opt/emacs/bin:$HOME/opt/gcc10/bin:$HOME/go/bin:$HOME/opt/unnethack/bin:$HOME/.local/bin:$HOME/.node_modules/bin:/home/ports/infrastructure/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:/usr/local/jdk-11/bin:$PLAN9/bin
18 Let's split it:
20 * $HOME/bin is for my personal scripts, needs to take precedence over anything else
21 * $HOME/opt/* contains various stuff I compile from source, like Emacs
22 * $HOME/.local/bin is XDG stuff I'm practically forced to use
23 * $HOME/.node_modules/bin is for node
24 * /usr/ports/infrastructure/bin is for handy port tools
25 * the rest is just the usual $PATH on OpenBSD with java and plan9 pushed at the end
27 Tell npm to install things globally in the right directory
29 export npm_config_prefix=~/.node_modules
31 ksh doesn't have a "default" configuration file (like ~/.zshrc or
32 ~/.bashrc); instead, if called interactively, it loads the file pointed
33 by ENV. Tell ksh to load ~/.kshrc then
35 export ENV=$HOME/.kshrc
37 An UTF-8 locale is mandatory. I'm using en_US even if english is not my
38 main language:
40 export LANG=en_US.UTF-8
42 Got is quickly becoming my favourite version control system. It should
43 be able to load the author data from a config file, but I still keep
44 this variable, just in case :)
46 export GOT_AUTHOR="Omar Polo <op@omarpolo.com>"
48 Sometimes I need to do stuff with Docker. I have a virtual machine
49 running alpine with docker configured and this bit here will allow
50 docker-cli to transparently talk to the VM:
52 export DOCKER_HOST=ssh://op@100.64.2.3:22
54 I like to use mg as my default editor but under vterm is a bit of a pain
55 because emacs keeps eating up all the various C-c and C-x keys. Thus,
56 switch back to vi when INSIDE_EMACS (which sounds strange, I know)
58 if [ -z "$INSIDE_EMACS" ]; then
59 VISUAL=mg
60 EDITOR=mg
61 else
62 VISUAL=vi
63 EDITOR=vi
64 fi
66 export VISUAL EDITOR
68 less(1) should be the default pager pretty most everywhere, but ensure
69 that!
71 export MANPAGER=less
73 I've found a cool pager for postgresql, pspg. It's designed explicitly
74 for tabular data. Extra points for having some cool light themes! Tao
75 light theme (number 20) is my favourite.
77 export PSQL_PAGER='pspg -s20'
79 I'm using reposync to manage my local clone of the OpenBSD source tree.
80 Technically this isn't needed, because /home/ports is already a checkout
81 from /home/cvs, but anyway...
83 export CVSROOT=/home/cvs
85 This is just to make some command outputs a little bit nicer:
87 export BLOCKSIZE=1m
89 I don't particularly like coloured outputs when I'm in front of a
90 terminal, so I tend to disable them:
92 export NO_COLOR='yes, please'
93 export CMAKE_COLOR_MAKEFILE=OFF
94 export WG_COLOR_MODE=never
95 export AV_LOG_FORCE_NOCOLOR='fuck yes'
97 ...as an exception I'm trying to enable colors in tog(1) (cautiously!)
98 and see how it goes:
100 export TOG_COLORS=yes
101 export TOG_COLOR_DIFF_MINUS=magenta
102 export TOG_COLOR_DIFF_PLUS=blue
103 export TOG_COLOR_DIFF_CHUNK_HEADER=green
104 export TOG_COLOR_DIFF_META=default
105 export TOG_COLOR_COMMIT=default
106 export TOG_COLOR_AUTHOR=default
107 export TOG_COLOR_DATE=default
108 export TOG_COLOR_REFS_REMOTES=red
110 some other tweaks for tog
112 export TOG_DIFF_ALGORITHM=patience
113 export TOG_VIEW_SPLIT_MODE=h
115 mblaze uses quoted-printable if there are lines longer than 78 character
116 or so. if $MBLAZE_RELAXED_MIME is specified tho, it will only do so if
117 it founds lines longer than 998 characters, allowing me to send diffs
118 without mangling!
120 export MBLAZE_RELAXED_MIME=1
122 On OpenBSD, automake and autoconf requires these variables to be up to
123 work. Otherwise one can run automake-X.Y and autoconf-X.Y, but that's
124 ugly:
126 export AUTOCONF_VERSION=2.71
127 export AUTOMAKE_VERSION=1.16
129 Finally, load the specific profile for this machine if it exists:
131 if [ -f "$HOME/.profile-local" ]; then
132 . "$HOME/.profile-local"
133 fi