]> code.delx.au - dotfiles/commitdiff
Mutt xterm titlebars
authorJames Bunton <jamesbunton@delx.net.au>
Sun, 28 Oct 2007 10:43:20 +0000 (21:43 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Sun, 28 Oct 2007 10:43:20 +0000 (21:43 +1100)
.mutt/display
.mutt/set_xtitle [new file with mode: 0755]

index eea07fe696a1b725f6aacd7744144d46f41a7ba5..525458695a61d48ea9edbc155664fc144f8eea35 100644 (file)
@@ -22,6 +22,9 @@ set pager_index_lines=5
 # Don't scroll past the current message in the pager
 set pager_stop
 
+# Format for the status bar
+set status_format="$HOME/.mutt/set_xtitle '-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---'|"
+
 # Format for messages in the index
 set index_format='%4C %Z %H %{%b %d} %-15.15L %s'
 
diff --git a/.mutt/set_xtitle b/.mutt/set_xtitle
new file mode 100755 (executable)
index 0000000..f9b8a23
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Demonstration of format string pipes. Sets the xterm title and returns the
+# string unchanged.
+#
+# Example usage:
+# set status_format="mutt_xtitle '%r %f (%L) [Msgs:%?M?%M/?%m%?n? New:%n?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?]'|"
+
+printf "\033]0;$1\007" > /dev/tty
+echo "$1"