Skip to content

Commit

Permalink
Added new event listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
FieldofClay committed Jul 14, 2023
1 parent 7cbe3e0 commit b4b48cd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 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
@@ -1,6 +1,6 @@
[package]
name = "hyprland-workspaces"
version = "1.2.2"
version = "1.2.3"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
16 changes: 14 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ FLAGS:
-h, --help Prints help information
ARGS:
<MONITOR> Monitor to track windows/workspaces on
<MONITOR> Monitor to track windows/workspaces on or _ to track all monitors
";

#[derive(Serialize)]
Expand All @@ -34,7 +34,7 @@ fn output(monitor: &str) {
workspaces.sort_by_key(|w| w.id);

//get active workspace
let mut active_workspace_id: i32;
let active_workspace_id: i32;
if monitor == "_" {
active_workspace_id = Workspace::get_active().expect("unable to get active workspace").id;
} else {
Expand Down Expand Up @@ -136,6 +136,18 @@ fn main() -> Result<()> {
event_listener.add_window_moved_handler(|_, _| {
output!();
});
event_listener.add_layer_open_handler(|_, _| {
output!();
});
event_listener.add_layer_closed_handler(|_, _| {
output!();
});
event_listener.add_urgent_state_handler(|_, _| {
output!();
});
event_listener.add_window_title_change_handler(|_, _| {
output!();
});

event_listener.start_listener()

Expand Down

0 comments on commit b4b48cd

Please sign in to comment.