Skip to content

Commit c9cb723

Browse files
Martin Hjulstad BednarLGUG2Z
authored andcommitted
feat(shortcuts): show all hotkey bindings
- Removed command filtering logic from the shortcuts UI. - All hotkey bindings are now shown regardless of command. - Improved UI with hint text for the filter input.
1 parent 6416c0b commit c9cb723

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

komorebi-shortcuts/src/main.rs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,19 @@ impl eframe::App for Quicklook {
5858
ui.label("Filter");
5959
ui.add(
6060
eframe::egui::text_edit::TextEdit::singleline(&mut self.filter)
61+
.hint_text("Filter by command...")
6162
.background_color(ctx.style().visuals.faint_bg_color),
6263
);
6364
ui.end_row();
64-
ui.end_row();
6565

6666
for binding in &whkdrc.bindings {
67-
if is_komorebic_binding(binding) {
68-
let keys = binding.keys.join(" + ");
69-
if self.filter.is_empty()
70-
|| binding.command.contains(&self.filter)
71-
{
72-
ui.label(keys);
73-
ui.label(&binding.command);
74-
ui.end_row();
75-
}
67+
let keys = binding.keys.join(" + ");
68+
if self.filter.is_empty()
69+
|| binding.command.contains(&self.filter)
70+
{
71+
ui.label(keys);
72+
ui.label(&binding.command);
73+
ui.end_row();
7674
}
7775
}
7876
}
@@ -100,7 +98,3 @@ fn main() {
10098
)
10199
.unwrap();
102100
}
103-
104-
fn is_komorebic_binding(binding: &HotkeyBinding) -> bool {
105-
binding.command.starts_with("komorebic")
106-
}

0 commit comments

Comments
 (0)