Advertisement
NolanSyKinsley

Untitled

Apr 14th, 2015
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. STEAMAPPS=~/.steam/steam/steamapps/
  4.  
  5. echo '<openbox_pipe_menu>'
  6. for file in $(ls $STEAMAPPS/*.acf -1v); do
  7. ID=$(cat "$file" | grep '"appid"' | head -1 | sed -r 's/[^"]*"appid"[^"]*"([^"]*)"/\1/')
  8. NAME=$(cat "$file" | grep '"name"' | head -1 | sed -r 's/[^"]*"name"[^"]*"([^"]*)"/\1/')
  9. echo "<item label=\"$NAME\" icon=\"$HOME/.local/share/icons/hicolor/32x32/apps/steam_icon_$ID.png\"><action name=\"Execute\"><execute>steam steam://run/$ID</execute></action></item>"
  10. done | sort
  11. echo '</openbox_pipe_menu>'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement