app autostart
This commit is contained in:
@@ -4,6 +4,7 @@ use chrono::Offset;
|
||||
use idmap::IdMap;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use strum::{AsRefStr, EnumProperty, EnumString, VariantArray};
|
||||
use wayvr_ipc::packet_client::WvrProcessLaunchParams;
|
||||
|
||||
use crate::{
|
||||
astr_containers::{AStrMap, AStrSet},
|
||||
@@ -267,6 +268,9 @@ pub struct GeneralConfig {
|
||||
#[serde(default)]
|
||||
pub global_set: SerializedWindowStates,
|
||||
|
||||
#[serde(default)]
|
||||
pub autostart_apps: Vec<WvrProcessLaunchParams>,
|
||||
|
||||
#[serde(default)]
|
||||
pub last_set: u32,
|
||||
|
||||
|
||||
@@ -10,7 +10,12 @@ pub trait DashInterface<T> {
|
||||
fn window_set_visible(&mut self, data: &mut T, handle: WvrWindowHandle, visible: bool) -> anyhow::Result<()>;
|
||||
fn window_request_close(&mut self, data: &mut T, handle: WvrWindowHandle) -> anyhow::Result<()>;
|
||||
fn process_get(&mut self, data: &mut T, handle: WvrProcessHandle) -> Option<WvrProcess>;
|
||||
fn process_launch(&mut self, data: &mut T, params: WvrProcessLaunchParams) -> anyhow::Result<WvrProcessHandle>;
|
||||
fn process_launch(
|
||||
&mut self,
|
||||
data: &mut T,
|
||||
auto_start: bool,
|
||||
params: WvrProcessLaunchParams,
|
||||
) -> anyhow::Result<WvrProcessHandle>;
|
||||
fn process_list(&mut self, data: &mut T) -> anyhow::Result<Vec<WvrProcess>>;
|
||||
fn process_terminate(&mut self, data: &mut T, handle: WvrProcessHandle) -> anyhow::Result<()>;
|
||||
fn recenter_playspace(&mut self, data: &mut T) -> anyhow::Result<()>;
|
||||
|
||||
@@ -110,7 +110,12 @@ impl DashInterface<()> for DashInterfaceEmulated {
|
||||
self.processes.get(&emu_handle).map(|process| process.to(emu_handle))
|
||||
}
|
||||
|
||||
fn process_launch(&mut self, _: &mut (), params: WvrProcessLaunchParams) -> anyhow::Result<WvrProcessHandle> {
|
||||
fn process_launch(
|
||||
&mut self,
|
||||
_: &mut (),
|
||||
_: bool,
|
||||
params: WvrProcessLaunchParams,
|
||||
) -> anyhow::Result<WvrProcessHandle> {
|
||||
let res = self.processes.add(EmuProcess { name: params.name });
|
||||
|
||||
self.windows.add(EmuWindow {
|
||||
|
||||
Reference in New Issue
Block a user