feat: keybinds for toggling displays

This commit is contained in:
electria 2026-08-16 13:56:18 -07:00
commit e310ca570b
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs
4 changed files with 101 additions and 26 deletions

14
src/app/utils.rs Normal file
View file

@ -0,0 +1,14 @@
use iced::widget;
use crate::app;
pub fn maybe_widget<'a>(
condition: bool,
widget: impl FnOnce() -> app::Element<'a>,
) -> app::Element<'a> {
if condition {
widget()
} else {
widget::space().into()
}
}