rofi-games
A small program which makes a `rofi` game launcher menu possible by creating `.desktop` entries for games
Installation
Manual
-
Clone repo:
git clone https://github.com/Rolv-Apneseth/rofi-games.git
-
Use make to install (requires
cargo
)cd rofi-games && make install
Uninstall with make uninstall
Cargo
cargo install rofi-games
Note
If installing with cargo
, make sure the bin
folder is on your $PATH
by adding the following line to your .bashrc
or .xprofile
etc.:
export PATH="${PATH:+${PATH}}:$HOME/.cargo/bin"
If you have set $CARGO_HOME
, use this instead:
export PATH="${PATH:+${PATH}}:$CARGO_HOME/bin"
AUR
paru -S rofi-games
Usage
After installing, simply run rofi-games sync
to generate .desktop
files at $XDG_DATA_HOME/applications/rofi_games
To display a menu with these using rofi
, use the following command:
rofi -show drun -drun-categories RofiGames -show-icons
These can be combined for an easy one-liner to run with a keybind:
rofi-games sync && rofi -show drun -drun-categories RofiGames -show-icons
Commands
-
sync: Sync desktop entries by deleting any entries which don't match any currently detected game, then creating desktop entries for any detected games which don't have a matching desktop entry. This is what I would recommend as the default way to run this program
-
reset: Reset desktop entries by completely deleting the current desktop entries folder this program creates, then re-generating desktop entries for all detected games
-
delete: Simply deletes the desktop entries folder created by this program
Theme
For the optimal experience, and to achieve what is shown in the demo image, use a good rofi
theme.
The theme used in the demo image can be found in my dotfiles here. To use it, follow these steps:
-
Clone that repo and take the
.rasi
files (or just copy the contents of the files). The relevant files arecolours.rasi
,launcher.rasi
andgames.rasi
-
Put these with your
rofi
config, usually at~/.config/rofi
-
Run
rofi
with-theme games
, so the full command becomes:rofi-games sync && rofi -show drun -drun-categories RofiGames -theme games
-
Modify config files to suit your needs / preferences
Todo
- Support more than just Steam games (depends how difficult this is to implement)
- Change approach to no longer use desktop entries so as to not clutter up the
drun
menu - Figure out how to make this into actual
rofi
extension to be run with-modi
Credits
The original idea belongs (as far as I know) to @ntcarlson, so big thanks to them. The original script I used to use for this is from this Reddit post they shared.
However, I had modified it as I didn't like that sub menu for each game, and the script didn't work to update entries sometimes (as well as it didn't remove old entries for games I no longer had installed), so eventually I decided to have a go at making a Rust program out of it.