aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-06-22 11:01:46 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-06-22 11:01:46 +1200
commit1233a16f2fde252e48ee0b25b400089e70b597af (patch)
treeabc6a0d3d2c0ab1a2a0a2f21eaf5fb747f50d684
parentForce silence for Vim syntax enabling (diff)
parentClean up drakon(6df) a bit (diff)
downloaddotfiles-1233a16f2fde252e48ee0b25b400089e70b597af.tar.gz
dotfiles-1233a16f2fde252e48ee0b25b400089e70b597af.zip
Merge branch 'master' into port/sunos/illumos/openindiana
-rw-r--r--.gitignore3
-rw-r--r--.gitmodules6
-rw-r--r--IDEAS.markdown3
-rw-r--r--Makefile44
-rw-r--r--README.markdown32
-rw-r--r--bash/bashrc.d/prompt.bash8
-rw-r--r--bin/dub.sh4
-rw-r--r--bin/fnl.sh2
-rw-r--r--bin/fnp.sh23
-rw-r--r--bin/han.bash4
-rw-r--r--bin/igex.sh1
-rw-r--r--bin/p.sh3
-rw-r--r--bin/shb.sh6
-rw-r--r--bin/xgo.sh1
-rw-r--r--check/sh.sh8
-rw-r--r--games/drakon.awk16
-rw-r--r--git/gitconfig.mi58
-rw-r--r--gnupg/gpg.conf.mi54
-rw-r--r--gtk/gtk-3.0/settings.ini (renamed from gtk/gtkrc-3.0/settings.ini)0
-rw-r--r--keychain/profile.d/keychain.sh (renamed from sh/profile.d/keychain.sh)0
-rw-r--r--keychain/shrc.d/keychain.sh (renamed from sh/shrc.d/keychain.sh)0
-rw-r--r--ksh/kshrc.d/prompt.ksh8
-rw-r--r--lint/sh.sh7
-rw-r--r--man/man1/fnp.1df24
-rw-r--r--mpd/mpdconf15
-rw-r--r--mpd/profile.d/mpd.sh3
-rw-r--r--ncmpcpp/config25
-rw-r--r--newsbeuter/config9
-rw-r--r--plenv/profile.d/plenv.sh (renamed from sh/profile.d/plenv.sh)0
-rw-r--r--plenv/shrc.d/plenv.sh (renamed from sh/shrc.d/plenv.sh)0
-rw-r--r--sh/shrc.d/prompt.sh4
-rw-r--r--tmux/tmux.conf (renamed from tmux/tmux.conf.mi5)31
m---------vim/bundle/nagios0
m---------vim/bundle/tmux0
-rw-r--r--zsh/zshrc.d/prompt.zsh8
35 files changed, 183 insertions, 127 deletions
diff --git a/.gitignore b/.gitignore
index 3f2aeb76..c4a552f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,6 +31,7 @@ bin/exm
bin/fgscr
bin/finc
bin/fnl
+bin/fnp
bin/gms
bin/grc
bin/grec
@@ -159,6 +160,4 @@ gnupg/gpg.conf
gnupg/gpg.conf.m4
include/mktd.m4
man/man7/dotfiles.7df
-tmux/tmux.conf
-tmux/tmux.conf.m4
urxvt/ext/select
diff --git a/.gitmodules b/.gitmodules
index 49bda51f..5f908d04 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -13,9 +13,6 @@
[submodule "vim/bundle/lion"]
path = vim/bundle/lion
url = https://sanctum.geek.nz/clone/vim-lion.git
-[submodule "vim/bundle/nagios"]
- path = vim/bundle/nagios
- url = https://sanctum.geek.nz/code/vim-nagios.git
[submodule "vim/bundle/pathogen"]
path = vim/bundle/pathogen
url = https://sanctum.geek.nz/clone/vim-pathogen.git
@@ -31,9 +28,6 @@
[submodule "vim/bundle/targets"]
path = vim/bundle/targets
url = https://sanctum.geek.nz/clone/targets.vim.git
-[submodule "vim/bundle/tmux"]
- path = vim/bundle/tmux
- url = https://sanctum.geek.nz/code/vim-tmux.git
[submodule "vim/bundle/unimpaired"]
path = vim/bundle/unimpaired
url = https://sanctum.geek.nz/clone/vim-unimpaired.git
diff --git a/IDEAS.markdown b/IDEAS.markdown
index 3b0f1c75..f267be12 100644
--- a/IDEAS.markdown
+++ b/IDEAS.markdown
@@ -12,3 +12,6 @@ Ideas
processes and mkfifo(1).
* Write something like hcat(1df) or tcat(1df) that includes filename headings
for each concatenated file.
+* I can probably get rid of all that nasty templated shell by writing
+ something that wraps around td(1df) and generates shell script to run, and
+ calls that via `eval`.
diff --git a/Makefile b/Makefile
index 516ddf68..d498f4c6 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@
install-ksh \
install-less \
install-login-shell \
+ install-mpd \
install-mutt \
install-mysql \
install-ncmcpp \
@@ -100,6 +101,7 @@ BINS = bin/ap \
bin/fgscr \
bin/finc \
bin/fnl \
+ bin/fnp \
bin/gms \
bin/grc \
bin/grec \
@@ -244,8 +246,6 @@ clean distclean:
gnupg/gpg.conf.m4 \
include/mktd.m4 \
man/man8/dotfiles.7df \
- tmux/tmux.conf \
- tmux/tmux.conf.m4 \
urxvt/ext/select
.awk:
@@ -285,16 +285,18 @@ bin/urlc.sh: bin/urlc.m4 include/mktd.m4
git/gitconfig: git/gitconfig.m4
m4 \
- -D DF_NAME=$(NAME) \
- -D DF_EMAIL=$(EMAIL) \
- -D DF_KEY=$(KEY) \
- -D DF_SENDMAIL=$(SENDMAIL) \
+ -D NAME=$(NAME) \
+ -D EMAIL=$(EMAIL) \
+ -D KEY=$(KEY) \
+ -D SENDMAIL=$(SENDMAIL) \
git/gitconfig.m4 > $@
KEYSERVER = hkps://hkps.pool.sks-keyservers.net
gnupg/gpg.conf: gnupg/gpg.conf.m4
- m4 -D DF_HOME=$(HOME) -D DF_KEYSERVER=$(KEYSERVER) \
+ m4 \
+ -D HOME=$(HOME) \
+ -D KEYSERVER=$(KEYSERVER) \
gnupg/gpg.conf.m4 > $@
man/man7/dotfiles.7df: README.markdown man/man7/dotfiles.7df.header
@@ -303,13 +305,6 @@ man/man7/dotfiles.7df: README.markdown man/man7/dotfiles.7df.header
MAILDIR = $(HOME)/Mail
-TMUX_BG = colour237
-TMUX_FG = colour248
-
-tmux/tmux.conf: tmux/tmux.conf.m4
- m4 -D DF_TMUX_BG=$(TMUX_BG) -D DF_TMUX_FG=$(TMUX_FG) \
- tmux/tmux.conf.m4 > $@
-
install: install-bin \
install-curl \
install-ex \
@@ -380,24 +375,33 @@ install-gnupg: gnupg/gpg.conf
cp -p -- gnupg/sks-keyservers.net/* $(HOME)/.gnupg/sks-keyservers.net
install-gtk:
- mkdir -p -- $(HOME)/.config/gtkrc-3.0
+ mkdir -p -- $(HOME)/.config/gtk-3.0
cp -p -- gtk/gtkrc-2.0 $(HOME)/.gtkrc-2.0
- cp -p -- gtk/gtkrc-3.0/settings.ini $(HOME)/.config/gtkrc-3.0
+ cp -p -- gtk/gtk-3.0/settings.ini $(HOME)/.config/gtk-3.0
install-i3: install-x
mkdir -p -- $(HOME)/.i3
cp -p -- i3/* $(HOME)/.i3
+install-keychain: install-sh
+ cp -p -- keychain/profile.d/* $(HOME)/.profile.d
+ cp -p -- keychain/shrc.d/* $(HOME)/.shrc.d
+
install-less:
cp -p -- less/lesskey $(HOME)/.lesskey
lesskey
+install-mpd: install-sh
+ mkdir -p -- $(HOME)/.mpd/playlists
+ cp -p .. mpd/profile.d/* $(HOME)/.profile.d
+ cp -p -- mpd/mpdconf $(HOME)/.mpdconf
+
install-mutt:
mkdir -p -- $(HOME)/.muttrc.d $(HOME)/.cache/mutt
cp -p -- mutt/muttrc $(HOME)/.muttrc
cp -p -- mutt/muttrc.d/src $(HOME)/.muttrc.d
-install-ncmcpp:
+install-ncmcpp: install-mpd
mkdir -p -- $(HOME)/.ncmpcpp
cp -p -- ncmpcpp/config $(HOME)/.ncmpcpp
@@ -409,7 +413,7 @@ install-mysql:
cp -p -- mysql/my.cnf $(HOME)/.my.cnf
install-ksh: check-ksh install-sh
- mkdir -p -- $(HOME)/.shrc.d $(HOME)/.kshrc.d
+ mkdir -p -- $(HOME)/.kshrc.d
cp -p -- ksh/shrc.d/* $(HOME)/.shrc.d
cp -p -- ksh/kshrc $(HOME)/.kshrc
cp -p -- ksh/kshrc.d/* $(HOME)/.kshrc.d
@@ -423,6 +427,10 @@ install-perlcritic:
install-perltidy:
cp -p -- perltidy/perltidyrc $(HOME)/.perltidyrc
+install-plenv: install-sh
+ cp -p -- plenv/profile.d/* $(HOME)/.profile.d
+ cp -p -- plenv/shrc.d/* $(HOME)/.shrc.d
+
install-psql:
cp -p -- psql/psqlrc $(HOME)/.psqlrc
diff --git a/README.markdown b/README.markdown
index bf25a40d..bd4d482a 100644
--- a/README.markdown
+++ b/README.markdown
@@ -19,14 +19,8 @@ Installation
$ make -n install
$ make install
-For the default `all` target, you'll need `make(1)`, `m4(1)`, and a
-POSIX-fearing environment, including `sh(1)`. This should work on most
-GNU/Linux and BSD systems, and possibly on other UNIX types, but those are not
-as thoroughly or frequently tested.
-
-If you're on a system where `/bin/sh` is not a POSIX shell (e.g. OpenSolaris),
-you may need to check you have e.g. `/usr/xpg4/bin` at the front of your
-`$PATH` at build time.
+For the default `all` target, you'll need a POSIX-fearing userland, including
+`make(1)` and `m4(1)`.
The installation `Makefile` will overwrite things standing in the way of its
installed files without backing them up, so read the output of `make -n
@@ -147,20 +141,20 @@ after testing `BASH_VERSINFO` appropriately.
A terminal session with my prompt looks something like this:
~$ ssh remote
- tom@remote:~$ cd .dotfiles
- tom@remote:~/.dotfiles(master+!)$ git status
+ remote:~$ cd .dotfiles
+ remote:~/.dotfiles(master+!)$ git status
M README.markdown
M bash/bashrc.d/prompt.bash
A init
- tom@remote:~/.dotfiles(master+!)$ foobar
+ remote:~/.dotfiles(master+!)$ foobar
foobar: command not found
- tom@remote:~/.dotfiles(master+!)<127>$ sleep 5 &
+ remote:~/.dotfiles(master+!)<127>$ sleep 5 &
[1] 28937
- tom@remote:~/.dotfiles(master+!){1}$
+ remote:~/.dotfiles(master+!){1}$
-The username and hostname are elided if not connected via SSH. The working
-directory with tilde abbreviation for `$HOME` is always shown. The rest of the
-prompt expands based on context to include these elements in this order:
+The hostname is elided if not connected via SSH. The working directory with
+tilde abbreviation for `$HOME` is always shown. The rest of the prompt expands
+based on context to include these elements in this order:
* Whether in a Git repository if applicable, and punctuation to show
repository status including reference to upstreams at a glance. Subversion
@@ -333,10 +327,6 @@ Note that the configuration presently uses a hard-coded 256-color colorscheme,
and uses non-login shells, with an attempt to control the environment to stop
shells thinking they have access to an X display.
-The configuration file is created with `mi5(1df)` to allow specifying a color
-theme. This is just because I use a different color for my work session. The
-default is a dark grey.
-
The shell scripts in `bin` include `tm(1df)`, a shortcut to make `attach` into
the default command if no arguments are given and sessions do already exist. My
`~/.inputrc` file binds Alt+M to run that, and Tmux in turn binds the same key
@@ -482,6 +472,8 @@ Installed by the `install-bin` target:
`find(1)` conditions.
* `fnl(1df)` runs a command and saves its output and error into temporary
files, printing their paths and line counts.
+* `fnp(1df)` prints the given files to stdout, each with a plaintext heading
+ with the filename in it.
* `gms(1df)` runs a set of `getmailrc` files; does much the same thing as the
script `getmails` in the `getmail` suite, but runs the requests in parallel
and does up to three silent retries using `try(1df)`.
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index f64355f7..782af287 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -15,7 +15,7 @@ prompt() {
# Basic prompt shape depends on whether we're in SSH or not
PS1=
if [[ -n $SSH_CLIENT || -n $SSH_CONNECTION ]] ; then
- PS1=$PS1'\u@\h:'
+ PS1=$PS1'\h:'
fi
PS1=$PS1'\w'
@@ -86,7 +86,7 @@ prompt() {
PS3='? '
PS4='+ '
if [[ -n $SSH_CLIENT || -n $SSH_CONNECTION ]] ; then
- PS1=$(id -nu)'@'$(hostname -s)'$ '
+ PS1=$(hostname -s)'$ '
fi
;;
@@ -249,5 +249,5 @@ prompt() {
esac
}
-# Start with full-fledged prompt
-prompt on
+# Default to a full-featured prompt, but use PROMPT_MODE if that's set
+prompt "${PROMPT_MODE:-on}"
diff --git a/bin/dub.sh b/bin/dub.sh
index c30749af..2dfd77f0 100644
--- a/bin/dub.sh
+++ b/bin/dub.sh
@@ -4,7 +4,7 @@ self=dub
# First optional argument is the directory, defaulting to the
# current dir; second optional argument is the number of files to
# show, defaulting to 20
-dir=${1:-.} lines=${2:-10}
+dir=${1:-.} lim=${2:-10}
# Enter the target dir or bail
cd -- "$dir" || exit
@@ -24,4 +24,4 @@ find . ! -name . -prune \( \
sort -k1,1nr |
# Limit the output to the given number of lines
-sed "$((lines))"q
+awk -v lim="$lim" 'NR<=lim'
diff --git a/bin/fnl.sh b/bin/fnl.sh
index 8d771adb..86e582f1 100644
--- a/bin/fnl.sh
+++ b/bin/fnl.sh
@@ -3,7 +3,7 @@
# Check we have at least one argument
if [ "$#" -eq 0 ] ; then
printf >&2 'fnl: Command needed\n'
- return 2
+ exit 2
fi
# Create a temporary directory; note that we *don't* clean it up on exit
diff --git a/bin/fnp.sh b/bin/fnp.sh
new file mode 100644
index 00000000..ec68e51f
--- /dev/null
+++ b/bin/fnp.sh
@@ -0,0 +1,23 @@
+# Print input, but include filenames as headings
+
+# Assume stdin if no options given
+[ "$#" -gt 0 ] || set -- -
+
+# Iterate through arguments
+for arg ; do
+
+ # We'll print the filename "-stdin-" rather than - just to be slightly more
+ # explicit
+ case $arg in
+ -) fn=-stdin- ;;
+ *) fn=$arg ;;
+ esac
+
+ [ -n "$tail" ] && printf '\n'
+ tail=1
+
+ # Form the underline; is there a nicer way to do this in POSIX sh?
+ ul=$(printf %s "$fn"|tr '[:print:]' -)
+ printf '%s\n%s\n\n' "$fn" "$ul"
+ cat -- "$arg"
+done
diff --git a/bin/han.bash b/bin/han.bash
index 97dc3a19..3c4f6637 100644
--- a/bin/han.bash
+++ b/bin/han.bash
@@ -5,10 +5,10 @@ self=han
# due to leading zeroes and trailing letters in some 2.x version numbers (e.g.
# 2.05a).
# shellcheck disable=SC2128
-[ -n "$BASH_VERSINFO" ] || return
+[ -n "$BASH_VERSINFO" ] || exit
((BASH_VERSINFO[0] == 2)) &&
((10#${BASH_VERSINFO[1]%%[![:digit:]]*} < 5)) &&
- return
+ exit
# Figure out the options with which we can call help; Bash >=4.0 has an -m
# option which prints the help output in a man-page like format
diff --git a/bin/igex.sh b/bin/igex.sh
index 09f1206f..b8ef3092 100644
--- a/bin/igex.sh
+++ b/bin/igex.sh
@@ -3,6 +3,7 @@
# There should be at least two arguments
if [ "$#" -eq 0 ] ; then
printf >&2 'igs: Need an ignore list x,y,z and a command\n';
+ exit 2
fi
# The list of values to ignore is the first argument; add a trailing comma for
diff --git a/bin/p.sh b/bin/p.sh
index 5b59986e..fec69e95 100644
--- a/bin/p.sh
+++ b/bin/p.sh
@@ -1 +1,2 @@
-exec cat -- "${@:--}"
+# cat(1) as it always should have been
+cat -- "${@:--}"
diff --git a/bin/shb.sh b/bin/shb.sh
index 7d31876d..d0279ce3 100644
--- a/bin/shb.sh
+++ b/bin/shb.sh
@@ -1,10 +1,10 @@
# Use PATH to build a shebang for a script given on stdin
self=shb
-# Need at least two arguments
+# Need at least one argument
if [ "$#" -lt 1 ] ; then
printf >&2 '%s: Need interpreter command\n' "$self"
- exit 1
+ exit 2
fi
# First argument is the name of the interpreter
@@ -23,4 +23,4 @@ set -- "$intp" "$@"
printf '#!%s\n' "$*"
# Emit the rest of the input
-cat
+cat -
diff --git a/bin/xgo.sh b/bin/xgo.sh
index 4d7cf922..3fb11fde 100644
--- a/bin/xgo.sh
+++ b/bin/xgo.sh
@@ -3,6 +3,7 @@
# Check arguments
if [ "$#" -eq 0 ] ; then
printf >&2 'xgo: At least one URL required\n'
+ exit 2
fi
# Iterate over the URL arguments
diff --git a/check/sh.sh b/check/sh.sh
index 53d8c4b6..c5a86955 100644
--- a/check/sh.sh
+++ b/check/sh.sh
@@ -1,4 +1,10 @@
-for sh in sh/* sh/profile.d/* sh/shrc.d/* ; do
+for sh in \
+ sh/* sh/profile.d/* sh/shrc.d/* \
+ keychain/profile.d/* keychain/shrc.d/* \
+ ksh/shrc.d/* \
+ mpd/profile.d/* \
+ plenv/profile.d/* plenv/shrc.d/* \
+; do
[ -f "$sh" ] || continue
sh -n "$sh" || exit
done
diff --git a/games/drakon.awk b/games/drakon.awk
index b8d72888..ce619585 100644
--- a/games/drakon.awk
+++ b/games/drakon.awk
@@ -1,14 +1,14 @@
# TyPe lIkE AnDoR DrAkOn fRoM AnCiEnT DoMaInS Of mYsTeRy
# <http://www.adomgb.info/adomgb-4.html>
{
- len = length
- line = ""
- toggle = 0
+ len = length($0)
+ lin = ""
+ tog = 0
for (i = 1; i <= len; i++) {
- char = substr($0, i, 1)
- if (char ~ /[[:alpha:]]/)
- char = (toggle = !toggle) ? tolower(char) : toupper(char)
- line = line char
+ chr = substr($0, i, 1)
+ if (chr ~ /[[:alpha:]]/)
+ chr = (tog = !tog) ? tolower(chr) : toupper(chr)
+ lin = lin chr
}
- print line
+ print lin
}
diff --git a/git/gitconfig.mi5 b/git/gitconfig.mi5
index bce64d6c..5a50c13c 100644
--- a/git/gitconfig.mi5
+++ b/git/gitconfig.mi5
@@ -52,13 +52,13 @@
[sendemail]
confirm = compose
- smtpServer = <% DF_SENDMAIL %>
+ smtpServer = <% SENDMAIL %>
[status]
short = true
showUntrackedFiles = all
[user]
- name = <% DF_NAME %>
- email = <% DF_EMAIL %>
- signingKey = <% DF_KEY %>
+ name = <% NAME %>
+ email = <% EMAIL %>
+ signingKey = <% KEY %>
diff --git a/gnupg/gpg.conf.mi5 b/gnupg/gpg.conf.mi5
index d8f14c09..c6793b64 100644
--- a/gnupg/gpg.conf.mi5
+++ b/gnupg/gpg.conf.mi5
@@ -22,11 +22,11 @@ fixed-list-mode
keyid-format 0xlong
# Use a pool of servers which support HKPS (encrypted key retrieval)
-keyserver DF_KEYSERVER
+keyserver <% KEYSERVER %>
# Retrieve keys automatically; check the keyserver port cert; use whichever
# server is proffered from the pool
-keyserver-options auto-key-retrieve check-cert no-honor-keyserver-url ca-certfile=<% DF_HOME %>/.gnupg/sks-keyservers.net/sks-keyservers.netCA.pem
+keyserver-options auto-key-retrieve check-cert no-honor-keyserver-url ca-certfile=<% HOME %>/.gnupg/sks-keyservers.net/sks-keyservers.netCA.pem
# Include trust/validity for UIDs in listings
list-options show-uid-validity
diff --git a/gtk/gtkrc-3.0/settings.ini b/gtk/gtk-3.0/settings.ini
index 4f93dfe4..4f93dfe4 100644
--- a/gtk/gtkrc-3.0/settings.ini
+++ b/gtk/gtk-3.0/settings.ini
diff --git a/sh/profile.d/keychain.sh b/keychain/profile.d/keychain.sh
index f3d25c62..f3d25c62 100644
--- a/sh/profile.d/keychain.sh
+++ b/keychain/profile.d/keychain.sh
diff --git a/sh/shrc.d/keychain.sh b/keychain/shrc.d/keychain.sh
index 9a732384..9a732384 100644
--- a/sh/shrc.d/keychain.sh
+++ b/keychain/shrc.d/keychain.sh
diff --git a/ksh/kshrc.d/prompt.ksh b/ksh/kshrc.d/prompt.ksh
index 1d4db926..866cf79e 100644
--- a/ksh/kshrc.d/prompt.ksh
+++ b/ksh/kshrc.d/prompt.ksh
@@ -15,7 +15,7 @@ function prompt {
# Basic prompt shape depends on whether we're in SSH or not
PS1=
if [[ -n $SSH_CLIENT ]] || [[ -n $SSH_CONNECTION ]] ; then
- PS1=$PS1'$USER@${HOSTNAME%%.*}:'
+ PS1=$PS1'${HOSTNAME%%.*}:'
fi
# Add sub-commands; working directory with ~ abbreviation, VCS, job
@@ -193,7 +193,7 @@ function prompt {
PS3='? '
PS4='+ '
if [[ -n $SSH_CLIENT || -n $SSH_CONNECTION ]] ; then
- PS1=$(id -nu)'@'$(hostname -s)'$ '
+ PS1=$(hostname -s)'$ '
fi
;;
@@ -234,5 +234,5 @@ function prompt {
esac
}
-# Start with full-fledged prompt
-prompt on
+# Default to a full-featured prompt, but use PROMPT_MODE if that's set
+prompt "${PROMPT_MODE:-on}"
diff --git a/lint/sh.sh b/lint/sh.sh
index 632585bf..89704c0b 100644
--- a/lint/sh.sh
+++ b/lint/sh.sh
@@ -1 +1,6 @@
-find sh -type f -print -exec shellcheck -e SC1090 -s sh -- {} +
+find sh \
+ keychain/profile.d keychain/shrc.d \
+ ksh/shrc.d \
+ mpd/profile.d \
+ plenv/profile.d plenv/shrc.d \
+ -type f -print -exec shellcheck -e SC1090 -s sh -- {} +
diff --git a/man/man1/fnp.1df b/man/man1/fnp.1df
new file mode 100644
index 00000000..dc8a07c4
--- /dev/null
+++ b/man/man1/fnp.1df
@@ -0,0 +1,24 @@
+.TH FNP 1df "June 2017" "Manual page for fnp"
+.SH NAME
+.B fnp
+\- print input with filename headings
+.SH SYNOPSIS
+.B fnp
+FILE1 [FILE2...]
+.br
+prog1 |
+.B
+fnp
+.br
+prog1 |
+.B
+fnp
+FILE1 - FILE2
+.SH DESCRIPTION
+.B fnp
+prints concatenated standard input from files to standard output, prepending a
+filename title with an underline made of hyphen characters to each one.
+.SH SEE ALSO
+p(1df), pp(1df), pph(1df)
+.SH AUTHOR
+Tom Ryder <tom@sanctum.geek.nz>
diff --git a/mpd/mpdconf b/mpd/mpdconf
new file mode 100644
index 00000000..3dca8b6d
--- /dev/null
+++ b/mpd/mpdconf
@@ -0,0 +1,15 @@
+bind_to_address "~/.mpd/socket"
+
+db_file "~/.mpd/database"
+log_file "~/.mpd/log"
+
+music_directory "/mnt/media/shares/music"
+playlist_directory "~/.mpd/playlists"
+pid_file "~/.mpd/pid"
+state_file "~/.mpd/state"
+sticker_file "~/.mpd/sticker.sql"
+
+audio_output {
+ type "pulse"
+ name "PulseAudio"
+}
diff --git a/mpd/profile.d/mpd.sh b/mpd/profile.d/mpd.sh
new file mode 100644
index 00000000..daa55af6
--- /dev/null
+++ b/mpd/profile.d/mpd.sh
@@ -0,0 +1,3 @@
+# Start an mpd process if one isn't already running
+command mpd >/dev/null 2>&1 || return
+[ -s "$HOME"/.mpd/pid ] || mpd
diff --git a/ncmpcpp/config b/ncmpcpp/config
index eb4f2120..7e865a8f 100644
--- a/ncmpcpp/config
+++ b/ncmpcpp/config
@@ -2,30 +2,7 @@
ncmpcpp_directory = "~/.ncmpcpp"
# Server specifics
-mpd_host = "localhost"
-mpd_port = "6600"
-mpd_communication_mode = "notifications"
-mpd_connection_timeout = "5"
-mpd_crossfade_time = "5"
+mpd_host = "~/.mpd/socket"
# No mouse, it confuses tmux/urxvt, and I never use it anyway
mouse_support = "no"
-
-# Visualization
-visualizer_fifo_path = "/tmp/mpd.fifo"
-visualizer_in_stereo = "yes"
-visualizer_look = "*|"
-visualizer_output_name = "FIFO"
-visualizer_sync_interval = "30"
-visualizer_type = "spectrum"
-
-# Use columns everywhere
-browser_display_mode = "columns"
-playlist_display_mode = "columns"
-playlist_editor_display_mode = "columns"
-search_engine_display_mode = "columns"
-song_columns_list_format = "(40)[]{t|f} (25)[blue]{a} (25)[red]{b} (10)[green]{lr}"
-
-# Don't let me actually delete anything
-allow_physical_directories_deletion = "no"
-allow_physical_files_deletion = "no"
diff --git a/newsbeuter/config b/newsbeuter/config
index 48f4110a..affbaa43 100644
--- a/newsbeuter/config
+++ b/newsbeuter/config
@@ -1,7 +1,8 @@
-auto-reload yes
-confirm-exit yes
-reload-threads 5
-reload-time 30
+auto-reload yes
+confirm-exit yes
+keep-articles-days 180
+reload-threads 5
+reload-time 30
bind-key j next
bind-key k prev
diff --git a/sh/profile.d/plenv.sh b/plenv/profile.d/plenv.sh
index b2b491e1..b2b491e1 100644
--- a/sh/profile.d/plenv.sh
+++ b/plenv/profile.d/plenv.sh
diff --git a/sh/shrc.d/plenv.sh b/plenv/shrc.d/plenv.sh
index 6e03618e..6e03618e 100644
--- a/sh/shrc.d/plenv.sh
+++ b/plenv/shrc.d/plenv.sh
diff --git a/sh/shrc.d/prompt.sh b/sh/shrc.d/prompt.sh
index f1b67fb4..6f1e8e1f 100644
--- a/sh/shrc.d/prompt.sh
+++ b/sh/shrc.d/prompt.sh
@@ -5,7 +5,7 @@ unset PS1 PS2 PS3 PS4
PS1='$ ' PS2='> ' PS3='? ' PS4='+ '
# If we have an SSH_CLIENT or SSH_CONNECTION environment variable, put the
-# username and hostname in PS1 too.
+# hostname in PS1 too.
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_CONNECTION" ] ; then
- PS1=$(id -nu)'@'$(hostname)'$ '
+ PS1=$(hostname)'$ '
fi
diff --git a/tmux/tmux.conf.mi5 b/tmux/tmux.conf
index 76d493c1..09ba0251 100644
--- a/tmux/tmux.conf.mi5
+++ b/tmux/tmux.conf
@@ -13,7 +13,7 @@ set-environment -gru WINDOWID
set-option -g update-environment ''
# Setting this makes each new pane a non-login shell, which suits me better
-set-option -g default-command "$SHELL"
+set-option -g default-command '$SHELL'
# Expect a 256-color terminal
set-option -g default-terminal 'screen-256color'
@@ -60,7 +60,7 @@ bind-key k select-pane -U
bind-key l select-pane -R
# Join and break panes
-bind-key J choose-window "join-pane -h -s '%%'"
+bind-key J choose-window 'join-pane -h -s "%%"'
bind-key B break-pane -d
# Select only sessions in the choose-tree menu, not the whole tree of sessions
@@ -71,7 +71,7 @@ bind-key s choose-session
set-option -g status-left '[#S] '
# Username, hostname, and the current date on the right side of the status bar
-set-option -g status-right ' [#(whoami)@#H] #(date +"%F %T")'
+set-option -g status-right ' [#H] %F %T'
# Update the status bar every second
set-option -g status-interval 1
@@ -101,30 +101,33 @@ set-window-option -g allow-rename off
# Window titles are the window index, a colon, the window or command name, and
# any activity or alert indicators
-set-window-option -g window-status-format "#I:#W#F"
+set-window-option -g window-status-format '#I:#W#F'
# Message dialogs are white on blue
-set-option -g message-style "bg=colour18,fg=colour231"
+set-option -g message-style 'bg=colour18,fg=colour231'
# Window choosers are white on blue
-set-window-option -g mode-style "bg=colour18,fg=colour231"
+set-window-option -g mode-style 'bg=colour18,fg=colour231'
# Pane borders are always in the background color
-set-option -g pane-border-style "fg=<% DF_TMUX_BG %>"
-set-option -g pane-active-border-style "fg=<% DF_TMUX_BG %>"
+set-option -g pane-border-style 'fg=colour237'
+set-option -g pane-active-border-style 'fg=colour237'
# Inactive windows have slightly washed-out system colours
-set-option -g window-style "bg=colour232,fg=colour248"
-set-option -g window-active-style "bg=colour0,fg=colour15"
+set-option -g window-style 'bg=colour232,fg=colour248'
+set-option -g window-active-style 'bg=colour0,fg=colour15'
# The status bar has the defined background and foreground colours
-set-option -g status-style "bg=<% DF_TMUX_BG %>,fg=<% DF_TMUX_FG %>"
+set-option -g status-style 'bg=colour237,fg=colour248'
# Titles of windows default to black text with no embellishment
-set-window-option -g window-status-style "fg=colour16"
+set-window-option -g window-status-style 'fg=colour16'
# The title of the active window is in white rather than black
-set-window-option -g window-status-current-style "fg=colour231"
+set-window-option -g window-status-current-style 'fg=colour231'
# A window with a bell has a title with a red background until cleared
-set-window-option -g window-status-bell-style "bg=colour9"
+set-window-option -g window-status-bell-style 'bg=colour9'
+
+# Source any configuration in the subdir if there is any
+source-file -q ~/.tmux.conf.d/*.conf
diff --git a/vim/bundle/nagios b/vim/bundle/nagios
deleted file mode 160000
-Subproject 3a9d5c4a1428d193a4d2db97f042fa9afccdd26
diff --git a/vim/bundle/tmux b/vim/bundle/tmux
deleted file mode 160000
-Subproject 663130a00e6d96b8e5d56051e8fe01d89521e31
diff --git a/zsh/zshrc.d/prompt.zsh b/zsh/zshrc.d/prompt.zsh
index 446e336e..7c695e25 100644
--- a/zsh/zshrc.d/prompt.zsh
+++ b/zsh/zshrc.d/prompt.zsh
@@ -11,7 +11,7 @@ prompt() {
# Basic prompt shape depends on whether we're in SSH or not
PS1=
if [[ -n $SSH_CLIENT ]] || [[ -n $SSH_CONNECTION ]] ; then
- PS1=$PS1'%n@%m:'
+ PS1=$PS1'%m:'
fi
PS1=$PS1'%~'
@@ -49,7 +49,7 @@ prompt() {
PS3='? '
PS4='+ '
if [[ -n $SSH_CLIENT || -n $SSH_CONNECTION ]] ; then
- PS1=$(id -nu)'@'$(hostname -s)'$ '
+ PS1=$(hostname -s)'$ '
fi
;;
@@ -207,5 +207,5 @@ prompt() {
esac
}
-# Start with full-fledged prompt
-prompt on
+# Default to a full-featured prompt, but use PROMPT_MODE if that's set
+prompt "${PROMPT_MODE:-on}"