Add games/apps by hand (summit add), Custom source, README screenshots with Voidrunner

This commit is contained in:
alex committed 2026-11-24 05:29:45 +00:00
1 parent d939b515b7
commit 6807735d9e
9 files changed
+32 -4

No files matched your search

+2 -1
View File
@@ -19,7 +19,7 @@
<img src="docs/media/summit-unfiltered.png" width="49%" alt="Summit Unfiltered view: compact list grouped by source with the reason each entry was detected">
</p>
<p align="center"><sub>Real renders of the Slint GUI, made on a KDE neon test VM (X11) from its real Steam account: cover art from Steam's own cache, real playtime. Nothing is installed on that VM, so every game shows "Not installed". No game was running; the in-game overlay is not built yet.</sub></p>
<p align="center"><sub>Real renders of the Slint GUI, made on a KDE neon test VM (X11) from its real Steam account: cover art from Steam's own cache, real playtime. Steam is not logged in there, so no Steam game is installed and they show "Not installed". The one installed entry is <b>Voidrunner</b>, added by hand with <code>summit add</code>, pinned, with custom artwork (a screenshot, cropped to fit the cover). No game was running; the in-game overlay is not built yet.</sub></p>
> [!NOTE]
> **Pre-alpha.** What works today is the command-line core: library scanning with detection reasons, playtime tracking, Home pins, custom artwork, and per-game display profiles applied at launch. The launcher GUI, Steam shortcut export, in-game overlay and upscaling/frame-gen backends are planned and are **not built yet**. Nothing below is marked as working unless it is.
@@ -58,6 +58,7 @@ cargo build --release
./target/release/summit scan --why -p ~/Games # everything found, with reasons
./target/release/summit home # most played
./target/release/summit run my-game -- ./game.sh # applies the profile, runs it, tracks the time
./target/release/summit add "My Game" ~/Games/mygame/run.sh # add anything by hand (--software for apps)
./target/release/summit pin steam:620 # show on Home
./target/release/summit art steam:620 cover.png # custom artwork
./target/release/summit doctor my-game # Wayland or X11? what would run?
+10
View File
@@ -21,6 +21,8 @@ enum Cmd {
Home { #[arg(short, default_value_t = 10)] n: usize },
/// Launch an entry: apply its display profile, run it, track the time played
Run { id: String, #[arg(last = true)] cmd: Vec<String> },
/// Add a game or app by hand
Add { title: String, path: std::path::PathBuf, #[arg(long)] software: bool },
/// Add an entry to the Home screen
Pin { id: String },
/// Remove an entry from the Home screen
@@ -83,6 +85,14 @@ fn main() -> Result<()> {
let n = summit_core::names::fetch_missing(&ids, limit, 1500, |id, n| println!("{id}: {} ({})", if n.name.is_empty() { "?" } else { &n.name }, n.kind))?;
println!("resolved {n}");
}
Cmd::Add { title, path, software } => {
anyhow::ensure!(path.exists(), "{} does not exist", path.display());
let id = format!("custom:{}", title.to_lowercase().replace(' ', "-"));
let mut st = state::load();
st.custom.retain(|c| c.id != id);
st.custom.push(state::Custom { id: id.clone(), title, path: path.canonicalize()?.to_string_lossy().into_owned(), software });
state::save(&st)?; println!("added {id}");
}
Cmd::Pin { id } => { let mut st = state::load(); st.pin(&id); state::save(&st)?; println!("pinned {id}"); }
Cmd::Unpin { id } => { let mut st = state::load(); st.unpin(&id); state::save(&st)?; println!("unpinned {id}"); }
Cmd::Art { id, image } => {
+1 -1
View File
@@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Hash)]
#[serde(rename_all = "lowercase")]
pub enum Source { Steam, Heroic, Lutris, Heuristic }
pub enum Source { Steam, Heroic, Lutris, Heuristic, Custom }
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
+1
View File
@@ -91,6 +91,7 @@ pub fn full(extra: &[std::path::PathBuf], depth: usize) -> Vec<Entry> {
let mut all = crate::steam::scan();
all.extend(crate::epic::heroic());
all.extend(crate::epic::lutris());
all.extend(crate::state::custom_entries(&crate::state::load()));
let known: Vec<String> = all.iter().filter_map(|e| e.path.clone()).collect();
let mut found = Vec::new();
for r in extra { walk(r, depth, &mut found); }
+16
View File
@@ -8,9 +8,14 @@ use std::path::PathBuf;
#[serde(default)]
pub struct Tracked { pub seconds: u64, pub sessions: u32, pub last_played: u64 }
/// A game or app the user added by hand.
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct Custom { pub id: String, pub title: String, pub path: String, pub software: bool }
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)]
#[serde(default)]
pub struct State {
pub custom: Vec<Custom>,
pub pinned: Vec<String>,
pub artwork: HashMap<String, String>,
pub tracked: HashMap<String, Tracked>,
@@ -40,6 +45,17 @@ impl State {
}
}
pub fn custom_entries(st: &State) -> Vec<crate::model::Entry> {
use crate::model::*;
st.custom.iter().map(|c| Entry {
id: c.id.clone(), title: c.title.clone(), source: Source::Custom,
kind: if c.software { Kind::Software } else { Kind::Game },
installed: std::path::Path::new(&c.path).exists(), path: Some(c.path.clone()), steam_app_id: None,
playtime_minutes: 0, last_played: None,
reasons: vec![format!("added by you: {}", c.path)],
}).collect()
}
/// Steam keeps its own authoritative count for Steam games, so those use Steam's number.
/// Everything else (Heroic, Lutris, software, .exe) uses Summit's tracked sessions.
/// Never summed: that would double count Steam titles launched through Summit.
+2 -2
View File
@@ -11,7 +11,7 @@ fn accent(title: &str) -> Color {
Color::from_rgb_u8(r, g, b)
}
fn hours(m: u64) -> String { if m == 0 { "Never played".into() } else if m < 60 { format!("{m} min") } else { format!("{:.1} h", m as f64 / 60.0) } }
fn src_name(s: Source) -> &'static str { match s { Source::Steam => "STEAM", Source::Heroic => "HEROIC / EPIC / GOG", Source::Lutris => "LUTRIS", Source::Heuristic => "FOUND ON DISK" } }
fn src_name(s: Source) -> &'static str { match s { Source::Steam => "STEAM", Source::Heroic => "HEROIC / EPIC / GOG", Source::Lutris => "LUTRIS", Source::Heuristic => "FOUND ON DISK", Source::Custom => "ADDED BY YOU" } }
fn card(e: &Entry, pinned: bool, art: &std::collections::HashMap<String, String>) -> Card {
let cover_path = art.get(&e.id).map(std::path::PathBuf::from).or_else(|| e.steam_app_id.and_then(steam::cover));
@@ -37,7 +37,7 @@ fn main() {
lib.sort_by(|a, b| b.installed.cmp(&a.installed).then(b.playtime_minutes.cmp(&a.playtime_minutes)));
let mut unf: Vec<Card> = vec![];
for src in [Source::Steam, Source::Heroic, Source::Lutris, Source::Heuristic] {
for src in [Source::Steam, Source::Heroic, Source::Lutris, Source::Custom, Source::Heuristic] {
for (kind, label) in [(Kind::Game, "GAMES"), (Kind::Software, "SOFTWARE"), (Kind::Tool, "TOOLS")] {
let mut items: Vec<&Entry> = all.iter().filter(|e| e.source == src && e.kind == kind && e.installed).collect();
if items.is_empty() { continue; }
Binary file not shown.

Before

Width:  |  Height:  |  Size: 755 KiB

After

Width:  |  Height:  |  Size: 771 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 KiB

After

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 93 KiB