I'm trying to launch my Steam games through Rofi, but I've run into a bit of a hassle. Instead of just typing the game's name like "The Binding of Isaac" to start it, I have to type the command `steam steam://rungameid/250900`. Is there any way to set it up so that I can type the game's title directly in Rofi, and it triggers the correct command? Any suggestions would be greatly appreciated!
2 Answers
You can create a custom .desktop file for your game. It would look something like this:
[Desktop Entry]
Name=The Binding of Isaac
Exec=steam steam://rungameid/250900
Type=Application
Icon=steam
Terminal=false
This file should go in your $XDG_DATA_HOME/applications directory, which is typically ~/.local/share/applications. Rofi should pick it up from there.
If Rofi works like Wofi, it should automatically find the .desktop files Steam generates. Just make sure you're using the correct casing for the game name because it might be case-sensitive. You can pass -i to Rofi to enable case-insensitive searches if that helps!
So where exactly is the $XDG_DATA_DIRS? I found my .desktop file in ~/Desktop, is that a problem?