Skip to content

Commit

Permalink
Use Wayland protocols out of box
Browse files Browse the repository at this point in the history
  • Loading branch information
2e3s committed Dec 27, 2023
1 parent 06b30f4 commit 53266d5
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 501 deletions.
47 changes: 43 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ image = { version = "0.24.6" }
members = ["watchers"]

[workspace.package]
version = "0.2.4-alpha1"
version = "0.2.4"

[workspace.dependencies]
anyhow = "1.0.75"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ as soon as the environment has the necessary interfaces.
| Environment | Active window | Idle |
| --------------- | -------------------- | ------------------- |
| X11 | :green_circle: | :green_circle: |
| Wayland + Sway | :green_circle: [^1] | :green_circle: [^2] |
| Sway, Hyprland | :green_circle: [^1] | :green_circle: [^2] |
| Wayland + KDE | :yellow_circle: [^3] | :green_circle: |
| Wayland + Gnome | :yellow_circle: [^4] | :green_circle: |

[^1]: A few other DEs besides Sway may implement [wlr foreign toplevel protocol](https://wayland.app/protocols/wlr-foreign-toplevel-management-unstable-v1),
[^2]: It implements [KWin idle protocol](https://wayland.app/protocols/kde-idle).
[^2]: [KWin idle](https://wayland.app/protocols/kde-idle) and [Idle notify](https://wayland.app/protocols/ext-idle-notify-v1) protocols are supported.
[^3]: KWin doesn't implement any toplevel protocol yet, KWin script is utilized instead (builtin, no actions required).
KDE partially supports XWayland, but inconsistently, hence X11 is not utilized for it.
[^4]: Gnome doesn't implement any toplevel protocol yet, so [this extension](https://extensions.gnome.org/extension/5592/focused-window-d-bus/) should be installed.
Expand Down
5 changes: 3 additions & 2 deletions watchers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ tempfile = "3.8.0"
[dependencies]
aw-client-rust = { git = "https://github.com/ActivityWatch/aw-server-rust", rev = "448312d" }
wayland-client = "0.31.1"
wayland-scanner = "0.31.0"
wayland-backend = "0.3.2"
wayland-protocols = { version = "0.31.0", features = ["staging", "client" ]}
wayland-protocols-plasma = { version = "0.2.0", features = ["client"] }
wayland-protocols-wlr = { version = "0.2.0", features = ["client"] }
x11rb = { version = "0.12.0", features = ["screensaver"] }
zbus = {version = "3.14.1", optional = true}
chrono = "0.4.31"
Expand Down
1 change: 0 additions & 1 deletion watchers/src/watchers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ mod gnome_window;
mod idle;
#[cfg(feature = "kwin_window")]
mod kwin_window;
mod wl_bindings;
mod wl_connection;
mod wl_ext_idle_notify;
mod wl_foreign_toplevel;
Expand Down
102 changes: 0 additions & 102 deletions watchers/src/watchers/wl-protocols/ext-idle-notify-v1.xml

This file was deleted.

49 changes: 0 additions & 49 deletions watchers/src/watchers/wl-protocols/idle.xml

This file was deleted.

Loading

0 comments on commit 53266d5

Please sign in to comment.