Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-3.0-only
SDK ?= ../osos-lab/rvx-sdk
OUT ?= build
extensions := balance crossfeed dsp night-shift playback-log
extensions := balance cover-grid crossfeed dsp night-shift playback-log

.PHONY: all $(extensions)
all: $(extensions)
Expand All @@ -14,6 +14,7 @@ $(extensions):
.PHONY: check
check:
$(PYTHON) extensions/balance/tests/run.py "$(abspath $(SDK))"
$(PYTHON) extensions/cover-grid/tests/run.py "$(abspath $(SDK))"
$(PYTHON) extensions/crossfeed/tests/run.py "$(abspath $(SDK))"
$(PYTHON) extensions/dsp/tests/run.py "$(abspath $(SDK))"
@mkdir -p "$(OUT)"
Expand Down
5 changes: 4 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ Balance, Crossfeed, DSP and the Night Shift scheduling and gamma code are from
RevolaOS extensions, revision 36d197b180e55a304ea0468de4330c0d07fe715f.
Night Shift derives from kayboll’s RepriseOS work. Playback Log derives from
the work of brilliant-alien and lgreitis in osos-lab. Its Settings artwork is
from osos-lab commit 10485fa. The original RevolaOS notice follows.
from osos-lab commit 10485fa. Cover Grid is from RevolaOS extensions, revision
72562b52fe7e4074a3479caac86b84ec1d285966; its catalog icon is a Cupertino
Icons glyph (MIT), see the LICENSE.cupertino-icons beside it. The original
RevolaOS notice follows.

RevolaOS
Copyright (C) 2026 The RevolaOS Authors. GPL-3.0-only.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ This repository hosts the source for these RepriseOS extensions and accepts prop
- [Night Shift](extensions/night-shift/) warms the display manually or automatically from sunset to sunrise.
- [Playback Log](extensions/playback-log/) records listening history for scrobbling and optional detailed reports.
- [Crossfeed](extensions/crossfeed/) blends a little of each stereo channel into the other for headphone listening. It uses the included [DSP library](extensions/dsp/).
- [Cover Grid](extensions/cover-grid/) shows albums as a grid of covers, from a row in Music after Cover Flow and on the main menu.

To add your extension to the catalog, open a PR following the [submission guide](catalog/README.md). Later releases are picked up automatically.
5 changes: 5 additions & 0 deletions catalog/sources.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ repo = "RepriseOS/repriseos-extensions"
path = "extensions/balance"
tag_prefix = "balance/v"

[cover-grid]
repo = "RepriseOS/repriseos-extensions"
path = "extensions/cover-grid"
tag_prefix = "cover-grid/v"

[crossfeed]
repo = "RepriseOS/repriseos-extensions"
path = "extensions/crossfeed"
Expand Down
4 changes: 4 additions & 0 deletions extensions/cover-grid/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-only
main_SOURCES := main.c
grid_SOURCES := grid.c scale.c
include $(SDK)/rv.mk
21 changes: 21 additions & 0 deletions extensions/cover-grid/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Cover Grid

Shows albums as a grid of covers, from a row in Music after Cover Flow and on the main menu. It uses Cover Flow's library query: the same music-only albums sorted by artist, and it does not open without music. Like Cover Flow, it reopens where it was left.

The grid shows four columns, two full rows and part of a third. The selected cover is lifted, with an edge in the selection colour and a shadow. Its album and artist scroll in the bar at the bottom. A scrollbar shows while the grid scrolls.

| Action | Result |
|---|---|
| Wheel | moves the selection, scrolling by whole rows once it leaves the two full rows |
| Select | opens the album's songs, at the top of the list |
| Menu | leaves the grid |

Covers load in the background through Cover Flow's loader, with its placeholder until they arrive. Each is scaled once and kept while the grid is on screen. Colours follow the stock roles, so themes apply.

Leaving the grid frees the covers. Opening an album keeps them for one second, then frees them.

| | |
|---|---|
| Default | off |
| Memory | the extension image while closed; about 160 KB of scaled covers and the artwork session while the grid is on screen |
| Settings | the two menu visibility flags |
20 changes: 20 additions & 0 deletions extensions/cover-grid/assets/LICENSE.cupertino-icons
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2016 Vladimir Kharlampidi

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions extensions/cover-grid/assets/settings-cover-grid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 94 additions & 0 deletions extensions/cover-grid/geometry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/* SPDX-License-Identifier: GPL-3.0-only */

/* The grid's layout inside the canvas, shared with the host tests: four
* columns of covers with gaps and margins, two full rows above the caption
* strip and a third peeking in, the lifted selected cover and the scrollbar. */

#ifndef COVER_GRID_GEOMETRY_H
#define COVER_GRID_GEOMETRY_H
#include <stdint.h>

enum {
GRID_COLUMNS = 4,
GRID_COVER = 77,
GRID_GAP = 2,
GRID_MARGIN = 3,
GRID_PITCH = GRID_COVER + GRID_GAP,
/* The selected cover grows by this much on each side, inside a
* selection-coloured edge and a shadow. */
GRID_LIFT = 5,
GRID_LIFT_SIZE = GRID_COVER + 2 * GRID_LIFT,
GRID_EDGE = 2,
GRID_SHADOW = 3,
/* The caption strip at the bottom: the visible rows of the Now Playing
* status bar's background. */
GRID_CAPTION = 22,
/* Rows that fit entirely above the caption strip; a third peeks below. */
GRID_FULL_ROWS = 2,
GRID_VISIBLE_ROWS = GRID_FULL_ROWS + 1,
GRID_VISIBLE_COVERS = GRID_COLUMNS * GRID_VISIBLE_ROWS,
};

static inline int grid_clamp(int value, int low, int high)
{
return value < low ? low : value > high ? high : value;
}

/* The first visible row after moving the selection to `index`: the selection
* stays within the two full rows, scrolling by whole rows. */
static inline int grid_top_row(int top, int index)
{
int row = index / GRID_COLUMNS;
if (row < top)
return row;
if (row >= top + GRID_FULL_ROWS)
return row - GRID_FULL_ROWS + 1;
return top;
}

/* The top left of album `index`'s cell with `top` the first visible row; 0
* when the cell is not among the visible rows. */
static inline int grid_cell(int index, int top, int *x, int *y)
{
int row = index / GRID_COLUMNS - top;
if (index < 0 || row < 0 || row >= GRID_VISIBLE_ROWS)
return 0;
*x = GRID_MARGIN + index % GRID_COLUMNS * GRID_PITCH;
*y = GRID_MARGIN + row * GRID_PITCH;
return 1;
}

/* The lifted cover's origin for the cover at (x, y): centred on it and shifted
* inward so that its edge stays inside `width` and above the caption strip,
* `height` being the covers' area. */
static inline void grid_lift_origin(int x, int y, int width, int height, int *lx,
int *ly)
{
*lx = grid_clamp(x - GRID_LIFT, GRID_EDGE, width - GRID_LIFT_SIZE - GRID_EDGE);
*ly = grid_clamp(y - GRID_LIFT, GRID_EDGE, height - GRID_LIFT_SIZE - GRID_EDGE);
}

/* The stock list thumb: a track from 1 px below the top to 2 px above the
* bottom of the covers' area, a thumb as long as the visible fraction (at
* least `minimum`) placed by the scrolled fraction, with its art reaching 1 px
* above and 2 px below it. 0 when the grid does not scroll. */
static inline int grid_scrollbar_span(int count, int top, int height, int minimum,
int *y0, int *y1)
{
int rows = (count + GRID_COLUMNS - 1) / GRID_COLUMNS;
if (rows <= GRID_FULL_ROWS)
return 0;
int track = height - 3;
int scroll = (rows - GRID_FULL_ROWS) * GRID_PITCH;
int length = track * height / (scroll + height);
if (length < minimum)
length = minimum;
if (length > track)
length = track;
int position = (track - length) * top * GRID_PITCH / scroll;
*y0 = position;
*y1 = position + length + 3;
return 1;
}

#endif
Loading