about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-07-29 17:04:24 -0500
committerCase Duckworth2022-07-29 17:04:24 -0500
commite6c35b7b14ba815b82a7377f16b06801d68700ce (patch)
tree4f8bee7f6d54e9641a5fb1a6cd5a40cadd944d54
parentUpdate link (diff)
downloadetc-e6c35b7b14ba815b82a7377f16b06801d68700ce.tar.gz
etc-e6c35b7b14ba815b82a7377f16b06801d68700ce.zip
bleh
-rw-r--r--bash/aliases.bash6
-rw-r--r--bash/functions.bash81
-rwxr-xr-xbootstrap.sh294
-rw-r--r--git/config104
-rw-r--r--profile/00_functions.sh5
-rw-r--r--profile/go.sh4
-rw-r--r--profile/infopath.sh4
-rw-r--r--profile/luarocks.sh2
-rw-r--r--profile/manpath.sh11
-rw-r--r--profile/ssh-agent.sh10
-rw-r--r--user-dirs.dirs6
11 files changed, 279 insertions, 248 deletions
diff --git a/bash/aliases.bash b/bash/aliases.bash index 7875574..7b5ed55 100644 --- a/bash/aliases.bash +++ b/bash/aliases.bash
@@ -27,3 +27,9 @@ alias rebash='source ~/.bash_profile'
27 27
28# Debugging 28# Debugging
29alias emacs_goddamnit='pushd ~/.emacs.d;emacs --debug-init;popd' 29alias emacs_goddamnit='pushd ~/.emacs.d;emacs --debug-init;popd'
30
31# other
32alias radio=radish
33if ! command -v fd >/dev/null 2>&1; then
34 alias fd=fdfind
35fi
diff --git a/bash/functions.bash b/bash/functions.bash index 98872f2..c5bcddb 100644 --- a/bash/functions.bash +++ b/bash/functions.bash
@@ -1,45 +1,62 @@
1# Functions 1# Functions
2 2
3memq() { # memq ITEM ARRAY 3memq() { # memq ITEM ARRAY
4 ## Test whether an ITEM is a member of ARRAY. 4 ## Test whether an ITEM is a member of ARRAY.
5 ## Pass ARRAY as ${ARRAY[@]}. 5 ## Pass ARRAY as ${ARRAY[@]}.
6 local e needle="$1"; shift 6 local e needle="$1"
7 for e; do 7 shift
8 [[ "$e" == "$needle" ]] && { 8 for e; do
9 return 0 9 [[ "$e" == "$needle" ]] && {
10 } 10 return 0
11 done 11 }
12 return 1 12 done
13 return 1
13} 14}
14 15
15rebashrc() { # rebashrc 16rebashrc() { # rebashrc
16 ## Reload ~/.bashrc 17 ## Reload ~/.bashrc
17 printf "Loading ~/.bashrc..." >&2 18 printf "Loading ~/.bashrc..." >&2
18 if source "$HOME/.bashrc"; then 19 if source "$HOME/.bashrc"; then
19 echo "OK." >&2 20 echo "OK." >&2
20 else 21 else
21 echo "ERROR!" >&2 22 echo "ERROR!" >&2
22 fi 23 fi
23} 24}
24 25
25first_which() { # first_which COMMAND... 26first_which() { # first_which COMMAND...
26 ## Return the fully-qualified path of the first COMMAND found in $PATH. 27 ## Return the fully-qualified path of the first COMMAND found in $PATH.
27 while :; do 28 while :; do
28 command -v "$1" && break 29 command -v "$1" && break
29 [ -z "$1" ] && return 1 30 [ -z "$1" ] && return 1
30 shift 31 shift
31 done 32 done
32} 33}
33 34
34please() { # please [COMMAND...] 35please() { # please [COMMAND...]
35 # if run without arguments, run the last command with 'sudo' (aka sudo !!) 36 # if run without arguments, run the last command with 'sudo' (aka sudo !!)
36 # if run WITH arguments, alias as sudo 37 # if run WITH arguments, alias as sudo
37 history -d -1 38 history -d -1
38 if [ -z "$1" ]; then 39 if [ -z "$1" ]; then
39 #set -- $(HISTTIMEFORMAT=$'\t' history 2 | sed 's/^.*\t//;q') 40 #set -- $(HISTTIMEFORMAT=$'\t' history 2 | sed 's/^.*\t//;q')
40 set -- $(fc -lnr | sed 1q) 41 set -- $(fc -lnr | sed 1q)
41 fi 42 fi
42 echo >&2 sudo "$@" 43 echo >&2 sudo "$@"
43 history -s sudo "$@" 44 history -s sudo "$@"
44 "${DEBUG:-false}" || sudo "$@" 45 "${DEBUG:-false}" || sudo "$@"
45} 46}
47
48mkcd() {
49 if [ $# -lt 1 ]; then
50 command cd
51 return
52 fi
53 if ! [ -d "$1" ]; then
54 read -p "$1 doesn't exist. Create (Y/n)? " yn
55 case "$yn" in
56 n* | N*) return 1 ;;
57 *) mkdir -p "$1" ;;
58 esac
59 fi
60 command cd "$1"
61}
62alias cd='mkcd '
diff --git a/bootstrap.sh b/bootstrap.sh index 12d0b9a..b0fcb87 100755 --- a/bootstrap.sh +++ b/bootstrap.sh
@@ -29,41 +29,41 @@
29### Main entry point 29### Main entry point
30 30
31main() { 31main() {
32 ## Sanity checking 32 ## Sanity checking
33 # Since bootstrap.sh does some naive path-mangling, let's show an error 33 # Since bootstrap.sh does some naive path-mangling, let's show an error
34 # if it's not run correctly. Yes, there are other ways to run a 34 # if it's not run correctly. Yes, there are other ways to run a
35 # script. But this script should ideally be run, like, one time. Also 35 # script. But this script should ideally be run, like, one time. Also
36 # you can obviously comment this out or change it if you know what 36 # you can obviously comment this out or change it if you know what
37 # you're doing! 37 # you're doing!
38 38
39 case "$0" in 39 case "$0" in
40 ./*) ;; # this is the way bootstrap.sh /should/ be run. 40 ./*) ;; # this is the way bootstrap.sh /should/ be run.
41 *) 41 *)
42 printf >&2 'Weird invocation! %s\n' "$*" 42 printf >&2 'Weird invocation! %s\n' "$*"
43 printf >&2 'Try: cd <bootstrap-dir>; ./bootstrap.sh\n' 43 printf >&2 'Try: cd <bootstrap-dir>; ./bootstrap.sh\n'
44 exit 127 44 exit 127
45 ;; 45 ;;
46 esac 46 esac
47 47
48 ## Variables 48 ## Variables
49 49
50 # option: -d/--dry-run 50 # option: -d/--dry-run
51 : "${BOOTSTRAP_ACTION:=link}" 51 : "${BOOTSTRAP_ACTION:=link}"
52 # option: -v/--verbose 52 # option: -v/--verbose
53 : "${BOOTSTRAP_DEBUG:=false}" 53 : "${BOOTSTRAP_DEBUG:=false}"
54 # option: -k/--keep-going 54 # option: -k/--keep-going
55 : "${BOOTSTRAP_QUIT_ON_ERROR:=true}" 55 : "${BOOTSTRAP_QUIT_ON_ERROR:=true}"
56 # option: -m/--manifest FILE 56 # option: -m/--manifest FILE
57 : "${BOOTSTRAP_MANIFEST_FILE:=bootstrap.manifest}" 57 : "${BOOTSTRAP_MANIFEST_FILE:=bootstrap.manifest}"
58 # option: -- (rest are passed to ln) 58 # option: -- (rest are passed to ln)
59 : "${BOOTSTRAP_LN_ARGS:=-s}" 59 : "${BOOTSTRAP_LN_ARGS:=-s}"
60 60
61 ## Handle command-line flags 61 ## Handle command-line flags
62 # Basically an easier way of setting the above variables. 62 # Basically an easier way of setting the above variables.
63 while [ -n "$1" ]; do 63 while [ -n "$1" ]; do
64 case "$1" in 64 case "$1" in
65 -h|--help) 65 -h | --help)
66 cat >&2 <<END_HELP 66 cat >&2 <<END_HELP
67Usage: ./bootstrap.sh [-d] [-v] [-k] [-m FILE] [-f] [-- LN_OPTS] 67Usage: ./bootstrap.sh [-d] [-v] [-k] [-m FILE] [-f] [-- LN_OPTS]
68OPTIONS: 68OPTIONS:
69 -d, --dry-run 69 -d, --dry-run
@@ -79,123 +79,123 @@ OPTIONS:
79 Default: bootstrap.manifest. 79 Default: bootstrap.manifest.
80 -- Signify end of options. The rest are passed to ln. 80 -- Signify end of options. The rest are passed to ln.
81END_HELP 81END_HELP
82 exit 82 exit
83 ;; 83 ;;
84 -d|--dry-run) 84 -d | --dry-run)
85 BOOTSTRAP_ACTION=print 85 BOOTSTRAP_ACTION=print
86 shift 1 86 shift 1
87 ;; 87 ;;
88 -v|--verbose) 88 -v | --verbose)
89 BOOTSTRAP_DEBUG=true 89 BOOTSTRAP_DEBUG=true
90 shift 1 90 shift 1
91 ;; 91 ;;
92 -k|--keep-going) 92 -k | --keep-going)
93 BOOTSTRAP_QUIT_ON_ERROR=false 93 BOOTSTRAP_QUIT_ON_ERROR=false
94 shift 1 94 shift 1
95 ;; 95 ;;
96 -m|--manifest) 96 -m | --manifest)
97 case "$2" in 97 case "$2" in
98 ''|-*) 98 '' | -*)
99 printf >&2 "Bad argument: '$2'" 99 printf >&2 "Bad argument: '$2'"
100 exit 129 100 exit 129
101 ;; 101 ;;
102 esac 102 esac
103 BOOTSTRAP_MANIFEST_FILE="$2" 103 BOOTSTRAP_MANIFEST_FILE="$2"
104 shift 2 104 shift 2
105 ;; 105 ;;
106 -f|--force) 106 -f | --force)
107 BOOTSTRAP_LN_ARGS="$BOOTSTRAP_LN_ARGS -f" 107 BOOTSTRAP_LN_ARGS="$BOOTSTRAP_LN_ARGS -f"
108 shift 1 108 shift 1
109 ;; 109 ;;
110 --) 110 --)
111 shift 1 111 shift 1
112 BOOTSTRAP_LN_ARGS="$@" 112 BOOTSTRAP_LN_ARGS="$@"
113 break 113 break
114 ;; 114 ;;
115 esac 115 esac
116 done 116 done
117 117
118 ## Main loop 118 ## Main loop
119 while IFS=' ' read -r source destination; do 119 while IFS=' ' read -r source destination; do
120 # Ignore lines beginning with '#' 120 # Ignore lines beginning with '#'
121 case "$source" in 121 case "$source" in
122 '#'*) 122 '#'*)
123 if "$BOOTSTRAP_DEBUG"; then 123 if "$BOOTSTRAP_DEBUG"; then
124 printf >&2 '%s %s\n' \ 124 printf >&2 '%s %s\n' \
125 "$source" "$destination" 125 "$source" "$destination"
126 fi 126 fi
127 continue 127 continue
128 ;; 128 ;;
129 esac 129 esac
130 130
131 # Ignore empty lines, or lines with only SOURCE or DESTINATION 131 # Ignore empty lines, or lines with only SOURCE or DESTINATION
132 if [ -z "$source" ] || [ -z "$destination" ]; then 132 if [ -z "$source" ] || [ -z "$destination" ]; then
133 if "$BOOTSTRAP_DEBUG"; then 133 if "$BOOTSTRAP_DEBUG"; then
134 printf >&2 'Skipping line: %s\t%s\n' \ 134 printf >&2 'Skipping line: %s\t%s\n' \
135 "$source" "$destination" 135 "$source" "$destination"
136 fi 136 fi
137 continue 137 continue
138 fi 138 fi
139 139
140 # Do the thing 140 # Do the thing
141 if ! dispatch "$source" "$destination"; then 141 if ! dispatch "$source" "$destination"; then
142 printf >&2 'ERROR: %s -> %s\n' \ 142 printf >&2 'ERROR: %s -> %s\n' \
143 "$source" "$destination" 143 "$source" "$destination"
144 if "$BOOTSTRAP_QUIT_ON_ERROR"; then 144 if "$BOOTSTRAP_QUIT_ON_ERROR"; then
145 exit "$dispatch_error" 145 exit "$dispatch_error"
146 fi 146 fi
147 fi 147 fi
148 done < "$BOOTSTRAP_MANIFEST_FILE" 148 done <"$BOOTSTRAP_MANIFEST_FILE"
149} 149}
150 150
151### Functions 151### Functions
152 152
153dispatch() { # dispatch SOURCE DESTINATION 153dispatch() { # dispatch SOURCE DESTINATION
154 # Depending on environment variables, do the linking or displaying or 154 # Depending on environment variables, do the linking or displaying or
155 # whatever of a source and a destination. 155 # whatever of a source and a destination.
156 156
157 ## Variables 157 ## Variables
158 158
159 src="$1" 159 src="$1"
160 dest="$2" 160 dest="$2"
161 dispatch_error=0 # success 161 dispatch_error=0 # success
162 162
163 ## Sanitize pathnames 163 ## Sanitize pathnames
164 164
165 # If the SOURCE starts with ~, /, or $, keep it as-is; otherwise, 165 # If the SOURCE starts with ~, /, or $, keep it as-is; otherwise,
166 # prepend "$PWD/". 166 # prepend "$PWD/".
167 case "$src" in 167 case "$src" in
168 '/'* | '~'* | '$'* ) ;; 168 '/'* | '~'* | '$'*) ;;
169 *) src="$PWD/$src" ;; 169 *) src="$PWD/$src" ;;
170 esac 170 esac
171 171
172 # Convert ~ to $HOME in SOURCE and DESTINATION, to get around shell 172 # Convert ~ to $HOME in SOURCE and DESTINATION, to get around shell
173 # quoting rules. 173 # quoting rules.
174 src="$(printf '%s\n' "$src" | sed "s#^~#$HOME#")" 174 src="$(printf '%s\n' "$src" | sed "s#^~#$HOME#")"
175 dest="$(printf '%s\n' "$dest" | sed "s#^~#$HOME#")" 175 dest="$(printf '%s\n' "$dest" | sed "s#^~#$HOME#")"
176 176
177 ## Do the thing 177 ## Do the thing
178 178
179 # /Always/ tell the user what we're doing. 179 # /Always/ tell the user what we're doing.
180 if [ -f "$dest" ]; then 180 if [ -f "$dest" ]; then
181 printf >&2 'mv %s %s.old\n' "$dest" "$dest" 181 printf >&2 'mv %s %s.old\n' "$dest" "$dest"
182 fi 182 fi
183 printf >&2 "ln %s %s %s\n" "$BOOTSTRAP_LN_ARGS" "$src" "$dest" 183 printf >&2 "ln %s %s %s\n" "$BOOTSTRAP_LN_ARGS" "$src" "$dest"
184 184
185 case "$BOOTSTRAP_ACTION" in 185 case "$BOOTSTRAP_ACTION" in
186 link) # actually ... do the links 186 link) # actually ... do the links
187 # if DESTINATION exists, move it to DESTINATION.old 187 # if DESTINATION exists, move it to DESTINATION.old
188 if [ -f "$dest" ]; then 188 if [ -f "$dest" ]; then
189 mv "$dest" "$dest.old" 189 mv "$dest" "$dest.old"
190 fi 190 fi
191 191
192 ln $BOOTSTRAP_LN_ARGS "$src" "$dest" || 192 ln $BOOTSTRAP_LN_ARGS "$src" "$dest" ||
193 dispatch_error="$?" 193 dispatch_error="$?"
194 ;; 194 ;;
195 print) ;; # already printed. 195 print) ;; # already printed.
196 esac 196 esac
197 197
198 return "$dispatch_error" 198 return "$dispatch_error"
199} 199}
200 200
201### Do the thing 201### Do the thing
diff --git a/git/config b/git/config index dbec691..62455ef 100644 --- a/git/config +++ b/git/config
@@ -1,92 +1,94 @@
1[user] 1[user]
2 email = acdw@acdw.net 2 email = acdw@acdw.net
3 name = Case Duckworth 3 name = Case Duckworth
4 4
5[init] 5[init]
6 defaultBranch = main 6 defaultBranch = main
7 7
8[push] 8[push]
9 default = simple 9 default = simple
10 10
11[pull] 11[pull]
12 rebase = false 12 rebase = false
13 13
14[core] 14[core]
15 editor = emacsclient 15 editor = emacsclient
16 precomposeunicode = true 16 precomposeunicode = true
17 pager = less 17 pager = less
18 autocrlf = false 18 autocrlf = false
19 eol = lf 19 eol = lf
20 20
21[merge] 21[merge]
22 conflictstyle = diff3 22 conflictstyle = diff3
23 tool = vimdiff 23 tool = vimdiff
24 24
25[alias] 25[alias]
26 # Easier locations 26 # Easier locations
27 root = rev-parse --show-toplevel 27 root = rev-parse --show-toplevel
28 current-branch = rev-parse --abbrev-ref HEAD 28 current-branch = rev-parse --abbrev-ref HEAD
29 # Easier listing and info 29 # Easier listing and info
30 branches = branch -a 30 branches = branch -a
31 tags = tag -l 31 tags = tag -l
32 stashes = stash list 32 stashes = stash list
33 remotes = remote -v 33 remotes = remote -v
34 staged = diff --cached 34 staged = diff --cached
35 graph = log --graph -10 --branches --remotes --tags --format=format:'%Cgreen%h %Creset: %<(75,trunc)%s (%cN, %cr) %Cred%d' --date-order 35 graph = log --graph -10 --branches --remotes --tags --format=format:'%Cgreen%h %Creset: %<(75,trunc)%s (%cN, %cr) %Cred%d' --date-order
36 precommit = diff --cached --diff-algorithm=minimal -w 36 precommit = diff --cached --diff-algorithm=minimal -w
37 # Easier actions 37 # Easier actions
38 discard = checkout -- 38 discard = checkout --
39 uncommit = reset --soft HEAD^ 39 uncommit = reset --soft HEAD^
40 unstage = reset HEAD -- 40 unstage = reset HEAD --
41 amend = commit --amend 41 amend = commit --amend
42 pushall = !git remote | xargs -L1 git push --all 42 pushall = !git remote | xargs -L1 git push --all
43 # Shortened commonalities 43 # Shortened commonalities
44 st = status -bs 44 st = status -bs
45 ac = !git add . && git commit -m 45 ac = !git add . && git commit -m
46 46
47# diffing 47# diffing
48[diff "lisp"] 48[diff "lisp"]
49 xfuncname = "^(\\(.*)$" 49 xfuncname = "^(\\(.*)$"
50[diff "org"] 50[diff "org"]
51 xfuncname = "^(\\*+.*)$" 51 xfuncname = "^(\\*+.*)$"
52 52
53; [credential] 53; [credential]
54; helper = /home/case/.local/bin/pass-git-helper 54; helper = /home/case/.local/bin/pass-git-helper
55; useHttpPath = true 55; useHttpPath = true
56 56
57[bash] 57[bash]
58 showUntrackedFiles = true 58 showUntrackedFiles = true
59 showDirtyState = true 59 showDirtyState = true
60 60
61[sendemail] 61[sendemail]
62 smtpserver = smtp.fastmail.com 62 smtpserver = smtp.fastmail.com
63 smtpuser = acdw@fastmail.com 63 smtpuser = acdw@fastmail.com
64 smtpencryption = tls 64 smtpencryption = tls
65 smtpserverport = 465 65 smtpserverport = 465
66 confirm="auto"
67 suppresscc = self
66 68
67# Better urls 69# Better urls
68[url "https://github.com/"] 70[url "https://github.com/"]
69 insteadOf = "gh:" 71 insteadOf = "gh:"
70[url "git@github.com:"] 72[url "git@github.com:"]
71 pushInsteadOf = "gh:" 73 pushInsteadOf = "gh:"
72[github] 74[github]
73 user = duckwork 75 user = duckwork
74 76
75[url "https://gitlab.com/"] 77[url "https://gitlab.com/"]
76 insteadOf = "gl:" 78 insteadOf = "gl:"
77[url "git@gitlab.com:"] 79[url "git@gitlab.com:"]
78 pushInsteadOf = "gl:" 80 pushInsteadOf = "gl:"
79[gitlab] 81[gitlab]
80 user = acdw 82 user = acdw
81 83
82[url "https://git.sr.ht/"] 84[url "https://git.sr.ht/"]
83 insteadOf = "sr:" 85 insteadOf = "sr:"
84[url "git@git.sr.ht:"] 86[url "git@git.sr.ht:"]
85 pushInsteadOf = "sr:" 87 pushInsteadOf = "sr:"
86 88
87[url "https://tildegit.org/"] 89[url "https://tildegit.org/"]
88 insteadOf = "tg:" 90 insteadOf = "tg:"
89[url "git@tildegit.org:"] 91[url "git@tildegit.org:"]
90 pushInsteadOf = "tg:" 92 pushInsteadOf = "tg:"
91[gitea "tildegit.org/api/v1"] 93[gitea "tildegit.org/api/v1"]
92 user = acdw 94 user = acdw
diff --git a/profile/00_functions.sh b/profile/00_functions.sh index 3c67ddf..4bf0c78 100644 --- a/profile/00_functions.sh +++ b/profile/00_functions.sh
@@ -62,3 +62,8 @@ path_add_unsafe() { #path_add_unsafe [-a] [-d DELIM] VAR PATH...
62 done 62 done
63 unset -v APPEND DELIM var 63 unset -v APPEND DELIM var
64} 64}
65
66# Re-source ~/.profile
67reprofile() {
68 . $HOME/.profile
69}
diff --git a/profile/go.sh b/profile/go.sh index 8b4ca26..205c881 100644 --- a/profile/go.sh +++ b/profile/go.sh
@@ -1,9 +1,9 @@
1export GOPATH="${XDG_DATA_HOME:=$HOME/.local/share}/go" 1export GOPATH="$HOME/src/go"
2 2
3# https://drewdevault.com/2022/05/25/Google-has-been-DDoSing-sourcehut.html 3# https://drewdevault.com/2022/05/25/Google-has-been-DDoSing-sourcehut.html
4export GOPROXY=direct 4export GOPROXY=direct
5 5
6# For the GO binary ... XXX: this is slightly clunky (~/usr/local/go/bin is the directory) 6# For the GO binary ... XXX: this is slightly clunky (~/usr/local/go/bin is the directory)
7path_add_to_PATH $(realpath "$XDG_DATA_HOME/../local/go/bin") 7path_add_to_PATH "$GOPATH/go/bin"
8 8
9command -v go >/dev/null 2>&1 && path_add_to_PATH "$(go env GOPATH)/bin" 9command -v go >/dev/null 2>&1 && path_add_to_PATH "$(go env GOPATH)/bin"
diff --git a/profile/infopath.sh b/profile/infopath.sh index 80080b8..92ecd72 100644 --- a/profile/infopath.sh +++ b/profile/infopath.sh
@@ -1,7 +1,7 @@
1# See 00_functions.sh for `path_add_unsafe'. 1# See 00_functions.sh for `path_add_unsafe'.
2 2
3path_add_unsafe INFOPATH \ 3path_add_unsafe INFOPATH \
4 /usr/share/info \ 4 /usr/share/info \
5 "${XDG_DATA_HOME:-$HOME/.local/share}/info" 5 "${XDG_DATA_HOME:-$HOME/.local/share}/info"
6 6
7export INFOPATH 7export INFOPATH
diff --git a/profile/luarocks.sh b/profile/luarocks.sh index 547a94d..e6e1d24 100644 --- a/profile/luarocks.sh +++ b/profile/luarocks.sh
@@ -1,5 +1,5 @@
1# add luarocks stuff to $PATH 1# add luarocks stuff to $PATH
2 2
3if command -v luarocks >/dev/null 2>&1; then 3if command -v luarocks >/dev/null 2>&1; then
4 eval "$(luarocks path --bin)" 4 eval "$(luarocks path)"
5fi 5fi
diff --git a/profile/manpath.sh b/profile/manpath.sh index 944059c..9f310e8 100644 --- a/profile/manpath.sh +++ b/profile/manpath.sh
@@ -1,15 +1,16 @@
1# See 00_functions.sh for `path_add_unsafe'. 1# See 00_functions.sh for `path_add_unsafe'.
2 2
3path_add_unsafe MANPATH \ 3path_add_unsafe MANPATH \
4 "${XDG_DATA_HOME:-$HOME/.local/share}/man" \ 4 "${XDG_DATA_HOME:-$HOME/.local/share}/man" \
5 "$HOME/.local/local/man" \ 5 "$HOME/.local/local/man" \
6 "$HOME/usr/local/man" 6 "$HOME/usr/local/man" \
7 "$HOME/usr/man"
7 8
8# $MANPATH ends with `:' so that manpath(1) will prepend it to its 9# $MANPATH ends with `:' so that manpath(1) will prepend it to its
9# special thing. 10# special thing.
10case "$MANPATH" in 11case "$MANPATH" in
11 *:) ;; 12*:) ;;
12 *) MANPATH="$MANPATH:" ;; 13*) MANPATH="$MANPATH:" ;;
13esac 14esac
14 15
15export MANPATH 16export MANPATH
diff --git a/profile/ssh-agent.sh b/profile/ssh-agent.sh index 7afb7c6..95669d5 100644 --- a/profile/ssh-agent.sh +++ b/profile/ssh-agent.sh
@@ -1,10 +1,10 @@
1# start the ssh-agent 1# start the ssh-agent
2 2
3# use keychain(1), if available 3# use keychain(1), if available
4if type keychain > /dev/null 2>&1; then 4if type keychain >/dev/null 2>&1; then
5 # Save directory name in a variable (for ease of maintenance) 5 # Save directory name in a variable (for ease of maintenance)
6 export KEYCHAIN_HOME="$XDG_RUNTIME_DIR/keychain" 6 export KEYCHAIN_HOME="$XDG_RUNTIME_DIR/keychain"
7 eval $(keychain --eval --dir "$KEYCHAIN_HOME" --agents ssh 2>/dev/null) 7 eval $(keychain --eval --dir "$KEYCHAIN_HOME" --agents ssh 2>/dev/null)
8else 8else
9 eval $(ssh-agent -s) 9 eval $(ssh-agent -s)
10fi 10fi
diff --git a/user-dirs.dirs b/user-dirs.dirs index 8c03e11..2b833c5 100644 --- a/user-dirs.dirs +++ b/user-dirs.dirs
@@ -4,12 +4,12 @@
4# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped 4# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
5# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an 5# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
6# absolute path. No other format is supported. 6# absolute path. No other format is supported.
7# 7#
8XDG_DESKTOP_DIR="$HOME/var/desk" 8XDG_DESKTOP_DIR="$HOME/var/tmp"
9XDG_DOCUMENTS_DIR="$HOME/var/doc" 9XDG_DOCUMENTS_DIR="$HOME/var/doc"
10XDG_DOWNLOAD_DIR="$HOME/var/download" 10XDG_DOWNLOAD_DIR="$HOME/var/download"
11XDG_MUSIC_DIR="$HOME/var/music" 11XDG_MUSIC_DIR="$HOME/var/music"
12XDG_PICTURES_DIR="$HOME/var/img" 12XDG_PICTURES_DIR="$HOME/var/img"
13XDG_PUBLICSHARE_DIR="$HOME/var/public" 13XDG_PUBLICSHARE_DIR="$HOME/var/public"
14XDG_TEMPLATES_DIR="$HOME/var/tmpl" 14XDG_TEMPLATES_DIR="$HOME/var/templ"
15XDG_VIDEOS_DIR="$HOME/var/video" 15XDG_VIDEOS_DIR="$HOME/var/video"