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
@ -280,30 +281,30 @@ pub struct Config {
#[clap(long = "image-size")]
image_size: Option<i32>,
key_up: Option<String>, // todo support this
key_down: Option<String>, // todo support this
key_left: Option<String>, // todo support this
key_right: Option<String>, // todo support this
key_forward: Option<String>, // todo support this
key_backward: Option<String>, // todo support this
key_submit: Option<String>, // todo support this
key_exit: Option<String>, // todo support this
key_pgup: Option<String>, // todo support this
key_pgdn: Option<String>, // todo support this
key_expand: Option<String>, // todo support this
key_up: Option<String>, // todo support this
key_down: Option<String>, // todo support this
key_left: Option<String>, // todo support this
key_right: Option<String>, // todo support this
key_forward: Option<String>, // todo support this
key_backward: Option<String>, // todo support this
key_submit: Option<String>, // todo support this
key_exit: Option<String>, // todo support this
key_pgup: Option<String>, // todo support this
key_pgdn: Option<String>, // todo support this
key_expand: Option<String>, // todo support this
key_hide_search: Option<String>, // todo support this
key_copy: Option<String>, // todo support this
key_copy: Option<String>, // todo support this
// todo re-add this
// #[serde(flatten)]
// 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
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
global_coords: Option<bool>, // todo support this
hide_search: 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
/// 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}");