Login Register






Openbox: List Steam Games filter_list
Author
Message
Openbox: List Steam Games #1
This is a bash script for Openbox that lists all of your installed steam games in your little openbox window thing.

[Image: CJx6EeN.png]

Code:
#This script creates an Openbox pipe menu to list all currently installed steam games as well as launch them. #To install: #Put this script in ~./config/openbox/scripts/steam.sh (or elsewhere if you want to edit the below <menu>) #Edit the preferences of steam.sh to allow running as a program #Add the below line to menu.xml (without the comment of course) #<menu execute="~/.config/openbox/scripts/steam.sh" id="steam" label="Steam"/> #!/bin/bash STEAMAPPS=~/.local/share/Steam/steamapps echo '<openbox_pipe_menu>' echo '<item label="Launch Steam"><action name="Execute"><execute>steam</execute></action></item>' echo '<separator/>' for file in $(ls $STEAMAPPS/*.acf -1v); do ID=$(cat "$file" | grep '"appid"' | head -1 | sed -r 's/[^"]*"appid"[^"]*"([^"]*)"/\1/') NAME=$(cat "$file" | grep '"name"' | head -1 | sed -r 's/[^"]*"name"[^"]*"([^"]*)"/\1/') echo "<item label=\"$NAME\"><action name=\"Execute\"><execute>steam -applaunch $ID</execute></action></item>" done echo '</openbox_pipe_menu>'

Pretty straightforward if I do say so myself.

Reply

RE: Openbox: List Steam Games #2
Interesting, when I get Linux re-installed, (rip-pc), I'll check this out!
You can find me on Keybase
"Reach the state of ubiquity, and you will be in control"
Student, Technician, Designer, and more.
[Image: YUpAMpx.png]

[+] 1 user Likes zorrophreak's post
Reply

RE: Openbox: List Steam Games #3
Code:
#This script is a generally used Openbox pipe menu to list all currently installed steam games as well as launch them. #To install: #Put this script in ~./config/openbox/scripts/steam.sh (or elsewhere if you want to edit the below <menu>) #Add the below line to menu.xml (without the comment of course) #<menu execute="~/.config/openbox/scripts/steam.sh" id="steam" label="Steam"/> #!/bin/bash STEAMAPPS=~/.local/share/Steam/steamapps echo '<openbox_pipe_menu>' echo '<item label="Launch Steam"><action name="Execute"><execute>steam</execute></action></item>' echo '<separator/>' for file in $STEAMAPPS/*.acf ; do ID=$(grep '"appid"' "$file" | head -1 | awk -F\" '{print $4}') NAME=$(grep '"name"' "$file" | head -1 | awk -F\" '{print $4}') echo "<item label=\"$NAME\"><action name=\"Execute\"><execute>steam -applaunch $ID</execute></action></item>" done echo '</openbox_pipe_menu>'

An updated version that is a lot more efficient for less resources.

Reply