Blame


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