user in gui template
parent
357d35f787
commit
451a1c43a3
|
|
@ -40,6 +40,7 @@ pub struct GUI {
|
||||||
pub press: PreSufFix,
|
pub press: PreSufFix,
|
||||||
pub release: PreSufFix,
|
pub release: PreSufFix,
|
||||||
pub format: Option<String>,
|
pub format: Option<String>,
|
||||||
|
pub user: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
|
|
@ -129,6 +130,7 @@ fn build_config_std() -> Config {
|
||||||
prefix: env::var("INPUT_GUI_RELEASE_PREFIX").unwrap_or(String::from("")),
|
prefix: env::var("INPUT_GUI_RELEASE_PREFIX").unwrap_or(String::from("")),
|
||||||
suffix: env::var("INPUT_GUI_RELEASE_SUFFIX").unwrap_or(String::from("")),
|
suffix: env::var("INPUT_GUI_RELEASE_SUFFIX").unwrap_or(String::from("")),
|
||||||
},
|
},
|
||||||
|
user: env::var("INPUT_GUI_USER").unwrap_or(String::from("me")),
|
||||||
format: match env::var("INPUT_GUI_FORMAT") {
|
format: match env::var("INPUT_GUI_FORMAT") {
|
||||||
Ok(x) => Some(x),
|
Ok(x) => Some(x),
|
||||||
Err(_) => match env::var("INPUT_GUI_FORMAT_V01").unwrap_or(String::from("false")) == String::from("true") {
|
Err(_) => match env::var("INPUT_GUI_FORMAT_V01").unwrap_or(String::from("false")) == String::from("true") {
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ impl Main {
|
||||||
"pressed": pressed.iter().collect::<String>(),
|
"pressed": pressed.iter().collect::<String>(),
|
||||||
"released": released.iter().collect::<String>(),
|
"released": released.iter().collect::<String>(),
|
||||||
"ms": SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis(),
|
"ms": SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis(),
|
||||||
"user": String::from(""),
|
"user": self.flags.cfg.user,
|
||||||
})).unwrap().chars().collect();
|
})).unwrap().chars().collect();
|
||||||
},
|
},
|
||||||
None => {
|
None => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue