mirror of
https://github.com/k0kubun/xremap
synced 2024-11-15 18:12:50 +00:00
e75c0bae09
* Update Hyprland-rs * Remove needless serialize and deserializing * Remove needless conversion of string
25 lines
536 B
Rust
25 lines
536 B
Rust
use crate::client::Client;
|
|
use hyprland::{data::Client as HyprClient, prelude::*};
|
|
pub struct HyprlandClient;
|
|
|
|
impl HyprlandClient {
|
|
pub fn new() -> HyprlandClient {
|
|
HyprlandClient {}
|
|
}
|
|
}
|
|
|
|
impl Client for HyprlandClient {
|
|
fn supported(&mut self) -> bool {
|
|
true
|
|
}
|
|
|
|
fn current_application(&mut self) -> Option<String> {
|
|
if let Ok(win_opt) = HyprClient::get_active() {
|
|
if let Some(win) = win_opt {
|
|
return Some(win.class);
|
|
}
|
|
}
|
|
None
|
|
}
|
|
}
|