Skip to content

Commit

Permalink
Add Sway support
Browse files Browse the repository at this point in the history
swayipc which supports both Sway and i3
  • Loading branch information
Jayce Fayne authored and markstos committed Jan 15, 2022
1 parent 2e47c15 commit 09f4f48
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 107 deletions.
154 changes: 89 additions & 65 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ lto = true
codegen-units = 1

[features]
i3 = ["i3ipc"]
i3 = ["swayipc"]

[dependencies]
cairo-sys-rs = "0.14"
css-color-parser = "0.1"
font-loader = "0.11"
i3ipc = { version = "0.10", optional = true }
itertools = "0.10"
swayipc = { version = "3.0.0", optional = true }
log = "0.4"
pretty_env_logger = "0.4"
regex = "1.5"
Expand Down
5 changes: 1 addition & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ use xkbcommon::xkb;
mod args;
mod utils;

#[cfg(feature = "i3")]
extern crate i3ipc;

#[cfg(feature = "i3")]
mod wm_i3;

Expand All @@ -20,7 +17,7 @@ use crate::wm_i3 as wm;
#[derive(Debug)]
pub struct DesktopWindow {
id: i64,
x_window_id: Option<i32>,
x_window_id: Option<i64>,
pos: (i32, i32),
size: (i32, i32),
is_focused: bool,
Expand Down
Loading

0 comments on commit 09f4f48

Please sign in to comment.