Add shortcut hint toggle with Super+F1

This commit is contained in:
Samuel Onoja committed 2026-10-01 12:30:35 +01:00
1 parent 2c95e5e80f
commit 2b9f30fa5d
11 files changed
+235 -30

No files matched your search

+19 -1
View File
@@ -12,7 +12,7 @@ use crate::private_client::ClientCapabilities;
use crate::state::ClientState;
pub(crate) fn init_global(display: &DisplayHandle) {
display.create_global::<Ferese, FereseShellManagerV1, _>(4, ());
display.create_global::<Ferese, FereseShellManagerV1, _>(5, ());
}
pub(crate) fn config_chunks(source: &str) -> Vec<&str> {
@@ -208,6 +208,24 @@ impl Ferese {
}
}
pub(crate) fn toggle_keybinding_guide(&mut self) -> bool {
if self.session_lock.active {
return false;
}
let Some(shell) = self
.shell_resources
.iter()
.filter_map(|shell| shell.upgrade().ok())
.find(|shell| shell.version() >= 5)
else {
tracing::warn!("shortcut hint requires the updated Ferese shell");
return false;
};
let output = self.focused_output().map_or_else(String::new, |output| output.name());
shell.toggle_keybinding_guide(output);
true
}
pub(crate) fn request_logout_confirmation(&mut self) {
if self.session_lock.active {
return;