Created
July 26, 2012 03:35
-
-
Save seanbutnotheard/3180091 to your computer and use it in GitHub Desktop.
Openbox pipemenu script to list installed Desura games.
This file contains 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/bash | |
if [ -d $HOME/.desura ]; then | |
gamedir=$HOME/.desura/games | |
else | |
gamedir=/opt/desura/common | |
fi | |
desura=$(which desura 2> /dev/null || which desurium 2> /dev/null) | |
echo "<openbox_pipe_menu>" | |
echo "<item label=\"desura client\">" | |
echo "<action name=\"Execute\">" | |
echo "<execute>$desura</execute>" | |
echo "</action>" | |
echo "</item>" | |
echo "<separator/>" | |
for game in $(ls $gamedir); do | |
launcher=$(ls $gamedir/$game/ | grep desura_launch_Play) | |
if [ "$?" = "0" ]; then | |
echo "<item label=\"$game\">" | |
echo "<action name=\"Execute\">" | |
echo "<execute>\"$gamedir/$game/$launcher\"</execute>" | |
echo "</action>" | |
echo "</item>" | |
fi | |
done | |
echo "</openbox_pipe_menu>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment