Skip to content

efogdev/mpris-timer

Repository files navigation

Play Timer

Build

Timer app pretending to be a media player.

image

Ultimately, serves the only purpose — to start a timer quickly and efficiently.
Notifications included! Utilizing GTK4, Adwaita and MPRIS interface.

image

Installation

flatpak install flathub io.github.efogdev.mpris-timer

AUR: play-timer
NixOS: mpris-timer

Demo

1

Play Timer aims to be as keyboard friendly as possible.
Use navigation keys (arrows, tab, shift+tab, space, enter) or start inputting numbers right away.

KDE Plasma

By default, Play Timer will use Breeze GTK4 theme with adjustments on Plasma.
In case you prefer the original Adwaita look, set PLAY_TIMER_IGNORE_KDE_THEME environment variable to any non-empty value.

image

CLI use

-ui
    Show timepicker UI (default true)
-start int
    Start the timer immediately, don't show UI (value in seconds)
-notify
    Send desktop notification (default true)
-rounded
    Rounded corners (default true)
-shadow
    Shadow for progress image
-color string
    Progress color (#HEX) for the player, use "default" for the GTK accent color (default "default")
-sound
    Play sound (default true)
-soundfile string
    Filename of the custom sound (must be .mp3)
-text string
    Notification text (default "Time is up!")
-title string
    Name/title of the timer (default "Timer")
-tray
    Force tray icon presence (default false)
-volume float
    Volume [0-1] (default 1)
-lowfps
    1 fps mode (energy saver, GNOME only)

Examples

# show UI for a red "Oven" timer
play-timer -title Oven -color "#FF4200"  

# start a silent 120s "Tea" timer immediately
play-timer -title Tea -rounded=0 -sound=0 -start 120

Development

Install gsettings schema (the app will crash on start otherwise):

sudo cp misc/io.github.efogdev.mpris-timer.gschema.xml /usr/share/glib-2.0/schemas/
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

Run:

go run cmd/main.go -help

Build:

go build -pgo default.pgo -tags wayland -o ./.bin/app ./cmd/main.go

There's a Dockerfile to build easily.

Flatpak:

flatpak run org.flatpak.Builder --force-clean --sandbox --user --install --install-deps-from=flathub --ccache .build io.github.efogdev.mpris-timer.yml

Contributors

@Tuba2 — app name and icon
@efogdev — oh wait that's me