Compare commits

...

2 Commits

Author SHA1 Message Date
N4tus 9262ff47ed Version 0.8.17 2 months ago
N4tus e54fc8ac4a
KDE: Add support for window matching. (#448)
KDE: Add support for window matching.
2 months ago

@ -1,3 +1,7 @@
## v0.8.17
- Add `window` matcher for the `kde` client [#448](https://github.com/xremap/xremap/pull/448)
## v0.8.16
- Add `window` matcher for the `wlroots` client [#447](https://github.com/k0kubun/xremap/issues/447)

2
Cargo.lock generated

@ -1893,7 +1893,7 @@ checksum = "e63e71c4b8bd9ffec2c963173a4dc4cbde9ee96961d4fcb4429db9929b606c34"
[[package]]
name = "xremap"
version = "0.8.16"
version = "0.8.17"
dependencies = [
"anyhow",
"clap",

@ -1,6 +1,6 @@
[package]
name = "xremap"
version = "0.8.16"
version = "0.8.17"
edition = "2021"
description = "Dynamic key remapp for X and Wayland"
license = "MIT"

@ -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