summaryrefslogtreecommitdiffstats
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xarchievm8
-rwxr-xr-xbldins4
-rwxr-xr-xbrowser3
-rwxr-xr-xdmenu_run2
-rwxr-xr-xdown1
-rwxr-xr-xfixsubject10
-rw-r--r--functions16
-rwxr-xr-xgetimap3
-rwxr-xr-xgitprompt16
-rwxr-xr-xmplayer180
-rw-r--r--mplayer.fns154
-rwxr-xr-xmutt-notmuch189
-rwxr-xr-xwsync3
13 files changed, 403 insertions, 186 deletions
diff --git a/archievm b/archievm
index ff95900..67847b4 100755
--- a/archievm
+++ b/archievm
@@ -2,7 +2,8 @@
# Virtio somehow broken
[[ ! $(whoami) == 'root' ]] && exit 1
-modprobe kvm kvm_intel
+#sudo modprobe -a -v kvm kvm_intel virtio virtio_pci virtio_balloon virtio_blk virtio_net virtio_console virtio_rng 9pnet_virtio
+sudo modprobe -a -v kvm kvm_intel
debugk=0
nographic=1
@@ -11,7 +12,7 @@ test=0
runas="raghavendra"
DIR="/home/raghavendra/Arch/qemu"
bzImage="$DIR/kvmImage"
-image="/media/Inkq/Virt/Archie.img"
+image="/media/Sparowes/Virt/Archie.img"
soutput=1
#append="root=/dev/vda3"
@@ -75,9 +76,10 @@ else
fi
#-virtfs local,path=$DIR/module,security_model=passthrough,mount_tag=module \
+ #-m 512 $hugearg $snap -smp 2,cores=2,maxcpus=4 \
cmdline="qemu-kvm -name Archie -enable-kvm -s -monitor unix:$DIR/archie.sock,server,nowait \
- -m 512 $hugearg $snap -smp 2,cores=2,maxcpus=4 \
+ -m 512 $hugearg $snap \
-net nic,model=virtio,vlan=1 -net user,vlan=1,hostfwd=tcp:127.0.0.1:2222-:22 $=graph \
-virtfs local,path=$DIR/share,security_model=passthrough,mount_tag=share -balloon virtio \
-virtfs local,path=/var/cache/pacman/pkg,security_model=passthrough,mount_tag=pacman \
diff --git a/bldins b/bldins
index 4f9c2fd..2bcf490 100755
--- a/bldins
+++ b/bldins
@@ -38,13 +38,13 @@ export KCFLAGS=" -march=native -O2 -pipe "
if [[ $install == 0 ]];then
- [[ $clean == 0 ]] && make clean
+ [[ $clean == 1 ]] && make clean
if [[ $debug == 1 ]];then
#export BUILDCMD=" make $MAKEFLAGS bzImage "
#cp ~/config/kconfig/config.debug .config
- KCFLAGS=" -mtune=generic -O -pipe "
+ KCFLAGS=" -mtune=generic -O1 -pipe -g "
BUILDCMD=" make $MAKEFLAGS bzImage "
#LDFLAGS_MODULE=""
unset INSTALL_MOD_STRIP
diff --git a/browser b/browser
index ed1a7a1..57ed719 100755
--- a/browser
+++ b/browser
@@ -45,7 +45,8 @@ fi
#if [[ $URL == http://tinyurl* || $num1 == $num2 || ((! -t 1) && $isrxvt == 0) ]];then
if [[ $URL == http://tinyurl* || $isrxvt == 0 ]];then
OB="$BROWSER"
- $OB -remote "openurl($URL)"
+ #$OB -remote "openurl($URL)"
+ $OB "$URL"
#$OB "$URL"
else
OB="$TBROWSER"
diff --git a/dmenu_run b/dmenu_run
index 353fedb..d88cbf0 100755
--- a/dmenu_run
+++ b/dmenu_run
@@ -1,4 +1,4 @@
#!/bin/zsh
#PATH="/home/raghavendra/bin:/opt/wine/bin:/bin:/usr/bin:/sbin:/usr/sbin"
#exe=`dmenu_path_c | dmenu -i -fa 'xft:Bitstream:pixelsize=14' -nb black -nf white -p : ${1+"[email protected]"}` && exec ${=exe}
-exe=`dmenu_path | yeganesh -f -- -i -fn 'xft:Bitstream:pixelsize=19' -m 1 -sb aquamarine4 -nb grey2 -nf grey50 -p : ` && exec ${=exe}
+exe=`dmenu_path | yeganesh -f -- -i -fn 'xft:Bitstream:pixelsize=16' -m 1 -sb aquamarine4 -nb grey2 -nf grey50 -p : ` && exec ${=exe}
diff --git a/down b/down
index a91cf60..ef59b89 100755
--- a/down
+++ b/down
@@ -9,6 +9,5 @@ exit 1
sync
mount | grep loop | grep -v pacman && sudo umount /mnt*
unmount-removables || failed
-sleep 2
pidof tmux && ~/bin/tux killall force
sleep 1
diff --git a/fixsubject b/fixsubject
new file mode 100755
index 0000000..9831d26
--- a/dev/null
+++ b/fixsubject
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+use utf8;
+use Encode;
+
+binmode(STDOUT,':utf8');
+my $utf8 = "";
+while (<STDIN>){
+ $utf8 = $utf8 . Encode::decode('MIME-Header', $_);
+}
+print $utf8;
diff --git a/functions b/functions
index 7c9bf1a..657214e 100644
--- a/functions
+++ b/functions
@@ -121,9 +121,10 @@ done
#set +x
}
-function gdb(){
-/usr/bin/gdb --quiet
-}
+#function {gdb,cgdb} {
+#pid=$(pidof -s $1)
+#/usr/bin/$0 -- --quiet --pid=$pid
+#}
function genscope(){
/usr/bin/cscope -b -R -q
@@ -280,7 +281,7 @@ webman(){
man(){
if [[ ! -z $2 || -z $TMUX ]];then /usr/bin/man "[email protected]" ; return; fi
/usr/bin/man -w [email protected] &>/dev/null || return $?
- tmux split-window -p 83 "LC_ALL=C LANG=C exec /usr/bin/man [email protected]"
+ tmux split-window -p 90 "LC_ALL=C LANG=C exec /usr/bin/man [email protected]"
}
@@ -525,7 +526,7 @@ alias lsnew='noglob lsnew'
#function {news,mutt,ncm,vim,weechat,weechat-curses,newsbeuter,ncmpcpp,atop,rtorrent,torrent} {
function {news,mutt,ncm,weechat,weechat-curses,newsbeuter,ncmpcpp,atop,rtorrent,torrent} {
: ${(AA)muxaliases:=${(z)MUXAL}}
- if [[ -z $TMUX || $1 == -f ]];then
+ if [[ -z $TMUX || $1 == -f || -n $1 ]];then
[[ $1 == -f ]] && shift
if test $muxaliases[$0];then
=$muxaliases[$0] "[email protected]"
@@ -552,7 +553,7 @@ function {news,mutt,ncm,weechat,weechat-curses,newsbeuter,ncmpcpp,atop,rtorrent,
winum=$(~/bin/tux tnum $app)
if [[ -z $winum || $? != 0 ]];then
- print "$0 = Dead | Something ==> recreated in its session"
+ #print "$0 = Dead | Something ==> recreated in its session"
return 5
fi
@@ -576,6 +577,9 @@ function {reboot,sdown} {
eval "$=map[$command]"
fi
}
+startx(){
+ /usr/bin/startx &>|~/logs/X.log
+}
viewjson(){
python -mjson.tool < $1
diff --git a/getimap b/getimap
index 91835a3..090b1c6 100755
--- a/getimap
+++ b/getimap
@@ -17,7 +17,8 @@ left=$(/bin/df -h | grep home | head -1 | awk '{ print $5 }' | tr -d '%')
if [[ $left > 90 ]];then
echo "Low on space -- quitting" >> ~/logs/getmail.log
- exit 1
+ notify-send "========== ALERT ==============" "LOW ON SPACE"
+ exit 1
fi
notify-send "Mailman" "....Fetching mails."
diff --git a/gitprompt b/gitprompt
index 4636744..f114f91 100755
--- a/gitprompt
+++ b/gitprompt
@@ -2,25 +2,27 @@
# detect git first
trap 'print -n;exit 1' INT
-autoload -U colors && colors
+#autoload -U colors && colors
estatus=0
#isgit="$(git rev-parse --is-inside-work-tree 2>/dev/null)"
#isgit="$(git rev-parse --is-inside-work-tree 2>/dev/null)"
-if test (../)#.git 2>/dev/null;then
+dir="$(print (../)#.git)"
+if test $dir 2>/dev/null;then
#if [[ $isgit == "true" ]];then
local gprompt="("
- gprompt+="$(git branch | grep '*'| cut -d ' ' -f 2 | tr -d '\n')"
- #timeout 3 git status -s
- if [[ -n $(timeout -s KILL 2 git status -s) ]];then
- gprompt+="⚡";
+ gprompt+="${${$(<$dir/HEAD)[(ws| |)2]}[(ws:/:)-1]}"
+ #gprompt+="$(git branch | grep '*'| cut -d ' ' -f 2 | tr -d '\n')"
+ #timeout 3 git status -s
+ if [[ -n $(timeout -s KILL 2 git status -s) ]];then
+ gprompt+="⚡";
estatus=1
else
gprompt+="ʃ";
fi
gprompt+=")"
- printf " %s%s" "%{${fg[yellow]}%}" $gprompt "%{$reset_color%}"
+ print -n $gprompt
fi
exit $estatus
diff --git a/mplayer b/mplayer
index 82cad0e..605cf51 100755
--- a/mplayer
+++ b/mplayer
@@ -1,155 +1,5 @@
#!/bin/zsh
-HIST="$HOME/.mplayer.hist"
-AUX_INVO=0
-POSITION=0
-maxplayers=1
-network=0
-stdin=0
-firstime=0
-randnum=$((${RANDOM}%${maxplayers}))
-mkdir -p /tmp/mplayer
-MPSOCKET="/tmp/mplayer/$randnum.fif"
-fixedvo=1
-typeset -A vo_map
-vo_map=(1 fixed-vo 0 nofixed-vo)
-
-pecho(){
- msg="$1"
- file="$2"
- /bin/echo "$msg" >| $file &
- sleep 0.1
- echo < $file
-}
-
-# curl for non-strict url parsing ;)
-isurl () {
- curl -I -s "$url" &>/dev/null || return 1
- return 0
-}
-
-
-check_pattern(){
- pecho "get_property filename" $1
- if tail -2 /tmp/mplayer.log | /bin/grep 'ANS_filename' | /bin/grep -v grep ;then
- pecho "get_property pause" $1
- if tail -2 /tmp/mplayer.log | /bin/grep 'ANS_pause=no' | /bin/grep -v grep ;then
- retval=0
- return 0
- fi
- retval=2
- fi
- [[ -z $retval ]] && retval=1
- return 1
-}
-
-
-parse(){
-if [[ -z "$1" ]];then
- fnum=$(awk '{ print NR" "$0 }' $HIST | cut -d ":" -f 1 | uniq -f 1 | tac | ${=DMENU})
- [[ -z "$fnum" ]] && exit
- num=$(echo "$fnum" | cut -d " " -f 1)
- FILE=$(head -${num} $HIST | tail -1 | cut -d ":" -f 1)
-
- if [[ $fnum == *: ]];then
- name="$(cut -d ' ' -f 1 <<< $FILE)"
- POSITION="$(grep $name $HIST | tail -1 | cut -d ':' -f 2)"
- fi
-
-else
- if [[ $1 == "-" ]];then
- stdin=1
- return
- fi
- if isurl "$(tr -d '.' <<< $1)";then # Fix /a/b/c/d type
- FILE="$1"
- network=1
- else
- if [[ "[email protected]" == /* ]];then
- prefix=
- else
- prefix="$pwdir/"
- fi
- FILE="${prefix}[email protected]"
- fi
-fi
-retval=$FILE
-}
-
-preplay(){
- mpc pause &>/dev/null
- ln -sf $MPSOCKET /tmp/mplayer.fif || exit 1
-}
-
-check_status(){
-if [[ $fixedvo == 1 ]];then
- pidof mplayer || return 1
- echo >>| /tmp/mplayer.log
- retval=1
- for ff in /tmp/mplayer/*.fif;do
- if check_pattern $ff;then
- return $retval
- fi
- done
- return $retval
-else
- if xdotool search --class mplayer;then
- return 1
- else
- return 0
- fi
-fi
-}
-
-aux(){
-case $1 in
- status)
- check_status
- return $?
- ;;
- clean)
- rm /tmp/mplayer/* 2>/dev/null
- rm /tmp/mplayer.fif 2>/dev/null
- killall -9 mplayer 2>/dev/null
- rm /tmp/locks/mplayer* 2>/dev/null
- mv /tmp/mplayer.log /tmp/.mplayer.log
- exit
- ;;
- pause)
- pecho 'pause' $MPSOCKET
- ;;
- snext)
- pecho 'seek +10' $MPSOCKET
- ;;
- sprev)
- pecho 'seek -10' $MPSOCKET
- ;;
- pnext)
- pecho "pt_step 1" $MPSOCKET
- ;;
- pprev)
- pecho "pt_step -1" $MPSOCKET
- ;;
- stop)
- wheret
- echo "$retval" >>| ~/.mplayer.hist
- pecho 'stop' $MPSOCKET
- echo "#STOPPED ${file}" >>| /tmp/mplayer.log
- ;;
- *)
- return 1
-esac
-}
-
-wheret(){
- pecho 'get_time_pos' $MPSOCKET
- pecho 'get_property path' $MPSOCKET
- sleep 3
- LOG="tail -5 /tmp/mplayer.log"
- position=$(${=LOG} | /bin/grep ANS_TIME_POSITION | head -1 | cut -d "=" -f 2)
- file=$(${=LOG} | /bin/grep ANS_path | head -1 | cut -d "=" -f 2)
- retval="$file:$position"
-}
+source ~/bin/mplayer.fns
if [[ $0 == *mplayeraux ]];then
AUX_INVO=1
@@ -160,37 +10,38 @@ if [[ ! -e $MPSOCKET ]] ;then
firstime=1
mkfifo $MPSOCKET
ln -sf $MPSOCKET /tmp/mplayer.fif
- #notify-send "Mplayer" "mplayer starting up....."
+ notify-send "Mplayer" "mplayer starting up....."
fi
exec &>>|/tmp/mplayer.log
-
-
pwdir=$(pwd)
-pushd $HOME
-${=LOCK}/mplayer.$randnum /usr/bin/mplayer -$vo_map[$fixedvo] -msglevel all=4 -slave -idle -input file=$MPSOCKET -input conf=$HOME/.mplayer/input.conf.mine &!
-popd
+pushd -q $HOME
+if [[ $stdin == 1 ]];then
+ fd=$(readlink -f /dev/stdin)
+ exec 3<&0
+ exec 0</dev/tty
+ ${=LOCK}/mplayer.$randnum /usr/bin/mplayer -$vo_map[$fixedvo] -msglevel all=4 -slave -idle -input file=$MPSOCKET -input conf=$HOME/.mplayer/input.conf.mine &!
+else
+ ${=LOCK}/mplayer.$randnum /usr/bin/mplayer -$vo_map[$fixedvo] -msglevel all=4 -slave -idle -input file=$MPSOCKET -input conf=$HOME/.mplayer/input.conf.mine &!
+fi
+popd -q
FILE=$retval
preplay
-[[ $firstime == 1 ]] && sleep 2
+[[ $firstime == 1 ]] && sleep 1
if [[ $stdin == 1 ]];then
- fd=$(readlink -f /dev/stdin)
- exec 3<&0
- exec 0</dev/tty
- #${=LOCK}/mplayer.$randnum /usr/bin/mplayer -$vo_map[$fixedvo] -msglevel all=4 -slave -idle -input file=$MPSOCKET -input conf=$HOME/.mplayer/input.conf.mine &!
pecho "loadfile $fd " /tmp/mplayer.fif
- #/usr/bin/mplayer -
- exit 110
+ exit 11
else
pecho "loadfile \"$FILE\" 2" $MPSOCKET
fi
+(
check_status
# Queue or play
@@ -206,4 +57,5 @@ else
fi
fi
/bin/echo "mplayer \"$FILE\"" >>| ~/.current
+) &
# vim: set foldmethod=marker:
diff --git a/mplayer.fns b/mplayer.fns
new file mode 100644
index 0000000..772f56c
--- a/dev/null
+++ b/mplayer.fns
@@ -0,0 +1,154 @@
+#!/bin/zsh
+HIST="$HOME/.mplayer.hist"
+AUX_INVO=0
+POSITION=0
+maxplayers=1
+network=0
+stdin=0
+firstime=0
+randnum=$((${RANDOM}%${maxplayers}))
+mkdir -p /tmp/mplayer
+MPSOCKET="/tmp/mplayer/$randnum.fif"
+fixedvo=1
+typeset -A vo_map
+vo_map=(1 fixed-vo 0 nofixed-vo)
+
+pecho(){
+ msg="$1"
+ file="$2"
+ /bin/echo "$msg" >| $file &
+ sleep 0.1
+ echo < $file
+}
+
+# curl for non-strict url parsing ;)
+isurl () {
+ curl -I -s "$url" &>/dev/null || return 1
+ return 0
+}
+
+
+check_pattern(){
+ pecho "get_property filename" $1
+ if tail -2 /tmp/mplayer.log | /bin/grep 'ANS_filename' | /bin/grep -v grep ;then
+ pecho "get_property pause" $1
+ if tail -2 /tmp/mplayer.log | /bin/grep 'ANS_pause=no' | /bin/grep -v grep ;then
+ retval=0
+ return 0
+ fi
+ retval=2
+ fi
+ [[ -z $retval ]] && retval=1
+ return 1
+}
+
+
+parse(){
+if [[ -z "$1" ]];then
+ fnum=$(awk '{ print NR" "$0 }' $HIST | cut -d ":" -f 1 | uniq -f 1 | tac | ${=DMENU})
+ [[ -z "$fnum" ]] && exit
+ num=$(echo "$fnum" | cut -d " " -f 1)
+ FILE=$(head -${num} $HIST | tail -1 | cut -d ":" -f 1)
+
+ if [[ $fnum == *: ]];then
+ name="$(cut -d ' ' -f 1 <<< $FILE)"
+ POSITION="$(grep $name $HIST | tail -1 | cut -d ':' -f 2)"
+ fi
+
+else
+ if [[ $1 == "-" ]];then
+ stdin=1
+ return
+ fi
+ if isurl "$(tr -d '.' <<< $1)";then # Fix /a/b/c/d type
+ FILE="$1"
+ network=1
+ else
+ if [[ "[email protected]" == /* ]];then
+ prefix=
+ else
+ prefix="$pwdir/"
+ fi
+ FILE="${prefix}[email protected]"
+ fi
+fi
+retval=$FILE
+}
+
+preplay(){
+ mpc pause &>/dev/null
+ ln -sf $MPSOCKET /tmp/mplayer.fif || exit 1
+}
+
+check_status(){
+if [[ $fixedvo == 1 ]];then
+ pidof mplayer || return 1
+ echo >>| /tmp/mplayer.log
+ retval=1
+ for ff in /tmp/mplayer/*.fif;do
+ if check_pattern $ff;then
+ return $retval
+ fi
+ done
+ return $retval
+else
+ if xdotool search --class mplayer;then
+ return 1
+ else
+ return 0
+ fi
+fi
+}
+
+aux(){
+case $1 in
+ status)
+ check_status
+ return $?
+ ;;
+ clean)
+ rm /tmp/mplayer/* 2>/dev/null
+ rm /tmp/mplayer.fif 2>/dev/null
+ killall -9 mplayer 2>/dev/null
+ rm /tmp/locks/mplayer* 2>/dev/null
+ mv /tmp/mplayer.log /tmp/.mplayer.log
+ exit
+ ;;
+ pause)
+ pecho 'pause' $MPSOCKET
+ ;;
+ snext)
+ pecho 'seek +10' $MPSOCKET
+ ;;
+ sprev)
+ pecho 'seek -10' $MPSOCKET
+ ;;
+ pnext)
+ pecho "pt_step 1" $MPSOCKET
+ ;;
+ pprev)
+ pecho "pt_step -1" $MPSOCKET
+ ;;
+ stop)
+ wheret
+ echo "$retval" >>| ~/.mplayer.hist
+ pecho 'stop' $MPSOCKET
+ echo "#STOPPED ${file}" >>| /tmp/mplayer.log
+ ;;
+ *)
+ return 1
+esac
+}
+
+wheret(){
+ pecho 'get_time_pos' $MPSOCKET
+ pecho 'get_property path' $MPSOCKET
+ sleep 3
+ LOG="tail -5 /tmp/mplayer.log"
+ position=$(${=LOG} | /bin/grep ANS_TIME_POSITION | head -1 | cut -d "=" -f 2)
+ file=$(${=LOG} | /bin/grep ANS_path | head -1 | cut -d "=" -f 2)
+ retval="$file:$position"
+}
+
+# vim: set foldmethod=marker:
diff --git a/mutt-notmuch b/mutt-notmuch
new file mode 100755
index 0000000..e1fe909
--- a/dev/null
+++ b/mutt-notmuch
@@ -0,0 +1,189 @@
+#!/usr/bin/perl -w
+#
+# mutt-notmuch - notmuch (of a) helper for Mutt
+#
+# Copyright: © 2011 Stefano Zacchiroli <[email protected]>
+# License: GNU General Public License (GPL), version 3 or above
+#
+# See the bottom of this file for more documentation.
+# A manpage can be obtained by running "pod2man mutt-notmuch > mutt-notmuch.1"
+
+use strict;
+use warnings;
+
+use File::Path;
+use Getopt::Long;
+use Mail::Internet;
+use Mail::Box::Maildir;
+use Pod::Usage;
+
+
+# create an empty maildir (if missing) or empty an existing maildir"
+sub empty_maildir($) {
+ my ($maildir) = (@_);
+ rmtree($maildir) if (-d $maildir);
+ my $folder = new Mail::Box::Maildir(folder => $maildir,
+ create => 1);
+ $folder->close();
+}
+
+# search($maildir, $query)
+# search mails according to $query with notmuch; store results in $maildir
+sub search($$) {
+ my ($maildir, $query) = @_;
+
+ empty_maildir($maildir);
+ system("notmuch search --output=files $query"
+ . " | xargs --no-run-if-empty ln -s -t $maildir/cur/");
+}
+
+sub search_action([email protected]) {
+ my ($interactive, $results_dir, @params) = @_;
+
+ if (! $interactive) {
+ search($results_dir, join(' ', @params));
+ } else {
+ my $query = "";
+ my $done = 0;
+ while (! $done) {
+ print "search ('?' for man): ";
+ chomp($query = <STDIN>);
+ if ($query eq "?") {
+ system("man notmuch");
+ } elsif ($query eq "") {
+ $done = 1; # quit doing nothing
+ } else {
+ search($results_dir, $query);
+ $done = 1;
+ }
+ }
+ }
+}
+
+sub thread_action(@) {
+ my ($results_dir, @params) = @_;
+
+ my $mail = Mail::Internet->new(\*STDIN);
+ $mail->head->get('message-id') =~ /^<(.*)>$/; # get message-id
+ my $mid = $1;
+ my $tid = `notmuch search --output=threads id:$mid`;# get thread id
+ chomp($tid);
+
+ search($results_dir, $tid);
+}
+
+sub die_usage() {
+ my %podflags = ( "verbose" => 1,
+ "exitval" => 2 );
+ pod2usage(%podflags);
+}
+
+sub main() {
+ my $results_dir = "$ENV{HOME}/.cache/mutt_results";
+ my $interactive = 0;
+ my $help_needed = 0;
+
+ my $getopt = GetOptions(
+ "h|help" => \$help_needed,
+ "o|output-dir=s" => \$results_dir,
+ "p|prompt" => \$interactive);
+ if (! $getopt || $#ARGV < 0) { die_usage() };
+ my ($action, @params) = ($ARGV[0], @ARGV[1..$#ARGV]);
+
+ if ($help_needed) {
+ die_usage();
+ } elsif ($action eq "search" && $#ARGV == 0 && ! $interactive) {
+ print STDERR "Error: no search term provided\n\n";
+ die_usage();
+ } elsif ($action eq "search") {
+ search_action($interactive, $results_dir, @params);
+ } elsif ($action eq "thread") {
+ thread_action($results_dir, @params);
+ } else {
+ die_usage();
+ }
+}
+
+main();
+
+__END__
+
+=head1 NAME
+
+mutt-notmuch - notmuch (of a) helper for Mutt
+
+=head1 SYNOPSIS
+
+=over
+
+=item B<mutt-notmuch> [I<OPTION>]... search [I<SEARCH-TERM>]...
+
+=item B<mutt-notmuch> [I<OPTION>]... thread < I<MAIL>
+
+=back
+
+=head1 DESCRIPTION
+
+mutt-notmuch is a frontend to the notmuch mail indexer capable of populating
+maildir with search results.
+
+=head1 OPTIONS
+
+=over 4
+
+=item -o DIR
+
+=item --output-dir DIR
+
+Store search results as (symlink) messages under maildir DIR. Beware: DIR will
+be overwritten. (Default: F<~/.cache/mutt_results/>)
+
+=item -p
+
+=item --prompt
+
+Instead of using command line search terms, prompt the user for them (only for
+"search").
+
+=item -h
+
+=item --help
+
+Show usage information and exit.
+
+=back
+
+=head1 INTEGRATION WITH MUTT
+
+mutt-notmuch can be used to integrate notmuch with the Mutt mail user agent
+(unsurprisingly, given the name). To that end, you should define the following
+macros in your F<~/.muttrc> (replacing F<~/bin/mutt-notmuch> for the actual
+location of mutt-notmuch on your system):
+
+ macro index <F8> \
+ "<enter-command>unset wait_key<enter><shell-escape>~/bin/mutt-notmuch --prompt search<enter><change-folder-readonly>~/.cache/mutt_results<enter>" \
+ "search mail (using notmuch)"
+ macro index <F9> \
+ "<enter-command>unset wait_key<enter><pipe-message>~/bin/mutt-notmuch thread<enter><change-folder-readonly>~/.cache/mutt_results<enter><enter-command>set wait_key<enter>" \
+ "search and reconstruct owning thread (using notmuch)"
+
+The first macro (activated by <F8>) will prompt the user for notmuch search
+terms and then jump to a temporary maildir showing search results. The second
+macro (activated by <F9>) will reconstruct the thread corresponding to the
+current mail and show it as search results.
+
+To keep notmuch index current you should then periodically run C<notmuch
+new>. Depending on your local mail setup, you might want to do that via cron,
+as a hook triggered by mail retrieval, etc.
+
+=head1 SEE ALSO
+
+mutt(1), notmuch(1)
+
+=head1 AUTHOR
+
+Copyright: (C) 2011 Stefano Zacchiroli <[email protected]>
+
+License: GNU General Public License (GPL), version 3 or higher
+
+=cut
diff --git a/wsync b/wsync
index a868a8b..947f27a 100755
--- a/wsync
+++ b/wsync
@@ -64,6 +64,9 @@ do
print "Dirty repo"
pread "Commit $proj and then continue"
fi
+ git status
+ git add -A
+ git commit
git push --mirror -v ssh://[email protected]/$remotedir:t/$projname.git
fi
popd