refactor: single instance

This commit is contained in:
Ashley Wulber 2023-11-21 16:15:02 -05:00 committed by Ashley Wulber
parent a0a11b6e02
commit 791441ca10
13 changed files with 271 additions and 195 deletions

View file

@ -7,6 +7,7 @@ use cctk::{
Connection, Dispatch, QueueHandle, WEnum,
},
};
use cosmic::cctk;
use cosmic::iced::widget::image;
use std::{
os::fd::{AsFd, OwnedFd},

View file

@ -7,6 +7,7 @@ use cctk::{
screencopy::{ScreencopySessionData, ScreencopySessionDataExt},
wayland_client::{protocol::wl_output, Proxy, QueueHandle},
};
use cosmic::cctk;
use std::sync::{
atomic::{AtomicBool, Ordering},

View file

@ -5,6 +5,7 @@ use cctk::{
},
wayland_client::{protocol::wl_buffer, Connection, QueueHandle},
};
use cosmic::cctk;
use std::{fs, io, os::unix::fs::MetadataExt, path::PathBuf};

View file

@ -5,7 +5,6 @@
// * Need output name to compare?
// TODO: Way to activate workspace, toplevel? Close? Move?
use cctk::{
cosmic_protocols::{
toplevel_info::v1::client::zcosmic_toplevel_handle_v1,
@ -30,6 +29,7 @@ use cctk::{
},
workspace::WorkspaceState,
};
use cosmic::cctk;
use cosmic::iced::{
self,
futures::{executor::block_on, FutureExt, SinkExt},

View file

@ -3,6 +3,7 @@ use cctk::{
screencopy::{BufferInfo, ScreencopyHandler, ScreencopyState},
wayland_client::{Connection, QueueHandle, WEnum},
};
use cosmic::cctk;
use super::{AppData, Capture, CaptureImage, CaptureSource, Event};

View file

@ -7,6 +7,7 @@ use cctk::{
toplevel_management::{ToplevelManagerHandler, ToplevelManagerState},
wayland_client::{Connection, QueueHandle, WEnum},
};
use cosmic::cctk;
use super::{AppData, CaptureSource, Event};

View file

@ -1,4 +1,5 @@
use cctk::workspace::{WorkspaceHandler, WorkspaceState};
use cosmic::cctk;
use super::{AppData, CaptureSource, Event};