~raphi/molok

Qt-based speedrun tracker
a month ago
5 months ago

#molok - Qt-based speedrun tracker

molok is a speedrun tracker for Linux which supports vertical and horizontal layouts.

Screenshot of the vertical layout

Screenshot of the horizontal layout

(Note: The transparency effect was done by OBS. By default, molok has a solid black background.)

The mailing list for this project is ~raphi/public-inbox@lists.sr.ht.

#Dependencies

Qt 5 core, widgets, and xml. Can be installed with

# Debian / Ubuntu
sudo apt install build-essential pkg-config qtbase5-dev libqt5core5a libqt5widgets5 libqt5xml5

# Arch Linux
sudo pacman -S base-devel qt5-base

#Usage

Copy config.default.hpp to config.hpp, and then edit config.hpp to your liking.

Run make && sudo make install to build and install.

When started, molok will ask for a .lss file. These can be created and edited at https://one.livesplit.org. The path to the .lss file can also be passed as a command line argument.

#Controls

There are three ways to control molok: Global hotkeys, POSIX signals, and keyboard.

Global hotkeys: Hotkeys must be set in your desktop environment. For example, on KDE open the system settings, navigate to "Shortcuts", click "Add Application", and select "molok". You will be offered to set hotkeys for start/split, skip, undo, and reset.

Keyboard: If and only if molok is focused, it will respond to the following key presses:

  • Space: Start/Split
  • s: Skip split
  • u: Undo split
  • r: Reset
  • p: Pause/Unpause
  • Ctrl+S: Save .lss file
  • Ctrl+O: Open .lss file
  • Right or Down: Scroll splits forward
  • Left or Up: Scroll splits backward

POSIX Signals: molok recognizes the following signals:

  • SIGRTMIN+0: Start/Split
  • SIGRTMIN+1: Skip split
  • SIGRTMIN+2: Undo split
  • SIGRTMIN+3: Reset
  • SIGRTMIN+4: Pause/Unpause

This is best combined with a tool like sxhkd, which can set global hotkeys. For example, using this configuration file:

F1
    pkill -SIGRTMIN+0 molok
F2
    pkill -SIGRTMIN+1 molok
F3
    pkill -SIGRTMIN+2 molok
shift + F4
    pkill -SIGRTMIN+3 molok

Signal handling is implemented in signals.cpp, keyboard handling is implemented in main.cpp.

#Roadmap

Goals:

  • Be an easily hackable speedrun tracker
  • Support basic speedrunning features, like Sum of best/Best possible time
  • Integrate with the LiveSplit ecosystem by using its file format

Non-goals:

  • Support every feature that LiveSplit supports
  • Configuration files
  • Windows support (however, molok should run perfectly fine on Windows if signals.cpp is replaced with a dummy implementation)

#License

molok - Qt-based speedrun tracker
Copyright (C) 2021 Raphael Robatsch

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.