feat: generated workspaces protocol and various improvements

This commit is contained in:
Ashley Wulber 2022-06-08 23:51:33 -04:00
parent bfa8fa58ff
commit 02e240b6bb
No known key found for this signature in database
GPG key ID: BCD0B777C3F6E2FD
19 changed files with 480 additions and 110 deletions

View file

@ -5,26 +5,13 @@ use std::path::PathBuf;
use gtk4::glib;
use std::future::Future;
#[derive(Debug)]
pub enum Event {
WorkspaceList,
Activate(u32),
}
pub type Activate = u32;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Workspace {
pub(crate) id: u32,
pub(crate) active: bool,
}
#[derive(Clone, Debug, Default, glib::Boxed)]
#[boxed_type(name = "BoxedWorkspace")]
pub struct BoxedWorkspace(pub Option<Workspace>);
#[derive(Clone, Debug, Default, glib::Boxed)]
#[boxed_type(name = "BoxedWorkspaceList")]
pub struct BoxedWorkspaceList(pub Vec<Workspace>);
pub fn data_path() -> PathBuf {
let mut path = glib::user_data_dir();
path.push(crate::ID);