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