KDE: Add support for window matching. (#448)

KDE: Add support for window matching.
pull/449/head
N4tus 1 month ago committed by GitHub
parent 9405ce0516
commit e54fc8ac4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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: '<caption>', class: '<class>', name: '<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`)

@ -174,12 +174,12 @@ impl Client for KdeClient {
conn_res.is_ok()
}
fn current_window(&mut self) -> Option<String> {
// TODO: not implemented
None
let aw = self.active_window.lock().ok()?;
Some(aw.title.clone())
}
fn current_application(&mut self) -> Option<String> {
let aw = self.active_window.lock().unwrap();
let aw = self.active_window.lock().ok()?;
Some(aw.res_class.clone())
}
}

Loading…
Cancel
Save