You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xremap/src/client/hypr_client.rs

29 lines
642 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_window(&mut self) -> Option<String> {
// TODO: not implemented
None
}
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
}
}