feat: Optimize copy environment variable logic (#106)

This commit is contained in:
Pylogmon
2023-12-08 22:16:42 +08:00
committed by GitHub
parent 6b7465a4b0
commit 15ab43963d
8 changed files with 50 additions and 21 deletions

View File

@@ -26,6 +26,9 @@ pub struct IVerge {
/// tray click event
pub tray_event: Option<String>,
/// copy env type
pub env_type: Option<String>,
/// enable traffic graph default is true
pub traffic_graph: Option<bool>,
@@ -133,6 +136,10 @@ impl IVerge {
clash_core: Some("clash-meta".into()),
language: Some("zh".into()),
theme_mode: Some("system".into()),
#[cfg(not(target_os = "windows"))]
env_type: Some("bash".into()),
#[cfg(target_os = "windows")]
env_type: Some("powershell".into()),
theme_blur: Some(false),
traffic_graph: Some(true),
enable_memory_usage: Some(true),
@@ -172,6 +179,7 @@ impl IVerge {
patch!(theme_mode);
patch!(theme_blur);
patch!(tray_event);
patch!(env_type);
patch!(traffic_graph);
patch!(enable_memory_usage);