Skip to content

Instantly share code, notes, and snippets.

@anekos
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save anekos/9445191 to your computer and use it in GitHub Desktop.

Select an option

Save anekos/9445191 to your computer and use it in GitHub Desktop.
yamr 起動用スクリプト
#!/bin/sh
DIR=/home/anekos/project/yamr
SCRIPT="$DIR/yamr.rb"
if [ -z "$1" ]
then
if [ "$XMONAD_LAUNCHER" = 1 ]
then
prefix=setsid
suffix="&"
fi
file=`ruby -ryaml -r"$DIR/yamr.rb" -e 'puts YAML.load_file("#{ENV["HOME"]}/.yamr.saves").keys' | percol`
$prefix ruby "$SCRIPT" "$file" &
[ "$XMONAD_LAUNCHER" = 1 ] && xc scratchpad zsh
else
$prefix ruby "$SCRIPT" "$@" &
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment