aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-01-26 19:58:55 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-01-26 19:58:55 +1300
commitfd074a7d6ad4e0e2c03ba16c1e87b7a1312e3287 (patch)
treedfebaee66c6a27d8bcd0d9281043451fb902099d
parentMerge branch 'master' into port/bsd/freebsd (diff)
parentMention that csmw(1df) backticks words (diff)
downloaddotfiles-fd074a7d6ad4e0e2c03ba16c1e87b7a1312e3287.tar.gz
dotfiles-fd074a7d6ad4e0e2c03ba16c1e87b7a1312e3287.zip
Merge branch 'master' into port/bsd/freebsd
-rw-r--r--.gitignore1
-rw-r--r--ISSUES.markdown1
-rw-r--r--Makefile36
-rw-r--r--README.markdown1
-rw-r--r--gnupg/gpg.conf.m42
-rw-r--r--mail/mailrc.m43
-rw-r--r--man/man1/csmw.1df3
-rw-r--r--mutt/muttrc.m49
8 files changed, 38 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
index 91f646d3..b0ad92d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,6 +35,7 @@ games/strik
games/zs
git/gitconfig
gnupg/gpg.conf
+mail/mailrc
man/man7/dotfiles.7df
mutt/muttrc
tmux/tmux.conf
diff --git a/ISSUES.markdown b/ISSUES.markdown
index e4c4a161..c29fc284 100644
--- a/ISSUES.markdown
+++ b/ISSUES.markdown
@@ -15,7 +15,6 @@ Known issues
jobspecs around that flee after a jobs builtin run; only saw this manifest
after 90dcadf; either I understand job specs really poorly or this may be a
bug in bash
- * Need to figure out whether this is still needed
* I can't find a clean way of detecting a restricted shell for ksh instances
to prevent trying to load anything fancy (works for Bash)
* Zsh, either! $options[restricted] is "off" within the startup file
diff --git a/Makefile b/Makefile
index e16dc944..504e48e4 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@
install-gtk \
install-i3 \
install-less \
+ install-mail \
install-maildir \
install-mutt \
install-ncmcpp \
@@ -111,6 +112,7 @@ clean distclean :
$(GAMES) \
git/gitconfig \
gnupg/gpg.conf \
+ mail/mailrc \
man/man7/dotfiles.7df \
mutt/muttrc \
tmux/tmux.conf \
@@ -124,17 +126,28 @@ git/gitconfig : git/gitconfig.m4
-D DOTFILES_SENDMAIL="$(SENDMAIL)" \
git/gitconfig.m4 > git/gitconfig
+KEYSERVER := hkps://hkps.pool.sks-keyservers.net
+
gnupg/gpg.conf : gnupg/gpg.conf.m4
- m4 -D DOTFILES_HOME="$(HOME)" \
+ m4 \
+ -D DOTFILES_HOME="$(HOME)" \
+ -D DOTFILES_KEYSERVER="$(KEYSERVER)" \
gnupg/gpg.conf.m4 > gnupg/gpg.conf
+mail/mailrc : mail/mailrc.m4
+ m4 -D DOTFILES_SENDMAIL="$$(command -v "$(SENDMAIL)")" \
+ mail/mailrc.m4 > "$@"
+
man/man7/dotfiles.7df : README.markdown man/man7/dotfiles.7df.header
cat man/man7/dotfiles.7df.header README.markdown | \
pandoc -sS -t man -o "$@"
+MAILDIR := $(HOME)/Mail
+
mutt/muttrc : mutt/muttrc.m4
m4 \
-D DOTFILES_SENDMAIL="$(SENDMAIL)" \
+ -D DOTFILES_MAILDIR="$(MAILDIR)" \
mutt/muttrc.m4 > mutt/muttrc
TMUX_BG := colour237
@@ -256,21 +269,24 @@ install-less :
install -pm 0644 -- less/lesskey "$(HOME)"/.lesskey
command -v lesskey && lesskey
+install-mail : mail/mailrc
+ install -pm 0644 -- mail/mailrc "$(HOME)"/.mailrc
+
install-maildir :
- install -m 0755 -d -- \
- "$(HOME)"/Mail/inbox/cur \
- "$(HOME)"/Mail/inbox/new \
- "$(HOME)"/Mail/inbox/tmp \
- "$(HOME)"/Mail/sent/cur \
- "$(HOME)"/Mail/sent/new \
- "$(HOME)"/Mail/sent/tmp
-
-install-mutt : mutt/muttrc install-maildir
+ for box in drafts inbox sent ; do \
+ for dir in cur new tmp ; do \
+ install -m 0755 -d -- \
+ "$(MAILDIR)"/"$$box"/"$$dir" ; \
+ done ; \
+ done
+
+install-mutt : mutt/muttrc install-mail install-maildir
install -m 0755 -d -- \
"$(HOME)"/.mutt \
"$(HOME)"/.cache/mutt
install -pm 0644 -- mutt/muttrc "$(HOME)"/.muttrc
install -pm 0644 -- mutt/signature "$(HOME)"/.signature
+ [ -f "$(HOME)"/.mutt/muttrc.local ] || touch "$(HOME)"/.mutt/muttrc.local
install-ncmcpp :
install -m 0755 -d -- "$(HOME)"/.ncmpcpp
diff --git a/README.markdown b/README.markdown
index 70234ed8..be0f6481 100644
--- a/README.markdown
+++ b/README.markdown
@@ -58,6 +58,7 @@ Configuration is included for:
elements
* [i3](https://i3wm.org/) -- Tiling window manager
* [less](https://www.gnu.org/software/less/) -- Terminal pager
+* `mail(1)` -- classic mail program
* [Mutt](http://www.mutt.org/) -- Terminal mail user agent
* [`mysql(1)`](http://linux.die.net/man/1/mysql) -- Command-line MySQL client
* [Ncmpcpp](https://rybczak.net/ncmpcpp/) -- ncurses music player client
diff --git a/gnupg/gpg.conf.m4 b/gnupg/gpg.conf.m4
index 8531a742..dbbed306 100644
--- a/gnupg/gpg.conf.m4
+++ b/gnupg/gpg.conf.m4
@@ -22,7 +22,7 @@ fixed-list-mode
keyid-format 0xlong
# Use a pool of servers which support HKPS (encrypted key retrieval)
-keyserver hkps://hkps.pool.sks-keyservers.net
+keyserver DOTFILES_KEYSERVER
# Retrieve keys automatically; check the keyserver port cert; use whichever
# server is proffered from the pool
diff --git a/mail/mailrc.m4 b/mail/mailrc.m4
new file mode 100644
index 00000000..873fe080
--- /dev/null
+++ b/mail/mailrc.m4
@@ -0,0 +1,3 @@
+set sendmail=DOTFILES_SENDMAIL
+unset askcc
+set nosave skipempty
diff --git a/man/man1/csmw.1df b/man/man1/csmw.1df
index e7ef7284..787c2da4 100644
--- a/man/man1/csmw.1df
+++ b/man/man1/csmw.1df
@@ -13,7 +13,8 @@ program |
.B csmw
.SH DESCRIPTION
Reads a list of whitespace-separated words and prints an English
-comma-and-"and" separated list:
+comma-and-"and" separated list, with each word between backticks with the
+expectation it'll be used in Markdown.
.P
$ csmw
foo
diff --git a/mutt/muttrc.m4 b/mutt/muttrc.m4
index 587d879e..4709adef 100644
--- a/mutt/muttrc.m4
+++ b/mutt/muttrc.m4
@@ -1,7 +1,3 @@
-# Person-specific settings
-# (Define 'from', 'realname', and specify alternate addresses in here)
-source ~/.mutt/muttrc.local
-
# Names
set use_domain = yes
set use_from = yes
@@ -12,7 +8,7 @@ set sendmail = 'DOTFILES_SENDMAIL'
# Mailbox type and location
set mbox_type = 'Maildir'
-set folder = '~/Mail/'
+set folder = 'DOTFILES_MAILDIR'
# Submailboxes
set spoolfile = '+inbox'
@@ -152,3 +148,6 @@ macro generic,index,browser,pager gm '!gms --quiet &<enter>' 'Run gms'
# Shortcut to add addresses to abook
macro index,pager A '<pipe-message>abook --add-email<enter>' 'Add sender address to abook'
+
+# Machine or account specific settings
+source ~/.mutt/muttrc.local