chiark / gitweb /
Mark Wooding [Wed, 6 May 2020 18:36:02 +0000 (19:36 +0100)]
bin/start-ssh-agent: Don't proceed if the SSH programs aren't around.
Otherwise, when I enter an schroot session, there's no `ssh-add'
installed, so the `is the agent running' test /fails/, we delete the
socket, and then fail to start a replacement agent because `ssh-agent'
doesn't exist either. The result is that I've now lost my socket for
my (otherwise completely functional) agent, and there is sadness.
Mark Wooding [Wed, 6 May 2020 17:51:58 +0000 (18:51 +0100)]
el/dot-emacs.el: Advise `rename-file' to rename buffers at the same time.
I remember investigating this hack a while ago and finding that it
looked very difficult. This time, it's nearly trivial. What gives?
Mark Wooding [Wed, 6 May 2020 17:51:47 +0000 (18:51 +0100)]
dot/emacs: Add bindings for `dired-jump' and `dired-jump-other-window'.
And the necessary autoloads. They ought to work already, but don't on
Emacs 24 for some reason.
The bindings are standard, except for `C-x 4 j', which ought to exist
but doesn't.
Mark Wooding [Wed, 6 May 2020 17:51:23 +0000 (18:51 +0100)]
dot/emacs: Sort the `devhelp-...' bindings into the correct order.
Mark Wooding [Tue, 5 May 2020 22:34:38 +0000 (23:34 +0100)]
dot/gitconfig.in: Add a rune for fast-forwarding branches.
I type this longhand quite often, and it's gotten old.
Mark Wooding [Mon, 4 May 2020 00:00:51 +0000 (01:00 +0100)]
dot/ipython-key-bindings.py: Don't leak names into the toplevel environment.
It seems that this file, unlike the `ipython-config.py', is evaluated in
the same toplevel environment as is used for the interactive session. I
initially tried to do this by deleting all the names after I'd finished
using them, but the `inhibit_history_search' function is looked up by
name from the `prev_line' and `next_line' bindings, so that doesn't
work. Instead, lambda-bind everything by wrapping a function around the
whole lot; the evaluate the function to make everything happen, and
delete the function name, leaving the bindings functions in its orphaned
environment.
Mark Wooding [Sun, 3 May 2020 23:57:06 +0000 (00:57 +0100)]
dot/ipython-key-bindings.py: Fix some bogus formatting.
Being fair, one of these lines isn't bogus yet, but would be if I
indented it one more step, and I intend to do just that now.
Mark Wooding [Sun, 3 May 2020 16:47:32 +0000 (17:47 +0100)]
bin/mdw-sbuild{,-server}: Push arguments through to `dpkg-buildpackage'.
Both now have `-A' options to make this work.
Mark Wooding [Thu, 30 Apr 2020 13:18:06 +0000 (14:18 +0100)]
bin/check-blkdev-size: Don't print the full path in witter lines.
Mark Wooding [Wed, 29 Apr 2020 14:56:53 +0000 (15:56 +0100)]
bin/media-keys: Don't get upset if the `disorder playing' coprocess dies.
It did its job either way.
Mark Wooding [Wed, 29 Apr 2020 14:29:45 +0000 (15:29 +0100)]
bin/media-keys: Actually print the name of the person who picked a track.
Might as well since it's lying about.
Mark Wooding [Wed, 29 Apr 2020 14:28:31 +0000 (15:28 +0100)]
bin/media-keys: Don't break just because someone actually picked a track.
There's an extra `picked ...' line for this case.
Mark Wooding [Tue, 28 Apr 2020 14:12:56 +0000 (15:12 +0100)]
bin/wakey.sh: Fix idiotic typo that stopped it from working.
Mark Wooding [Tue, 28 Apr 2020 12:42:34 +0000 (13:42 +0100)]
dot/xinitrc: Fix detection of GTK 2.0-based `pterm'.
Firstly, the match is usually preceded at least by whitespace, and
secondly, it seems that the library may, at least sometimes, be called
`libgtk-x11-2.0.so'.
Mark Wooding [Tue, 28 Apr 2020 10:30:53 +0000 (11:30 +0100)]
dot/putty-defaults: Don't maintain a separate icon title.
Mark Wooding [Mon, 27 Apr 2020 00:24:03 +0000 (01:24 +0100)]
bin/bdl: Remove the `$S' separator.
It's much easier just to jam it on the end of the base if necessary.
Also, it interferes with not having a prefix. As a result of this
change, mark `B=' as optional.
Mark Wooding [Mon, 27 Apr 2020 00:21:30 +0000 (01:21 +0100)]
bin/bdl: Put a `Usage:' prefix on the usage text.
Mark Wooding [Mon, 27 Apr 2020 00:20:20 +0000 (01:20 +0100)]
bin/bdl: Add to the collection.
Had this lying around for aaages.
Mark Wooding [Sun, 26 Apr 2020 18:26:35 +0000 (19:26 +0100)]
dot/emacs: Don't use a gratuitously different label on icons.
Mark Wooding [Sun, 26 Apr 2020 18:19:11 +0000 (19:19 +0100)]
dot/emacs: Put the unqualified hostname in the frame title.
Mark Wooding [Sat, 25 Apr 2020 22:08:29 +0000 (23:08 +0100)]
el/dot-emacs.el: Sharpen up the page delimiter patterns.
The page-banner pattern is now much more precise: we need a brief
comment-opening sequence, up against the left margin, exactly five `-'s,
an optional heading surrounded by spaces, and then more `-'s to the end
of the line, with an optional short comment-closing sequence or knob.
I've not been especially picky about the comment opening and closing
sequences except that they should be short, but I don't think that will
be a problem.
We now need the `^L' to be at the start of the line. The documentation
implies that Emacs already ensured this, but that's not true.
Mark Wooding [Sat, 25 Apr 2020 22:07:05 +0000 (23:07 +0100)]
el/dot-emacs.el: Fix page motion properly.
Emacs's built-in page motion machinery wants pages to start /after/ the
delimiter, but since I'm looking for page-heading banners, I want the
page to start /before/ the banner. So add some advice so that Emacs
does the right thing.
Mark Wooding [Sat, 25 Apr 2020 20:54:05 +0000 (21:54 +0100)]
bin/fixsub: Add little script for hacking Dovecot subscription files.
Mark Wooding [Sat, 25 Apr 2020 01:21:03 +0000 (02:21 +0100)]
dot/shell-rc: Write the various control sequences to the terminal explicitly.
Mark Wooding [Sat, 25 Apr 2020 01:17:57 +0000 (02:17 +0100)]
dot/zshrc: Fix arguments to the hooks.
The `precmd' hook doesn't take an argument -- what would it say anyway?
The `preexec' hook should have the command, only without newlines,
because otherwise the newline aborts the set-title control sequence,
and (a) the title doesn't get changed after all, and (b) lines after the
first get spammed to the terminal output.
Fortunately, `zsh' provides a version of the command without the
newlines, which looks purpose-built for this application.
Mark Wooding [Fri, 24 Apr 2020 23:32:24 +0000 (00:32 +0100)]
dot/gnus-local.el.distorted: Set `odin.gg' sender address if applicable.
Gather an alist mapping mailbox names to `odin' local-parts and consult
it when building the sender address.
Mark Wooding [Fri, 24 Apr 2020 23:30:51 +0000 (00:30 +0100)]
dot/gnus-local.el.distorted: Refactor the posting-style for `crap.*'.
Capture the mailbox name first, then build the sender address.
Mark Wooding [Fri, 24 Apr 2020 23:04:38 +0000 (00:04 +0100)]
dot/gnus-local.el.distorted: Sink `gnus-posting-styles' below `odin'.
Like it might depend on the `odin' data at some point.
Mark Wooding [Fri, 24 Apr 2020 23:02:46 +0000 (00:02 +0100)]
dot/gnus-local.el.distorted: Rename `list' to `splits'.
As if I might want to accumulate some other value some day.
Mark Wooding [Fri, 24 Apr 2020 23:01:08 +0000 (00:01 +0100)]
dot/gnus-local.el.distorted: Change how `odin' data is collected.
Rename the function, and change it so that it updates a variable rather
than just returns the result. This will make it easier to produce other
kinds of reports later.
Mark Wooding [Fri, 24 Apr 2020 23:05:10 +0000 (00:05 +0100)]
dot/gnus-local.el.distorted: Add header for `nnmail-split-abbrev-alist'.
Must have forgotten this last time.
Mark Wooding [Fri, 24 Apr 2020 22:58:59 +0000 (23:58 +0100)]
dot/gnus-local.el.distorted: Add a little header for the `odin' hacking.
Mark Wooding [Fri, 24 Apr 2020 22:56:29 +0000 (23:56 +0100)]
el/dot-emacs.el: Use `mupdf', rather than Emacs's terrible built-in viewer.
Mark Wooding [Fri, 24 Apr 2020 22:55:16 +0000 (23:55 +0100)]
dot/emacs: Set envelope sender from headers when sending email.
Mark Wooding [Thu, 23 Apr 2020 12:43:39 +0000 (13:43 +0100)]
dot/ipython-config.py: Prevent `IPython' from changing the terminal title.
It doesn't have anything useful to say.
Mark Wooding [Thu, 23 Apr 2020 09:16:43 +0000 (10:16 +0100)]
dot/emacs: Permit duplicate entry names.
My database legitimately knows of two people with the same name.
Mark Wooding [Thu, 23 Apr 2020 09:15:34 +0000 (10:15 +0100)]
el/dot-emacs.el: Use more recent names for `calendar' access functions.
These changed back in Emacs 23, and the compatibility aliases don't
exist in Emacs 26 (why?!).
Mark Wooding [Thu, 23 Apr 2020 09:14:19 +0000 (10:14 +0100)]
el/dot-emacs.el: Add missing `mdw-' prefix on `mdw-terminal-title-alist'.
Mark Wooding [Thu, 23 Apr 2020 09:12:59 +0000 (10:12 +0100)]
el/dot-emacs.el: Use plain `equal' for comparing terminal names.
It seems that the three-argument version of `assoc' is too new.
Mark Wooding [Thu, 23 Apr 2020 01:23:13 +0000 (02:23 +0100)]
el/dot-emacs.el: Update terminal titles as we go.
Mark Wooding [Thu, 23 Apr 2020 01:22:42 +0000 (02:22 +0100)]
dot/emacs: Make frame titles a bit more useful.
Mention the user name; don't bother distinguishing between kinds of
Emacs.
Mark Wooding [Wed, 22 Apr 2020 23:46:30 +0000 (00:46 +0100)]
dot/Xdefaults: Tweak `xterm' resources so I can set the title.
For some stupid reason, you can't allow SendEvents and setting window
titles. This doesn't make any sense to me. Anyway, I only need
SendEvents for `xduplic-copier', and I use `pterm' for that rather than
`xterm', so let's have the titles.
Mark Wooding [Wed, 22 Apr 2020 23:11:50 +0000 (00:11 +0100)]
dot/shell-rc: Set the window title to something useful.
I have too many of the damned things to have them all show the same
title.
Mark Wooding [Wed, 22 Apr 2020 23:11:22 +0000 (00:11 +0100)]
dot/shell-rc: Capture the hostname once and for all.
Rather than every time we set the prompt.
Mark Wooding [Wed, 22 Apr 2020 23:10:56 +0000 (00:10 +0100)]
dot/putty-defaults: Permit changing the window title.
Mark Wooding [Wed, 22 Apr 2020 21:13:55 +0000 (22:13 +0100)]
dot/shell-rc: Track rename of `$MDW_BUILDENV' to `$CROSS_BUILDENV'.
Mark Wooding [Wed, 22 Apr 2020 21:04:31 +0000 (22:04 +0100)]
bin/wakey.sh: Don't vomit at the terminal if the active window is dead.
I don't care about the error here: if `xwininfo' fails, then all that
happens is that I miss some (or all) of the window-ids, which is fine by
me. In particular, if this happens with the terminal window, then I've
got nothing to complain into anyway.
Mark Wooding [Wed, 22 Apr 2020 19:17:56 +0000 (20:17 +0100)]
dot/zshrc: Automatically rehash command completions on a cache miss.
Solution found at https://bbs.archlinux.org/viewtopic.php?id=175388.
Mark Wooding [Tue, 21 Apr 2020 18:10:06 +0000 (19:10 +0100)]
bin/wakey.sh: Delete bogus space.
Mark Wooding [Tue, 21 Apr 2020 18:04:53 +0000 (19:04 +0100)]
bin/wakey.sh: Fix the sense of the startup condition.
Mark Wooding [Tue, 21 Apr 2020 18:02:30 +0000 (19:02 +0100)]
dot/gnus-local.el.distorted: Add my main chiark mail account.
Mark Wooding [Tue, 21 Apr 2020 18:02:05 +0000 (19:02 +0100)]
dot/gnus-local.el.distorted: Add split configuration to other mail servers.
Mark Wooding [Tue, 21 Apr 2020 12:32:29 +0000 (13:32 +0100)]
dot/bashrc: Delay setting `__mdw_running' so as not to clobber `$?'.
Mark Wooding [Tue, 21 Apr 2020 12:04:37 +0000 (13:04 +0100)]
bin/wakey.sh: Rename, now that it's not `zsh'-specific.
Mark Wooding [Tue, 21 Apr 2020 12:03:58 +0000 (13:03 +0100)]
bin/wakey.zsh: Use the new hook machinery to insinuate.
Mark Wooding [Tue, 21 Apr 2020 12:02:25 +0000 (13:02 +0100)]
bin/wakey.zsh: Quote arguments to `notify-send' for other shells.
`zsh' itself is fine here; but I'm making this portable to `bash'.
Mark Wooding [Tue, 21 Apr 2020 12:01:36 +0000 (13:01 +0100)]
bin/wakey.zsh: Delete the type setting.
It gets in the way and doesn't actually achieve anything useful, because
the arithmetic evaluation `(( ... ))' does all of the necessary work
anyway.
Mark Wooding [Tue, 21 Apr 2020 12:00:44 +0000 (13:00 +0100)]
bin/wakey.zsh: Correctly match `$LONG_RUNNING_IGNORE_LIST'.
Mark Wooding [Tue, 21 Apr 2020 11:59:53 +0000 (12:59 +0100)]
bin/wakey.zsh: Use `xwininfo -tree' like I should have done from the start.
I even commented in the commit message that I should have scanned
recursively; I just didn't spot that `xwininfo' would do all of the
heavy lifting for me.
Mark Wooding [Tue, 21 Apr 2020 11:59:05 +0000 (12:59 +0100)]
bin/wakey.zsh: Use `$SECONDS' rather than `$EPOCHREALTIME'.
It's portable to (even fairly old) `bash', for example.
Mark Wooding [Tue, 21 Apr 2020 11:57:06 +0000 (12:57 +0100)]
bin/wakey.zsh: Fix a stupid syntax error.
... which, for some reason, `zsh' accepted silently.
Mark Wooding [Tue, 21 Apr 2020 11:54:55 +0000 (12:54 +0100)]
dot/shell-rc, dot/bashrc, dot/zshrc: Introduce a formal notion of hooks.
Replace the `__mdw_precmd' and `__mdw_preexec' functions with hooks.
Each shell implementation is responsible for calling the hooks at the
right time, but the common core is responsible for maintaining the hooks
and doing the job of invoking the hook functions.
Use this machinery for the prompt setting and `screen' status things.
Mark Wooding [Tue, 21 Apr 2020 11:53:20 +0000 (12:53 +0100)]
dot/zshrc: Write numbers in odd bases using C notation.
Otherwise other programs which see this output get confused. It doesn't
help that `zsh' sets the output base from the initial input base.
Mark Wooding [Tue, 21 Apr 2020 11:52:16 +0000 (12:52 +0100)]
dot/zshrc: Hoist history settings above calling `.shell-rc'.
This way, `.shell-local' can override the settings.
Mark Wooding [Tue, 21 Apr 2020 11:51:54 +0000 (12:51 +0100)]
dot/shrc: Add missing trailer line.
Mark Wooding [Tue, 21 Apr 2020 11:51:05 +0000 (12:51 +0100)]
dot/bashrc, dot/zshrc: Promote invoking the common config.
There's going to be more machinery added around here.
Mark Wooding [Mon, 20 Apr 2020 18:28:23 +0000 (19:28 +0100)]
bin/wakey.zsh: Don't turn on if `WINDOWID' isn't set.
It doesn't have a good chance of working, even if you've turned on
`IGNORE_WINDOW_CHECK'.
Mark Wooding [Sun, 19 Apr 2020 20:49:25 +0000 (21:49 +0100)]
dot/putty-defaults: Hide the mouse cursor when typing.
Emacs does this, and it's not too annoying.
Mark Wooding [Sun, 19 Apr 2020 20:47:50 +0000 (21:47 +0100)]
el/dot-emacs.el: Revert `variable-pitch' to (server-side) Helvetica 12pt.
The anti-aliased `Sans' is harder to read and takes up more space. The
9pt Helvetica is a poor match for `6x13'.
Mark Wooding [Mon, 20 Apr 2020 12:18:36 +0000 (13:18 +0100)]
bin/wakey.zsh: Implement the active-window check from Lange's version.
This is actually rather annoying, because (unlike `xterm'), `pterm''s
announced `WINDOWID' isn't its toplevel, so we have to go digging. In
theory I should do a recursive walk, but, well, I don't yet.
Mark Wooding [Mon, 20 Apr 2020 12:17:02 +0000 (13:17 +0100)]
bin/wakey.zsh: Refactor the logic in `__wakey_precmd'.
Split it into two sections: one to decide whether to report a
notification, and a second to actually do it.
The logic for the first stage is going to become more complicated, and
this avoids having to have two copies of the notification code.
Mark Wooding [Mon, 20 Apr 2020 12:14:23 +0000 (13:14 +0100)]
bin/wakey.zsh: Don't do anything if there's no X display, or `notify-send'.
Mark Wooding [Mon, 20 Apr 2020 12:13:59 +0000 (13:13 +0100)]
bin/wakey.zsh: Implement `LONG_RUNNING_IGNORE_LIST' from Lange's version.
Mark Wooding [Tue, 14 Apr 2020 17:30:07 +0000 (18:30 +0100)]
dot/gnus.el: Make `.' be a symbol constituent when splitting mail.
This sometimes gets used in email address local parts.
Mark Wooding [Tue, 14 Apr 2020 17:24:32 +0000 (18:24 +0100)]
dot/gnus.el: Make `<' and `>' be punctuation when splitting mail.
Email addresses are commonly written between angle brackets in header
lines. I sometimes want to be able to parse out an entire email
address, or at least a local-part, from a header, as part of a Gnus
split specifier. But Gnus prepends a `.*' to the split regexp, so one
needs to take special precautions to start in the right place, typically
by using `\_<' to align to the start of a symbol. But if `<' is a
symbol character, then this won't work.
Worse, Gnus typically also tries to align to a word boundary by sneaking
in `\<'. But then we have `\<\_<', which rejects an email address
starting enclosed in `<' ... `>' altogether.
Fortunately, the syntax table used by Gnus while splitting email is
configurable, so we can override this silliness.
Mark Wooding [Mon, 20 Apr 2020 00:22:44 +0000 (01:22 +0100)]
bin/wakey.zsh: Add a new hack to tell me about long-running commands.
This idea was from Jonathan Lange's `undistract-me': see
https://github.com/jml/undistract-me
for the original for Bash.
Mark Wooding [Sun, 19 Apr 2020 23:39:51 +0000 (00:39 +0100)]
bin/disorder-notify, dot/e16-bindings: Use `notify-send', not `gdbus'.
Mark Wooding [Sat, 18 Apr 2020 22:25:03 +0000 (23:25 +0100)]
dot/emacs: Don't start a server if we're running as a daemon.
Emacs will just close it and try to start another anyway.
Mark Wooding [Sat, 18 Apr 2020 22:19:20 +0000 (23:19 +0100)]
dot/emacs: Don't use the `trash' on Emacs 23.
It doesn't actually work. Specifically, if you try to delete a file on,
say, `/tmp', then Emacs tries to rename it and fails with `EXDEV'.
This is especially troublesome because it breaks `emacs --daemon'.
Emacs doesn't usually delete its socket when it quits, so it gets left
behind as `/tmp/mdw/emacs1000/server' or something. When you run `emacs
--daemon' later, it finds the old socket and tries to delete it, which
fails. And /then/ you get left with a strange half-daemonized Emacs
which has crashed during startup, and the husk of its parent, and
neither of them can do anything very useful.
Mark Wooding [Sat, 18 Apr 2020 18:39:23 +0000 (19:39 +0100)]
dot/gnus.el, ...: Move general configuration into the common file.
This way, everyone benefits.
Mark Wooding [Sat, 18 Apr 2020 18:38:24 +0000 (19:38 +0100)]
dot/gnus-local.el.distorted: Require `nnmail' before mentioning its variables.
Fixes an error on startup.
Mark Wooding [Sat, 18 Apr 2020 02:28:43 +0000 (03:28 +0100)]
dot/profile: Persuade Gtk 3 not to hide scrollbars.
Idiotic idea.
Mark Wooding [Sat, 18 Apr 2020 02:27:53 +0000 (03:27 +0100)]
dot/gnus-local.el.distorted: Add more split rules.
Mark Wooding [Sat, 18 Apr 2020 02:26:52 +0000 (03:26 +0100)]
dot/gnus-local.el.distorted: Check `Envelope-To:' for recipients.
Mark Wooding [Fri, 17 Apr 2020 23:43:57 +0000 (00:43 +0100)]
dot/gtk3-settings.ini: Switch Gtk 3 theme to `raleigh-reloaded'.
The `compact' version is too lopsided, and, well, squished. It seems
that I have no ability to stick with a decision at the moment.
Mark Wooding [Fri, 17 Apr 2020 10:12:40 +0000 (11:12 +0100)]
dot/gnus-local.el.distorted: Remove the wildcard rule for `spam.'.
Now `spam.corpus' is handled correctly.
Mark Wooding [Fri, 17 Apr 2020 10:11:27 +0000 (11:11 +0100)]
dot/gnus-local.el.distorted: Abolish the `spam.' prefix.
Redesignate most of this as `crap'.
Mark Wooding [Fri, 17 Apr 2020 09:59:48 +0000 (10:59 +0100)]
dot/gnus-local.el.distorted: Add list for Cambridge crypto whisku.
Mark Wooding [Fri, 17 Apr 2020 09:59:26 +0000 (10:59 +0100)]
dot/gnus-local.el.distorted: Put the `nationwide' entries together.
Mark Wooding [Fri, 17 Apr 2020 09:56:41 +0000 (10:56 +0100)]
dot/gnus-local.el.distorted: Fix name of `noationwide' folder.
Broken in
a93d193834218880aebeb239586903acfa5bf164 because I'm a stoat.
Mark Wooding [Wed, 15 Apr 2020 22:54:11 +0000 (23:54 +0100)]
dot/gnus-local.el.distorted: Make new group `spam.oubliette' auto-expire.
Mark Wooding [Wed, 15 Apr 2020 21:05:42 +0000 (22:05 +0100)]
el/dot-emacs.el: Arrange for mail/news frames to be 80 columns wide.
Mark Wooding [Wed, 15 Apr 2020 21:05:03 +0000 (22:05 +0100)]
dot/emacs, el/dot-emacs.el: Formalize the frame-width fudge term.
Capture this in a variable so that we can use it in other places.
Mark Wooding [Wed, 15 Apr 2020 17:03:47 +0000 (18:03 +0100)]
dot/gnus-local.el.distorted: Collect and use the `odin.gg' mapping table.
An awful hack, but it seems to work.
Mark Wooding [Wed, 15 Apr 2020 17:02:44 +0000 (18:02 +0100)]
dot/gnus-local.el.distorted: Make `nnimap-...' settings be server vars.
Later versions of Gnus ignore them otherwise.
Mark Wooding [Wed, 15 Apr 2020 17:00:00 +0000 (18:00 +0100)]
dot/gnus-local.el.distorted: Remove `--insecure' for chiark.
It has a proper certificate now.
Mark Wooding [Wed, 15 Apr 2020 16:58:58 +0000 (17:58 +0100)]
dot/gnus-local.el.distorted: Collect mail for `jump-discuss' too.
Mark Wooding [Wed, 15 Apr 2020 16:57:40 +0000 (17:57 +0100)]
dot/gnus-local.el.distorted: Fix the Amazon pattern.
They send Marketplace email from a subdomain, so cope with that.
Mark Wooding [Wed, 15 Apr 2020 16:51:10 +0000 (17:51 +0100)]
dot/gnus-local.el.distorted: Be more careful about word boundaries.
I've found a number of things being sorted into the wrong folder as a
result of this.
Mark Wooding [Wed, 15 Apr 2020 16:48:27 +0000 (17:48 +0100)]
dot/gnus-local.el.distorted: Move select methods after split rules.
There's going to be a data dependency here.