fix window parameter

This commit is contained in:
Alexander Mohr 2025-05-01 18:07:03 +02:00
parent cde9951101
commit c9223dcad6
2 changed files with 28 additions and 20 deletions

View file

@ -181,6 +181,7 @@ pub struct Config {
/// If true a normal window instead of a layer shell will be used
#[clap(short = 'n', long = "normal-window")]
#[serde(default = "default_false")]
normal_window: bool,
/// Set to 'false' to disable images, defaults to true
@ -299,11 +300,11 @@ pub struct Config {
// key_custom: Option<HashMap<String, String>>,
global_coords: Option<bool>, // todo support this
hide_search: Option<bool>, // todo support this
dynamic_lines: Option<bool>,// todo support this
dynamic_lines: Option<bool>, // todo support this
layer: Option<String>, // todo support this
copy_exec: Option<String>,// todo support this
single_click: Option<bool>,// todo support this
pre_display_exec: Option<bool>,// todo support this
copy_exec: Option<String>, // todo support this
single_click: Option<bool>, // todo support this
pre_display_exec: Option<bool>, // todo support this
/// Minimum score for a fuzzy search to be shown
#[clap(long = "fuzzy-min-score")]
@ -477,6 +478,10 @@ impl Config {
}
}
fn default_false() -> bool {
false
}
//
// // TODO
// // GtkOrientation orientation = config_get_mnemonic(config, "orientation", "vertical", 2, "vertical", "horizontal");

View file

@ -424,6 +424,9 @@ fn handle_key_press<T: Clone + 'static>(
};
match keyboard_key {
Key::Down => {
return Propagation::Stop;
}
Key::Escape => {
if let Err(e) = meta.selected_sender.send(Err(anyhow!("No item selected"))) {
log::error!("failed to send message {e}");