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 Just in case I want to play with lua again:
33 if which luarocks-5.3 >/dev/null 2>&1; then
34 eval "$(luarocks-5.3 path --bin)"
35 fi
37 ksh doesn't have a "default" configuration file (like ~/.zshrc or
38 ~/.bashrc); instead, if called interactively, it loads the file pointed
39 by ENV. Tell ksh to load ~/.kshrc then
41 export ENV=$HOME/.kshrc
43 An UTF-8 locale is mandatory. I'm using en_US even if english is not my
44 main language:
46 export LANG=en_US.UTF-8
48 Got is quickly becoming my favourite version control system. It should
49 be able to load the author data from a config file, but I still keep
50 this variable, just in case :)
52 export GOT_AUTHOR="Omar Polo <op@omarpolo.com>"
54 Sometimes I need to do stuff with Docker. I have a virtual machine
55 running alpine with docker configured and this bit here will allow
56 docker-cli to transparently talk to the VM:
58 export DOCKER_HOST=ssh://op@100.64.2.3:22
60 I like to use mg as my default editor but under vterm is a bit of a pain
61 because emacs keeps eating up all the various C-c and C-x keys. Thus,
62 switch back to vi when INSIDE_EMACS (which sounds strange, I know)
64 if [ -z "$INSIDE_EMACS" ]; then
65 VISUAL=mg
66 EDITOR=mg
67 else
68 VISUAL=vi
69 EDITOR=vi
70 fi
72 export VISUAL EDITOR
74 less(1) should be the default pager pretty most everywhere, but ensure
75 that!
77 export MANPAGER=less
79 I've found a cool pager for postgresql, pspg. It's designed explicitly
80 for tabular data. Extra points for having some cool light themes! Tao
81 light theme (number 20) is my favourite.
83 export PSQL_PAGER='pspg -s20'
85 I'm using reposync to manage my local clone of the OpenBSD source tree.
86 Technically this isn't needed, because /home/ports is already a checkout
87 from /home/cvs, but anyway...
89 export CVSROOT=/home/cvs
91 This is just to make some command outputs a little bit nicer:
93 export BLOCKSIZE=1m
95 I don't particularly like coloured outputs when I'm in front of a
96 terminal, so I tend to disable them:
98 export NO_COLOR='yes, please'
99 export CMAKE_COLOR_MAKEFILE=OFF
100 export WG_COLOR_MODE=never
101 export AV_LOG_FORCE_NOCOLOR='fuck yes'
103 ...as an exception I'm trying to enable colors in tog(1) (cautiously!)
104 and see how it goes:
106 export TOG_COLORS=yes
107 export TOG_COLOR_DIFF_MINUS=magenta
108 export TOG_COLOR_DIFF_PLUS=blue
109 export TOG_COLOR_DIFF_CHUNK_HEADER=green
110 export TOG_COLOR_DIFF_META=default
111 export TOG_COLOR_COMMIT=default
112 export TOG_COLOR_AUTHOR=default
113 export TOG_COLOR_DATE=default
114 export TOG_COLOR_REFS_REMOTES=red
116 some other tweaks for tog
118 export TOG_DIFF_ALGORITHM=patience
119 export TOG_VIEW_SPLIT_MODE=h
121 mblaze uses quoted-printable if there are lines longer than 78 character
122 or so. if $MBLAZE_RELAXED_MIME is specified tho, it will only do so if
123 it founds lines longer than 998 characters, allowing me to send diffs
124 without mangling!
126 export MBLAZE_RELAXED_MIME=1
128 On OpenBSD, automake and autoconf requires these variables to be up to
129 work. Otherwise one can run automake-X.Y and autoconf-X.Y, but that's
130 ugly:
132 export AUTOCONF_VERSION=2.71
133 export AUTOMAKE_VERSION=1.16
135 Finally, load the specific profile for this machine if it exists:
137 if [ -f "$HOME/.profile-local" ]; then
138 . "$HOME/.profile-local"
139 fi