fix window parameter
This commit is contained in:
parent
cde9951101
commit
c9223dcad6
2 changed files with 28 additions and 20 deletions
|
@ -181,6 +181,7 @@ pub struct Config {
|
||||||
|
|
||||||
/// If true a normal window instead of a layer shell will be used
|
/// If true a normal window instead of a layer shell will be used
|
||||||
#[clap(short = 'n', long = "normal-window")]
|
#[clap(short = 'n', long = "normal-window")]
|
||||||
|
#[serde(default = "default_false")]
|
||||||
normal_window: bool,
|
normal_window: bool,
|
||||||
|
|
||||||
/// Set to 'false' to disable images, defaults to true
|
/// Set to 'false' to disable images, defaults to true
|
||||||
|
@ -233,7 +234,7 @@ pub struct Config {
|
||||||
/// setting top,left for example
|
/// setting top,left for example
|
||||||
#[clap(short = 'l', long = "location", value_delimiter = ',', value_parser = clap::builder::ValueParser::new(Anchor::from_str)
|
#[clap(short = 'l', long = "location", value_delimiter = ',', value_parser = clap::builder::ValueParser::new(Anchor::from_str)
|
||||||
)]
|
)]
|
||||||
location: Option<Vec<Anchor>>,
|
location: Option<Vec<Anchor>>,
|
||||||
|
|
||||||
#[clap(short = 'a', long = "no-actions")]
|
#[clap(short = 'a', long = "no-actions")]
|
||||||
no_actions: Option<bool>, // todo support this
|
no_actions: Option<bool>, // todo support this
|
||||||
|
@ -280,30 +281,30 @@ pub struct Config {
|
||||||
#[clap(long = "image-size")]
|
#[clap(long = "image-size")]
|
||||||
image_size: Option<i32>,
|
image_size: Option<i32>,
|
||||||
|
|
||||||
key_up: Option<String>, // todo support this
|
key_up: Option<String>, // todo support this
|
||||||
key_down: Option<String>, // todo support this
|
key_down: Option<String>, // todo support this
|
||||||
key_left: Option<String>, // todo support this
|
key_left: Option<String>, // todo support this
|
||||||
key_right: Option<String>, // todo support this
|
key_right: Option<String>, // todo support this
|
||||||
key_forward: Option<String>, // todo support this
|
key_forward: Option<String>, // todo support this
|
||||||
key_backward: Option<String>, // todo support this
|
key_backward: Option<String>, // todo support this
|
||||||
key_submit: Option<String>, // todo support this
|
key_submit: Option<String>, // todo support this
|
||||||
key_exit: Option<String>, // todo support this
|
key_exit: Option<String>, // todo support this
|
||||||
key_pgup: Option<String>, // todo support this
|
key_pgup: Option<String>, // todo support this
|
||||||
key_pgdn: Option<String>, // todo support this
|
key_pgdn: Option<String>, // todo support this
|
||||||
key_expand: Option<String>, // todo support this
|
key_expand: Option<String>, // todo support this
|
||||||
key_hide_search: 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
|
// todo re-add this
|
||||||
// #[serde(flatten)]
|
// #[serde(flatten)]
|
||||||
// key_custom: Option<HashMap<String, String>>,
|
// key_custom: Option<HashMap<String, String>>,
|
||||||
global_coords: Option<bool>, // todo support this
|
global_coords: Option<bool>, // todo support this
|
||||||
hide_search: 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
|
layer: Option<String>, // todo support this
|
||||||
copy_exec: Option<String>,// todo support this
|
copy_exec: Option<String>, // todo support this
|
||||||
single_click: Option<bool>,// todo support this
|
single_click: Option<bool>, // todo support this
|
||||||
pre_display_exec: Option<bool>,// todo support this
|
pre_display_exec: Option<bool>, // todo support this
|
||||||
|
|
||||||
/// Minimum score for a fuzzy search to be shown
|
/// Minimum score for a fuzzy search to be shown
|
||||||
#[clap(long = "fuzzy-min-score")]
|
#[clap(long = "fuzzy-min-score")]
|
||||||
|
@ -477,6 +478,10 @@ impl Config {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn default_false() -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// // TODO
|
// // TODO
|
||||||
// // GtkOrientation orientation = config_get_mnemonic(config, "orientation", "vertical", 2, "vertical", "horizontal");
|
// // GtkOrientation orientation = config_get_mnemonic(config, "orientation", "vertical", 2, "vertical", "horizontal");
|
||||||
|
|
|
@ -424,6 +424,9 @@ fn handle_key_press<T: Clone + 'static>(
|
||||||
};
|
};
|
||||||
|
|
||||||
match keyboard_key {
|
match keyboard_key {
|
||||||
|
Key::Down => {
|
||||||
|
return Propagation::Stop;
|
||||||
|
}
|
||||||
Key::Escape => {
|
Key::Escape => {
|
||||||
if let Err(e) = meta.selected_sender.send(Err(anyhow!("No item selected"))) {
|
if let Err(e) = meta.selected_sender.send(Err(anyhow!("No item selected"))) {
|
||||||
log::error!("failed to send message {e}");
|
log::error!("failed to send message {e}");
|
||||||
|
|
Loading…
Add table
Reference in a new issue