mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-09-04 00:25:57 +00:00
chore: small cleanup
This commit is contained in:
parent
96b15c05f0
commit
fe077f3f8b
3 changed files with 11 additions and 14 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
use crate::{
|
||||||
|
file_utils::get_writer,
|
||||||
|
profile::{Profile, XRServiceType},
|
||||||
|
runner::{Runner, RunnerStatus},
|
||||||
|
};
|
||||||
use nix::{
|
use nix::{
|
||||||
sys::signal::{
|
sys::signal::{
|
||||||
kill,
|
kill,
|
||||||
|
@ -5,12 +10,6 @@ use nix::{
|
||||||
},
|
},
|
||||||
unistd::Pid,
|
unistd::Pid,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
|
||||||
file_utils::get_writer,
|
|
||||||
profile::{Profile, XRServiceType},
|
|
||||||
runner::{Runner, RunnerStatus},
|
|
||||||
};
|
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
io::{BufRead, BufReader, Write},
|
io::{BufRead, BufReader, Write},
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
use serde::{de::Error, Deserialize, Serialize};
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
constants::CMD_NAME,
|
constants::CMD_NAME,
|
||||||
device_prober::PhysicalXRDevice,
|
device_prober::PhysicalXRDevice,
|
||||||
|
@ -11,15 +9,16 @@ use crate::{
|
||||||
survive::survive_profile, wivrn::wivrn_profile, wmr::wmr_profile,
|
survive::survive_profile, wivrn::wivrn_profile, wmr::wmr_profile,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
use serde::{de::Error, Deserialize, Serialize};
|
||||||
use std::{
|
use std::{
|
||||||
fs::File,
|
fs::File,
|
||||||
io::BufReader,
|
io::BufReader,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
};
|
};
|
||||||
|
|
||||||
fn default_win_size() -> [i32; 2] {
|
const DEFAULT_WIN_SIZE: [i32; 2] = [360, 400];
|
||||||
[360, 400]
|
|
||||||
}
|
const fn default_win_size() -> [i32; 2] { DEFAULT_WIN_SIZE }
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
|
@ -37,7 +36,7 @@ impl Default for Config {
|
||||||
selected_profile_uuid: "".to_string(),
|
selected_profile_uuid: "".to_string(),
|
||||||
debug_view_enabled: false,
|
debug_view_enabled: false,
|
||||||
user_profiles: vec![],
|
user_profiles: vec![],
|
||||||
win_size: default_win_size(),
|
win_size: DEFAULT_WIN_SIZE,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use crate::paths::get_exec_prefix;
|
use crate::paths::get_exec_prefix;
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
pub const APP_NAME: &str = "@PRETTY_NAME@";
|
pub const APP_NAME: &str = "@PRETTY_NAME@";
|
||||||
|
@ -18,7 +17,7 @@ pub const BUILD_PROFILE: &str = "@PROFILE@";
|
||||||
pub const BUILD_DATETIME: &str = "@BUILD_DATETIME@";
|
pub const BUILD_DATETIME: &str = "@BUILD_DATETIME@";
|
||||||
|
|
||||||
pub fn get_developers() -> Vec<String> {
|
pub fn get_developers() -> Vec<String> {
|
||||||
vec!["Gabriele Musco <gabmus@disroot.org>".to_string()]
|
vec!["Gabriele Musco <gabmus@disroot.org>".into()]
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn pkg_data_dir() -> PathBuf {
|
pub fn pkg_data_dir() -> PathBuf {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue