Last active
August 29, 2015 13:57
-
-
Save anekos/9445191 to your computer and use it in GitHub Desktop.
yamr 起動用スクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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