#!/bin/sh # steam game launcher using dmenu appdir="$HOME/.local/share/Steam/steamapps" [ -d "$appdir" ] || exit 1 list=$(find "$appdir" -name '*.acf' -print0 | \ xargs -0 -I{} awk -F '"' '/"name"/{name=$4}/"appid"/{printf "%s:%s\n",name,$4}' {} ) choice=$(printf '%s' "$list" | sort | dmenu -i -l 20) appid=$(printf '%s' "$choice" | cut -d: -f2) [ -n "$appid" ] && steam -applaunch "$appid" >/dev/null 2>&1 &