Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
96fff60
intiial commit for rich presence
hitblast Feb 5, 2026
f6789f4
update to v0.1.5; https://github.com/Mrmayman/quantumlauncher/pull/139
hitblast Feb 5, 2026
c955595
communicate through message handlers
hitblast Feb 5, 2026
5804232
experimental windows addition
hitblast Feb 6, 2026
0dce1ef
chore: update to latest fr lib'
hitblast Feb 6, 2026
4015bec
experimental fix for failing unix pipe paths
hitblast Feb 6, 2026
69d259a
update lockfile
hitblast Feb 6, 2026
f2fcdd5
Merge branch 'main' into main
Mrmayman Feb 6, 2026
a7f37b8
Update quantum_launcher/src/state/mod.rs
hitblast Feb 8, 2026
933e64d
Merge branch 'Mrmayman:main' into main
hitblast Feb 14, 2026
80c48d4
iced message module integration; need review
hitblast Feb 14, 2026
6389f8a
remove anyhow since not needed
hitblast Feb 14, 2026
46fd76d
much simpler design; v0.2.0 -> DiscordIPC Clone impl
hitblast Feb 14, 2026
b09bea4
current playing version (exit not implemented)
hitblast Feb 14, 2026
babd765
achieved demo with iced model
hitblast Feb 15, 2026
18420e1
add new setting for discord rich presence
hitblast Feb 15, 2026
022baa8
chore: test with this version
hitblast Feb 16, 2026
4a3fcb2
LESGO
hitblast Feb 16, 2026
5cca181
remove bloat logs for IPC client
hitblast Feb 16, 2026
409a750
Merge branch 'Mrmayman:main' into main
hitblast Feb 17, 2026
78ac7a6
use v0.3.1 for JSON optimizations in RPC
hitblast Feb 17, 2026
44945fd
update to version 0.3.2 for strict changes
hitblast Feb 17, 2026
bcf6f42
remove unnecessary DEPLOYMENT_TARGET env var at root
hitblast Feb 17, 2026
ccfadaa
test with instantly toggleable rich presence
hitblast Feb 17, 2026
440d2c1
use v4 of library
hitblast Feb 18, 2026
9e3a31d
use v0.4.4 as it handles rate-limiting
hitblast Feb 18, 2026
5450c24
update architectural noise
hitblast Feb 18, 2026
1b5edfd
state machine changes to IPC handling
hitblast Feb 18, 2026
1738cbb
do not reuse initial activity for future ones
hitblast Feb 18, 2026
6a458ed
simpler state machine
hitblast Feb 18, 2026
34dca52
new build script for apple silicon macs
hitblast Feb 18, 2026
c8e9c7b
update version to v0.4.5 for better close()
hitblast Feb 19, 2026
7d75709
even more elegant rich presences
hitblast Feb 20, 2026
8374267
modify workflow files
hitblast Feb 20, 2026
2fc5100
update bundle name according to macOS schematics
hitblast Feb 21, 2026
9c9d55c
Merge branch 'main' into main
hitblast Feb 22, 2026
a02c6dc
fix: clippy
hitblast Feb 22, 2026
09ac0c2
Merge branch 'Mrmayman:main' into main
hitblast Feb 23, 2026
a07ece3
resolve merge conflict
hitblast Mar 3, 2026
b7a642e
Merge remote-tracking branch 'upstream/main'
hitblast Mar 6, 2026
55286cf
Merge branch 'main' into main
Mrmayman Mar 15, 2026
191ad03
Fix some dependency issues
Mrmayman Mar 15, 2026
8eba879
Merge branch 'main' into main
hitblast Mar 29, 2026
e5c2f90
v0.8.1; big updates for rich presence in QL
hitblast Apr 5, 2026
f7d99b9
remove unused activity import
hitblast Apr 5, 2026
c3cf09e
Merge remote-tracking branch 'origin/main' into pr-139
Mrmayman Apr 5, 2026
472152d
Dev: Minor code tweaks
Mrmayman Apr 5, 2026
20fdeec
Dev: Add rich presence toggle to welcome and changelog, update changelog
Mrmayman Apr 5, 2026
bf4a76e
fix: merge conflicts
hitblast Apr 6, 2026
a3c75d9
add separate tab for discord presence-related things
hitblast Apr 6, 2026
0dbeded
add state fixes for proper custom initial content
hitblast Apr 6, 2026
623b263
update basic discord presence handler; library needs some updates
hitblast Apr 6, 2026
d0b889a
add toggle functionality
hitblast Apr 6, 2026
09a22c9
update things
hitblast Apr 6, 2026
ba20190
chore: add event mechanism
hitblast Apr 6, 2026
f6b6f7c
chore: update tab presence
hitblast Apr 6, 2026
35488cb
fix crashes and mc version rules in presence
hitblast Apr 6, 2026
1a0549b
chore: update filthy-rich to v0.8.2
hitblast Apr 6, 2026
d445b34
Set Now button now available
hitblast Apr 7, 2026
66a76a3
chore: properly document instance name toggle
hitblast Apr 7, 2026
533c9e5
feat: new status line for rich presences in presence tab!
hitblast Apr 7, 2026
e648e3d
chore: state-driven toggles section
hitblast Apr 7, 2026
f027c47
customization go BRRRRRRRRRRR
hitblast Apr 7, 2026
fad43af
chore: aeven more concise UI for presence tab
hitblast Apr 7, 2026
50240c8
heftier advancements in presence tech
hitblast Apr 7, 2026
7e0ccaf
chore: disable presences if details for each type of presence is missing
hitblast Apr 11, 2026
1f264a6
chore: disabled indicator for presences
hitblast Apr 11, 2026
de3af7b
Dev: use get_or_insert_default everywhere (cleaner)
Mrmayman Apr 14, 2026
c9ab718
Dev: Major code tweaks...
Mrmayman Apr 14, 2026
bf40e7b
Merge remote-tracking branch 'origin/main' into pr-139
Mrmayman Apr 14, 2026
58b0f90
Update scripts/sequoia_arm64_build.sh
Mrmayman Apr 14, 2026
0349f29
Clean up code
Mrmayman Apr 14, 2026
7ccbaaa
chore: made some changes to things
hitblast Apr 14, 2026
1b9b24d
filled up some edge cases regarding missing client references
hitblast Apr 16, 2026
1fb0140
bump filthy-rich to v0.8.3
hitblast Apr 16, 2026
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
99 changes: 35 additions & 64 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions quantum_launcher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ paste = "1"
# For the file picker
rfd.workspace = true

# For Discord Rich Presence management
filthy-rich = "0.1.9"

# Terminal
owo-colors.workspace = true
clap = { version = "4", features = ["help", "derive"] }
Expand Down
5 changes: 5 additions & 0 deletions quantum_launcher/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ impl Launcher {
let mut launcher =
Launcher::load_new(None, is_new_user, config).unwrap_or_else(Launcher::with_error);

{
let version = env!("CARGO_PKG_VERSION");
launcher.update_presence("Loaded launcher", &format!("Version {version}"));
}

let load_notes_command = if let (Some(instance), State::Launch(menu)) =
(launcher.selected_instance.clone(), &mut launcher.state)
{
Expand Down
11 changes: 11 additions & 0 deletions quantum_launcher/src/message_handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ impl Launcher {
let extra_java_args = self.config.extra_java_args.clone().unwrap_or_default();

let instance_name = self.instance().get_name().to_owned();

self.update_presence(
&format!("{instance_name}"),
&format!("Playing as {username}"),
);

Task::perform(
async move {
ql_instances::launch(
Expand Down Expand Up @@ -307,6 +313,11 @@ impl Launcher {
};
info!("Game exited ({status})");

self.update_presence(
&format!("Last instance: {}", instance.get_name()),
&format!("({} mode)", kind.to_lowercase()),
);

let log_state = if let State::Launch(MenuLaunch {
message, log_state, ..
}) = &mut self.state
Expand Down
33 changes: 30 additions & 3 deletions quantum_launcher/src/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use std::{
use iced::Task;
use notify::Watcher;
use ql_core::{
err, file_utils, read_log::LogLine, GenericProgress, InstanceSelection,
IntoIoError, IntoStringError, IoError, JsonFileError, LaunchedProcess, ModId, Progress,
LAUNCHER_DIR, LAUNCHER_VERSION_NAME,
err, file_utils, read_log::LogLine, GenericProgress, InstanceSelection, IntoIoError,
IntoStringError, IoError, JsonFileError, LaunchedProcess, ModId, Progress, LAUNCHER_DIR,
LAUNCHER_VERSION_NAME,
};
use ql_instances::auth::{ms::CLIENT_ID, AccountData, AccountType};
use tokio::process::ChildStdin;
Expand All @@ -20,6 +20,8 @@ use crate::{
stylesheet::styles::LauncherTheme,
};

use filthy_rich::ipc::DiscordIPCSync;

mod images;
mod menu;
mod message;
Expand Down Expand Up @@ -55,6 +57,8 @@ pub struct Launcher {
pub tick_timer: usize,
pub is_launching_game: bool,

pub discord_ipc_client: Option<DiscordIPCSync>,

pub java_recv: Option<ProgressBar<GenericProgress>>,
pub custom_jar: Option<CustomJarState>,
pub mod_updates_checked: HashMap<InstanceSelection, Vec<(ModId, String, bool)>>,
Expand Down Expand Up @@ -163,6 +167,19 @@ impl Launcher {

let persistent = config.c_persistent();

// discord rich presence identity
let discord_ipc_client = match DiscordIPCSync::new("1468876407756029965") {
Comment thread
hitblast marked this conversation as resolved.
Resolved
Ok(mut client) => {
if let Err(e) = client.run() {
err!("Discord Rich Presence failed to run: {e}");
None
} else {
Some(client)
}
}
Err(_) => None,
};

Ok(Self {
selected_instance: persistent
.selected_instance
Expand Down Expand Up @@ -196,6 +213,8 @@ impl Launcher {
is_log_open: false,
is_launching_game: false,

discord_ipc_client,

log_scroll: 0,
tick_timer: 0,

Expand All @@ -205,6 +224,12 @@ impl Launcher {
})
}

pub fn update_presence(&mut self, details: &str, state: &str) {
if let Some(ref mut client) = self.discord_ipc_client {
client.set_activity(details, state).unwrap_or_default()
}
}

pub fn with_error(error: impl Display) -> Self {
let error = error.to_string();
let launcher_dir = if error.contains("Could not get launcher dir") {
Expand Down Expand Up @@ -249,6 +274,8 @@ impl Launcher {
log_scroll: 0,
tick_timer: 0,

discord_ipc_client: None,

logs: HashMap::new(),
processes: HashMap::new(),
accounts: HashMap::new(),
Expand Down