feat: add lightweight mode entry and related hotkey support

This commit is contained in:
Tunglies
2025-03-23 03:10:48 +08:00
parent 69347160e9
commit d669650758
9 changed files with 39 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
use crate::{config::Config, core::handle, feat, log_err, utils::resolve};
use crate::{config::Config, core::handle, feat, log_err, module::lightweight, utils::resolve};
use anyhow::{bail, Result};
use once_cell::sync::OnceCell;
use parking_lot::Mutex;
@@ -147,6 +147,7 @@ impl Hotkey {
"clash_mode_direct" => || feat::change_clash_mode("direct".into()),
"toggle_system_proxy" => || feat::toggle_system_proxy(),
"toggle_tun_mode" => || feat::toggle_tun_mode(None),
"entry_lightweight_mode" => || feat::lightweight_mode(),
"quit" => || feat::quit(Some(0)),
#[cfg(target_os = "macos")]
"hide" => || feat::hide(),