A small program which makes a rofi game launcher menu possible by creating .desktop entries for games

Overview

rofi-games

A small program which makes a `rofi` game launcher menu possible by creating `.desktop` entries for games

version crates.io link License: GPL v2

rofi-games - demo image

Installation

Manual

  1. Clone repo:

    git clone https://github.com/Rolv-Apneseth/rofi-games.git
  2. 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:

  1. Clone that repo and take the .rasi files (or just copy the contents of the files). The relevant files are colours.rasi, launcher.rasi and games.rasi

  2. Put these with your rofi config, usually at ~/.config/rofi

  3. Run rofi with -theme games, so the full command becomes:

    rofi-games sync && rofi -show drun -drun-categories RofiGames -theme games
  4. 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.

You might also like...
A menu widget for tui-rs ecosystem

tui-menu A menu widget for tui-rs ecosystem. Features Sub menu groups. Intuitive movement. Item's data is generic as long as it Cloneable. Try cargo r

Easy configurable tmux display-menu
Easy configurable tmux display-menu

tmux-easy-menu Easy configurable tmux display-menu Setup cargo build And run with ./target/debug/tmux-menu show --menu {path-to-your-config} Configu

Maccha is an extremely extensible and themable power menu for Windows, macOS, and Linux.

Maccha I hate coffee. Maccha is an extremely extensible and themable power menu for Windows, macOS, and Linux. Plugins Plugins are written in Rust (ot

Scriptable tool to read and write UEFI variables from EFI shell. View, save, edit and restore hidden UEFI (BIOS) Setup settings faster than with the OEM menu forms.
Scriptable tool to read and write UEFI variables from EFI shell. View, save, edit and restore hidden UEFI (BIOS) Setup settings faster than with the OEM menu forms.

UEFI Variable Tool (UVT) UEFI Variable Tool (UVT) is a command-line application that runs from the UEFI shell. It can be launched in seconds from any

Dreamer is an extensible tool manager and shell for creating small, lightweight, dev environments instantly.

Dreamer 💤 Does what you want, not what you say. Dreamer is a universal tool management system for any language, any build system, and any framework.

TMM is a Linux native game modding tool. it allows to install and depoly mods for Linux native and wine games.

Tux Mod Manager TMM is a Linux native mod manager made with the Tauri toolkit. It can install, load, remove and deploy mods for both Linux native and

🐚+🦞 Ultra-portable Rust game engine suited for offline 2D games powered by WebAssembly

pagurus 🐚 + 🦞 Ultra-portable Rust game engine suited for offline 2D games powered by WebAssembly. Examples Snake Traditional snake game: examples/sn

Revolutionize handheld gaming with adaptive game settings. Optimize graphics and gameplay experience based on real-time system metrics. Open-source project empowering developers to enhance games on portable devices
Revolutionize handheld gaming with adaptive game settings. Optimize graphics and gameplay experience based on real-time system metrics. Open-source project empowering developers to enhance games on portable devices

Welcome to the server-side application for the HarmonyLink project. This innovative software is developed with the Rust programming language and is ai

Rust low-level minimalist APNG writer and PNG reader with just a few dependencies with all possible formats coverage (including HDR).

project Wiki https://github.com/js29a/micro_png/wiki at glance use micro_png::*; fn main() { // load an image let image = read_png("tmp/test.

Comments
Owner
Rolv Apneseth
Rolv Apneseth
A little application that makes it possible to display mpv's subs anywhere you want.

Mpv Subs Popout A little application that makes it possible to display mpv's subs anywhere you want. Why? You can now watch shows in foreign languages

sdaqo 4 Jul 14, 2023
fd is a program to find entries in your filesystem. It is a simple, fast and user-friendly alternative to find

fd is a program to find entries in your filesystem. It is a simple, fast and user-friendly alternative to find. While it does not aim to support all of find's powerful functionality, it provides sensible (opinionated) defaults for a majority of use cases.

David Peter 25.9k Jan 9, 2023
Menu Utilities for Desktop Applications in Rust.

muda Menu Utilities for Desktop Applications. Example Create the root menu and add submenus and men items. let mut menu = Menu::new(); let file_menu

Amr Bashir 28 Dec 16, 2022
A small utility that moves the start menu to the top-center of the screen in Windows 11.

TopCenterStart11 A small utility that moves the start menu to the top-center of the screen in Windows 11. As of right now, this application can only p

Ryan de Jonge 12 Nov 12, 2022
Ember is a minimalistic Rust library for creating 2D graphics, games, and interactive visualizations with ease and simplicity.

Ember Ember is a simple and fun 2D rendering library for Rust, allowing you to quickly create graphics and interactive applications with ease. It uses

null 8 May 4, 2023
Quickly find all blackhole directories with a huge amount of filesystem entries in a flat structure

findlargedir About Findlargedir is a tool specifically written to help quickly identify "black hole" directories on an any filesystem having more than

Dinko Korunic 24 Jan 1, 2023
locdev is a handy CLI tool that simplifies the process of adding, removing, and listing entries in the hosts file.

locdev ??️ locdev is a handy CLI tool that simplifies the process of adding, removing, and listing entries in the hosts file. You no longer need to de

Nick Rempel 20 Jun 5, 2023
A diff-based data management language to implement unlimited undo, auto-save for games, and cloud-apps which needs to retain every change.

Docchi is a diff-based data management language to implement unlimited undo, auto-save for games, and cloud-apps which needs to save very often. User'

juzy 21 Sep 19, 2022
AlterWare game modification updater & launcher

alterware-launcher Download latest release Unpack the archive and place alterware-launcher.exe in the game directory Run alterware-launcher.exe, after

mxve 4 Jun 12, 2023
A lightweight terminal menu for Rust

youchoose A simple, easy to use command line menu for Rust. Usage There are two methods you need to be familiar with to get started: Menu::new which t

Nathan Thomas 143 Dec 21, 2022