Skip to content

Instantly share code, notes, and snippets.

@nadiaholmquist
Created December 3, 2014 16:58
Show Gist options
  • Save nadiaholmquist/cf564386d325f54958a4 to your computer and use it in GitHub Desktop.
Save nadiaholmquist/cf564386d325f54958a4 to your computer and use it in GitHub Desktop.
Script to update a Steam app folder in GNOME Shell
#!/bin/bash
# WARNING: This script is totally awful and it'll probably blow up if you are unlucky.
# You have been warned.
# NOTE: This script assumes that you've already created an app folder called "Steam".
# Don't forget to give it a name too.
cd ~/.local/share/applications
get_steam_games() {
echo -n "[" && (grep -rwnl "Play this game on Steam" | sed "s/'/\\\'/g" | sed "s/\(.*\)/'\1'/" && echo -n "]") | tr '\n' ',' | sed "s/,]$/]/"
}
gsettings set org.gnome.desktop.app-folders.folder:/org/gnome/desktop/app-folders/folders/Steam/ apps "$(get_steam_games)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment