diff --git a/README.md b/README.md index 422b5bc..65aab89 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ modmap: not: [Application, ...] # or only: [Application, ...] - window: # Optional (only wlroots clients supported) + window: # Optional (only wlroots/kde clients supported) not: [/regex of window title/, ...] # or only: [/regex of window title/, ...] @@ -266,7 +266,7 @@ keymap: not: [Application, ...] # or only: [Application, ...] - window: # Optional (only wlroots clients supported) + window: # Optional (only wlroots/kde clients supported) not: [/regex of window title/, ...] # or only: [/regex of window title/, ...] @@ -344,7 +344,7 @@ However, it will only start printing, once a mapping has been triggered that use So you have to create a mapping with a filter using a dummy application name and trigger it. Then each time you switch to a new window xremap will print its caption, class, and name in the following style: `active window: caption: '', class: '', name: ''` -You want to use the class for the filter. +The `class` property should be used for application matching, while the `caption` property should be used for window matching. If you use a systemd-daemon to manage xremap, the prints will be visible in the system-logs (Can be opened with `journalctl -f`) diff --git a/src/client/kde_client.rs b/src/client/kde_client.rs index c8ad04a..50f50bc 100644 --- a/src/client/kde_client.rs +++ b/src/client/kde_client.rs @@ -174,12 +174,12 @@ impl Client for KdeClient { conn_res.is_ok() } fn current_window(&mut self) -> Option { - // TODO: not implemented - None + let aw = self.active_window.lock().ok()?; + Some(aw.title.clone()) } fn current_application(&mut self) -> Option { - let aw = self.active_window.lock().unwrap(); + let aw = self.active_window.lock().ok()?; Some(aw.res_class.clone()) } }