timeout_old
Tassilo Horn 4 years ago
parent a4a435de54
commit a767e2d0ba
  1. 1
      src/bin/swayr.rs
  2. 6
      src/bin/swayrd.rs
  3. 1
      src/con.rs
  4. 11
      src/ipc.rs

@ -2,6 +2,7 @@ use swayr::con;
use swayr::ipc;
fn main() {
println!("sway here!");
let root_node = ipc::get_tree();
for con in con::get_cons(&root_node) {
println!(" {}", con);

@ -0,0 +1,6 @@
use swayr::con;
use swayr::ipc;
fn main() {
println!("swayd here!");
}

@ -26,6 +26,7 @@ pub fn get_cons<'a>(tree: &'a ipc::Node) -> Vec<Con<'a>> {
id: n.id,
app_id: match &n.app_id {
Some(s) => Some(s.as_ref()),
// TODO: Use n.window_properties.class instead!
None => None,
},
})

@ -78,6 +78,16 @@ pub enum ShellType {
XWayland,
}
#[derive(Deserialize)]
#[allow(dead_code)]
pub struct WindowProperties {
pub class: Option<String>,
pub instance: Option<String>,
pub title: Option<String>,
//pub window_type: Option<WindowType>
//pub transient_for: DONTKNOW,
}
#[derive(Deserialize)]
#[allow(dead_code)]
pub struct Node {
@ -107,6 +117,7 @@ pub struct Node {
pub max_render_time: Option<i32>,
pub pid: Option<Pid>,
pub shell: Option<ShellType>,
pub window_properties: Option<WindowProperties>,
}
impl Node {

Loading…
Cancel
Save