Make Super_L chordable and implement hyprland-global-shortcuts-v1
This commit is contained in:
parent
8ff17aca1e
commit
6d3bff952e
16 changed files with 363 additions and 16 deletions
|
|
@ -868,6 +868,10 @@ impl ConfigClient {
|
|||
self.send(&ClientMessage::Quit)
|
||||
}
|
||||
|
||||
pub fn trigger_global_shortcut(&self, app_id: &str, id: &str) {
|
||||
self.send(&ClientMessage::TriggerGlobalShortcut { app_id, id })
|
||||
}
|
||||
|
||||
pub fn switch_to_vt(&self, vtnr: u32) {
|
||||
self.send(&ClientMessage::SwitchTo { vtnr })
|
||||
}
|
||||
|
|
|
|||
|
|
@ -912,6 +912,10 @@ pub enum ClientMessage<'a> {
|
|||
seat: Seat,
|
||||
right: bool,
|
||||
},
|
||||
TriggerGlobalShortcut {
|
||||
app_id: &'a str,
|
||||
id: &'a str,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
|
|||
|
|
@ -108,6 +108,14 @@ pub fn quit() {
|
|||
get!().quit()
|
||||
}
|
||||
|
||||
/// Sends a `pressed` event to the client that has registered a Hyprland global
|
||||
/// shortcut with the given `app_id` and `id`.
|
||||
///
|
||||
/// Has no effect if no client is currently registered for that combination.
|
||||
pub fn trigger_global_shortcut(app_id: &str, id: &str) {
|
||||
get!().trigger_global_shortcut(app_id, id)
|
||||
}
|
||||
|
||||
/// Switches to a different VT.
|
||||
pub fn switch_to_vt(n: u32) {
|
||||
get!().switch_to_vt(n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue