mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 08279158f4cf25d838e832bd992be024f5117d6d
parent a92d33bfc19cfe4226a77f08c8c4959c8ccdd5b8
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Wed, 23 Jul 2014 10:27:47 +0200

Merge branch 'master' of gitorious.org:mybin/mybin

Diffstat:
dmenu_run_urxvtcd | 16++++++++++++++++
my-mutt | 2+-
2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/dmenu_run_urxvtcd b/dmenu_run_urxvtcd @@ -0,0 +1,16 @@ +#!/bin/sh +# modified version of dmenu_run to run programs with urxvtcd and shell + +cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"} +if [ -d "$cachedir" ]; then + cache=$cachedir/dmenu_run +else + cache=$HOME/.dmenu_cache # if no xdg dir, fall back to dotfile in ~ +fi +IFS=: +if stest -dqr -n "$cache" $PATH; then + L=$(stest -flx $PATH | sort -u | tee "$cache" | dmenu "$@") +else + L=$(dmenu "$@" < "$cache") +fi +urxvtcd -e zsh -c "$L" diff --git a/my-mutt b/my-mutt @@ -1,6 +1,6 @@ #!/bin/bash -# TODO: why the hell is this ls needed to make it work with urxvt?! +# TODO: why the hell is this needed to make it work with urxvt?! echo sleep 0.01 if grep "^`hostname`$" ~/.mutt/local_email > /dev/null