From ecd051435db316e06a4aa5fee656474d3b8d04f4 Mon Sep 17 00:00:00 2001 From: imgurbot12 Date: Tue, 9 Apr 2024 14:38:28 -0700 Subject: [PATCH 1/6] feat: single-select and mouse-hover options added, version updates --- Cargo.lock | 96 +++++++++++++++++++-------------------- plugin-desktop/Cargo.toml | 2 +- plugin-network/Cargo.toml | 2 +- plugin-run/Cargo.toml | 2 +- plugin-window/Cargo.toml | 4 +- rmenu-plugin/Cargo.toml | 2 +- rmenu-plugin/src/lib.rs | 4 ++ rmenu/Cargo.toml | 4 +- rmenu/public/default.css | 1 + rmenu/src/cli.rs | 8 ++++ rmenu/src/config.rs | 13 ++++++ rmenu/src/exec.rs | 5 +- rmenu/src/gui.rs | 27 +++++++++-- 13 files changed, 110 insertions(+), 60 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index adcadaa..33210d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,7 +110,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", - "event-listener 5.2.0", + "event-listener 5.3.0", "event-listener-strategy 0.5.1", "futures-core", "pin-project-lite", @@ -118,9 +118,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b3e585719c2358d2660232671ca8ca4ddb4be4ce8a1842d6c2dc8685303316" +checksum = "5f98c37cf288e302c16ef6c8472aad1e034c6c84ce5ea7b8101c98eb4a802fee" dependencies = [ "async-lock 3.3.0", "async-task", @@ -244,7 +244,7 @@ checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -373,9 +373,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" @@ -489,9 +489,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.90" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "2678b2e3449475e95b0aa6f9b506a28e61b3dc8996592b983695e8ebb58a8b41" [[package]] name = "cesu8" @@ -545,7 +545,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.0", + "strsim 0.11.1", ] [[package]] @@ -557,7 +557,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -642,7 +642,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", "once_cell", "tiny-keccak", ] @@ -772,7 +772,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -843,7 +843,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -876,7 +876,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core 0.20.8", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -968,7 +968,7 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -1079,7 +1079,7 @@ dependencies = [ "dioxus-core", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -1183,7 +1183,7 @@ dependencies = [ "darling 0.20.8", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -1244,9 +1244,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" dependencies = [ "concurrent-queue", "parking", @@ -1269,7 +1269,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3" dependencies = [ - "event-listener 5.2.0", + "event-listener 5.3.0", "pin-project-lite", ] @@ -1378,9 +1378,9 @@ dependencies = [ [[package]] name = "freedesktop-desktop-entry" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287f89b1a3d88dd04d2b65dfec39f3c381efbcded7b736456039c4ee49d54b17" +checksum = "c201444ddafb5506fe85265b48421664ff4617e3b7090ef99e42a0070c1aead0" dependencies = [ "dirs 3.0.2", "gettext-rs", @@ -1495,7 +1495,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -1645,9 +1645,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "libc", @@ -1822,7 +1822,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -2872,7 +2872,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ "proc-macro2", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -3002,7 +3002,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", ] [[package]] @@ -3050,7 +3050,7 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", "libredox", "thiserror", ] @@ -3137,7 +3137,7 @@ dependencies = [ [[package]] name = "rmenu" -version = "1.2.0" +version = "1.2.1" dependencies = [ "cached 0.44.0", "clap", @@ -3168,7 +3168,7 @@ dependencies = [ [[package]] name = "rmenu-plugin" -version = "0.0.1" +version = "0.0.2" dependencies = [ "bincode", "clap", @@ -3358,7 +3358,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -3374,13 +3374,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -3594,9 +3594,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" @@ -3639,9 +3639,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.57" +version = "2.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" dependencies = [ "proc-macro2", "quote", @@ -3789,7 +3789,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -3870,7 +3870,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -3946,7 +3946,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", ] [[package]] @@ -4135,7 +4135,7 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", ] [[package]] @@ -4211,7 +4211,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", "wasm-bindgen-shared", ] @@ -4245,7 +4245,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.57", + "syn 2.0.58", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4268,9 +4268,9 @@ dependencies = [ [[package]] name = "webbrowser" -version = "0.8.13" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1b04c569c83a9bb971dd47ec6fd48753315f4bf989b9b04a2e7ca4d7f0dc950" +checksum = "dd595fb70f33583ac61644820ebc144a26c96028b625b96cafcd861f4743fbc8" dependencies = [ "core-foundation", "home", @@ -4416,7 +4416,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window" -version = "0.0.0" +version = "0.0.1" dependencies = [ "anyhow", "clap", diff --git a/plugin-desktop/Cargo.toml b/plugin-desktop/Cargo.toml index d691ae7..3c69cb3 100644 --- a/plugin-desktop/Cargo.toml +++ b/plugin-desktop/Cargo.toml @@ -11,7 +11,7 @@ freedesktop-icons = "0.2.3" log = "0.4.19" once_cell = "1.18.0" regex = "1.9.1" -rmenu-plugin = { version = "0.0.1", path = "../rmenu-plugin" } +rmenu-plugin = { version = "0.0.2", path = "../rmenu-plugin" } rust-ini = "0.19.0" serde_json = "1.0.104" shellexpand = "3.1.0" diff --git a/plugin-network/Cargo.toml b/plugin-network/Cargo.toml index f6bccde..993c58a 100644 --- a/plugin-network/Cargo.toml +++ b/plugin-network/Cargo.toml @@ -20,5 +20,5 @@ keyboard-types = "0.6.2" log = "0.4.20" nm = { git = "https://github.com/imgurbot12/libnm-rs.git", version = "0.4.0" } once_cell = "1.18.0" -rmenu-plugin = { version = "0.0.1", path = "../rmenu-plugin" } +rmenu-plugin = { version = "0.0.2", path = "../rmenu-plugin" } serde_json = "1.0.104" diff --git a/plugin-run/Cargo.toml b/plugin-run/Cargo.toml index 759af09..2bc2549 100644 --- a/plugin-run/Cargo.toml +++ b/plugin-run/Cargo.toml @@ -6,6 +6,6 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -rmenu-plugin = { version = "0.0.1", path = "../rmenu-plugin" } +rmenu-plugin = { version = "0.0.2", path = "../rmenu-plugin" } serde_json = "1.0.103" walkdir = "2.3.3" diff --git a/plugin-window/Cargo.toml b/plugin-window/Cargo.toml index 13bf968..08912bb 100644 --- a/plugin-window/Cargo.toml +++ b/plugin-window/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "window" -version = "0.0.0" +version = "0.0.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -12,6 +12,6 @@ sway = [] [dependencies] anyhow = "1.0.72" clap = { version = "4.3.21", features = ["derive"] } -rmenu-plugin = { version = "0.0.1", path = "../rmenu-plugin" } +rmenu-plugin = { version = "0.0.2", path = "../rmenu-plugin" } serde = { version = "1.0.183", features = ["derive"] } serde_json = "1.0.104" diff --git a/rmenu-plugin/Cargo.toml b/rmenu-plugin/Cargo.toml index aca54e7..329b486 100644 --- a/rmenu-plugin/Cargo.toml +++ b/rmenu-plugin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rmenu-plugin" -version = "0.0.1" +version = "0.0.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/rmenu-plugin/src/lib.rs b/rmenu-plugin/src/lib.rs index f554198..c97a501 100644 --- a/rmenu-plugin/src/lib.rs +++ b/rmenu-plugin/src/lib.rs @@ -94,6 +94,10 @@ pub struct Options { pub page_load: Option, #[serde(skip_serializing_if = "Option::is_none")] pub jump_dist: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub hover_select: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub single_click: Option, // search settings #[serde(skip_serializing_if = "Option::is_none")] pub placeholder: Option, diff --git a/rmenu/Cargo.toml b/rmenu/Cargo.toml index 9834665..9ab6400 100644 --- a/rmenu/Cargo.toml +++ b/rmenu/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rmenu" -version = "1.2.0" +version = "1.2.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -21,7 +21,7 @@ png = "0.17.9" quick-xml = "0.30.0" regex = { version = "1.9.1" } resvg = "0.35.0" -rmenu-plugin = { version = "0.0.1", path = "../rmenu-plugin" } +rmenu-plugin = { version = "0.0.2", path = "../rmenu-plugin" } serde = { version = "1.0.171", features = ["derive"] } serde_json = "1.0.103" serde_yaml = "0.9.24" diff --git a/rmenu/public/default.css b/rmenu/public/default.css index ca19996..6c495e4 100644 --- a/rmenu/public/default.css +++ b/rmenu/public/default.css @@ -23,6 +23,7 @@ body>div { } .results { + cursor: pointer; overflow-y: auto; height: calc(100vh - 60px); min-height: calc(100vh - 60px); diff --git a/rmenu/src/cli.rs b/rmenu/src/cli.rs index 14ca9d6..7bd3dcf 100644 --- a/rmenu/src/cli.rs +++ b/rmenu/src/cli.rs @@ -78,6 +78,12 @@ pub struct Args { /// Force enable/disable comments #[arg(long)] use_comments: Option, + /// Allow Selection by Mouse Hover + #[arg(long)] + hover_select: Option, + /// Activate Menu Result with Single Click + #[arg(long)] + single_click: Option, // search settings /// Enforce Regex Pattern on Search @@ -220,6 +226,8 @@ impl Args { config.page_load = self.page_load.unwrap_or(config.page_load); config.use_icons = self.use_icons.unwrap_or(config.use_icons); config.use_comments = self.use_icons.unwrap_or(config.use_comments); + config.hover_select = self.hover_select.unwrap_or(config.hover_select); + config.single_click = self.single_click.unwrap_or(config.single_click); // override search settings cfg_replace!(config.search.restrict, self.search_restrict); cfg_replace!(config.search.min_length, self.search_min_length); diff --git a/rmenu/src/config.rs b/rmenu/src/config.rs index 5d6717e..7e12d84 100644 --- a/rmenu/src/config.rs +++ b/rmenu/src/config.rs @@ -211,6 +211,11 @@ fn _true() -> bool { true } +#[inline] +fn _false() -> bool { + false +} + #[derive(Debug, PartialEq, Deserialize)] #[serde(default)] pub struct SearchConfig { @@ -248,6 +253,10 @@ pub struct Config { pub use_icons: bool, #[serde(default = "_true")] pub use_comments: bool, + #[serde(default = "_false")] + pub hover_select: bool, + #[serde(default = "_false")] + pub single_click: bool, pub search: SearchConfig, pub plugins: BTreeMap, pub keybinds: KeyConfig, @@ -264,6 +273,8 @@ impl Default for Config { jump_dist: 5, use_icons: true, use_comments: true, + hover_select: false, + single_click: false, search: Default::default(), plugins: Default::default(), keybinds: Default::default(), @@ -310,6 +321,8 @@ impl Config { cfg_replace!(self.page_size, options.page_size, true); cfg_replace!(self.page_load, options.page_load, true); cfg_replace!(self.jump_dist, options.jump_dist, true); + cfg_replace!(self.hover_select, options.hover_select, true); + cfg_replace!(self.single_click, options.single_click, true); // search settings cfg_replace!(self.search.placeholder, options.placeholder); cfg_replace!(self.search.restrict, options.search_restrict); diff --git a/rmenu/src/exec.rs b/rmenu/src/exec.rs index 6ac6b71..8234e05 100644 --- a/rmenu/src/exec.rs +++ b/rmenu/src/exec.rs @@ -1,4 +1,5 @@ //! Execution Implementation for Entry Actions +use std::io::{stdout, Write}; use std::process::Command; use std::{collections::HashMap, os::unix::process::CommandExt}; @@ -52,7 +53,9 @@ pub fn execute(action: &Action, term: Option) { parse_args(&command) } Method::Echo(echo) => { - println!("{echo}"); + if let Err(err) = writeln!(stdout(), "{echo}") { + log::error!("failed to write to stdout: {err:?}"); + }; std::process::exit(0); } }; diff --git a/rmenu/src/gui.rs b/rmenu/src/gui.rs index 43ce8b1..8cff85c 100644 --- a/rmenu/src/gui.rs +++ b/rmenu/src/gui.rs @@ -85,6 +85,8 @@ fn TableEntry<'a>(cx: Scope<'a, GEntry<'a>>) -> Element<'a> { false => "", }; // build sub-actions if present + let hover_select = cx.props.state.config().hover_select; + let single_click = cx.props.state.config().single_click; let actions = cx .props .entry @@ -100,7 +102,17 @@ fn TableEntry<'a>(cx: Scope<'a, GEntry<'a>>) -> Element<'a> { cx.render(rsx! { div { class: "action {act_class}", - onclick: move |_| cx.props.state.set_position(cx.props.index, idx + 1), + onmouseenter: move |_| { + if hover_select { + cx.props.state.set_position(cx.props.index, idx + 1); + } + }, + onclick: move |_| { + cx.props.state.set_position(cx.props.index, idx + 1); + if single_click { + cx.props.state.set_event(KeyEvent::Exec); + } + }, ondblclick: |_| cx.props.state.set_event(KeyEvent::Exec), div { class: "action-name", @@ -119,8 +131,17 @@ fn TableEntry<'a>(cx: Scope<'a, GEntry<'a>>) -> Element<'a> { div { id: "result-{cx.props.index}", class: "result {result_classes} {multi_classes}", - // onmouseenter: |_| cx.props.state.set_position(cx.props.index, 0), - onclick: |_| cx.props.state.set_position(cx.props.index, 0), + onmouseenter: move |_| { + if hover_select { + cx.props.state.set_position(cx.props.index, 0); + } + }, + onclick: move |_| { + cx.props.state.set_position(cx.props.index, 0); + if single_click { + cx.props.state.set_event(KeyEvent::Exec); + } + }, ondblclick: |_| cx.props.state.set_event(KeyEvent::Exec), if cx.props.state.config().use_icons { cx.render(rsx! { From fcc64b6dd58685558593ba6858e83b3670dd2e03 Mon Sep 17 00:00:00 2001 From: imgurbot12 Date: Tue, 9 Apr 2024 14:40:21 -0700 Subject: [PATCH 2/6] chore: revert experimental change --- rmenu/src/exec.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rmenu/src/exec.rs b/rmenu/src/exec.rs index 8234e05..6ac6b71 100644 --- a/rmenu/src/exec.rs +++ b/rmenu/src/exec.rs @@ -1,5 +1,4 @@ //! Execution Implementation for Entry Actions -use std::io::{stdout, Write}; use std::process::Command; use std::{collections::HashMap, os::unix::process::CommandExt}; @@ -53,9 +52,7 @@ pub fn execute(action: &Action, term: Option) { parse_args(&command) } Method::Echo(echo) => { - if let Err(err) = writeln!(stdout(), "{echo}") { - log::error!("failed to write to stdout: {err:?}"); - }; + println!("{echo}"); std::process::exit(0); } }; From 14373d9f12215968ad8580f18b83173abeb4d903 Mon Sep 17 00:00:00 2001 From: imgurbot12 Date: Tue, 9 Apr 2024 14:45:56 -0700 Subject: [PATCH 3/6] fix: more precise pointer spec --- rmenu/public/default.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rmenu/public/default.css b/rmenu/public/default.css index 6c495e4..f9ac49a 100644 --- a/rmenu/public/default.css +++ b/rmenu/public/default.css @@ -23,13 +23,17 @@ body>div { } .results { - cursor: pointer; overflow-y: auto; height: calc(100vh - 60px); min-height: calc(100vh - 60px); scroll-margin-top: 60px; } +.result, +.action { + cursor: pointer; +} + .selected { background-color: lightblue; } From 2e436401f312aa9fb635aae42c94ec50d4000e8d Mon Sep 17 00:00:00 2001 From: imgurbot12 Date: Tue, 9 Apr 2024 15:02:57 -0700 Subject: [PATCH 4/6] fix: forgor rmenu-plugin and to actually update config --- rmenu-plugin/src/bin/main.rs | 14 ++++++++++++-- rmenu/public/config.yaml | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/rmenu-plugin/src/bin/main.rs b/rmenu-plugin/src/bin/main.rs index 8ca2e9b..6727a79 100644 --- a/rmenu-plugin/src/bin/main.rs +++ b/rmenu-plugin/src/bin/main.rs @@ -120,15 +120,24 @@ impl Into for EntryArgs { /// Arguments for Options CLI Command #[derive(Debug, Args)] struct OptionArgs { - /// Override Applicaiton Theme + /// Override Applicaiton CSS #[arg(short = 'C', long)] pub css: Option, + /// Override Default View Page-Size #[arg(short = 's', long)] pub page_size: Option, + /// Override Default Percentage Completion Before Page Load #[arg(short = 'l', long)] pub page_load: Option, + /// Override Selection Jump Distance #[arg(short = 'd', long)] pub jump_dist: Option, + /// Override Select on Hover Option + #[arg(long)] + pub hover_select: Option, + /// Override Single-Click Activation Option + #[arg(long)] + pub single_click: Option, // search settings /// Override Default Placeholder #[arg(short = 'P', long)] @@ -184,7 +193,6 @@ struct OptionArgs { #[arg(short = 'w', long)] pub window_width: Option, /// Override Window Height - #[arg(short = 'h', long)] pub window_height: Option, } @@ -196,6 +204,8 @@ impl Into for OptionArgs { page_load: self.page_load, jump_dist: self.jump_dist, placeholder: self.placeholder, + hover_select: self.hover_select, + single_click: self.single_click, search_restrict: self.search_restrict, search_min_length: self.search_min_length, search_max_length: self.search_max_length, diff --git a/rmenu/public/config.yaml b/rmenu/public/config.yaml index a174e9b..a1c5466 100644 --- a/rmenu/public/config.yaml +++ b/rmenu/public/config.yaml @@ -27,6 +27,8 @@ plugins: cache: onlogin options: css: ~/.config/rmenu/themes/launchpad.css + hover_select: true + single_click: true page_size: 500 transparent: true window_width: 1200 From 9e6ca9957e913b8ace6dca556a389614edf5a292 Mon Sep 17 00:00:00 2001 From: imgurbot12 Date: Tue, 9 Apr 2024 23:14:27 -0700 Subject: [PATCH 5/6] fix: tweaks to cli args broke powermenu --- rmenu-plugin/src/bin/main.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rmenu-plugin/src/bin/main.rs b/rmenu-plugin/src/bin/main.rs index 6727a79..bede423 100644 --- a/rmenu-plugin/src/bin/main.rs +++ b/rmenu-plugin/src/bin/main.rs @@ -178,21 +178,22 @@ struct OptionArgs { pub key_jump_prev: Option>, // window settings /// Override Window Title - #[arg(short, long)] + #[arg(long)] pub title: Option, /// Override Window Deocration Settings - #[arg(short, long)] + #[arg(long)] pub deocorate: Option, /// Override Window Fullscreen Settings - #[arg(short, long)] + #[arg(long)] pub fullscreen: Option, /// Override Window Tranparent Settings - #[arg(short, long)] + #[arg(long)] pub transparent: Option, /// Override Window Width #[arg(short = 'w', long)] pub window_width: Option, /// Override Window Height + #[arg(short = 'h', long)] pub window_height: Option, } From 51d66a0b76251eaf82de37f78d47c8f969ae9de2 Mon Sep 17 00:00:00 2001 From: imgurbot12 Date: Wed, 10 Apr 2024 12:09:48 -0700 Subject: [PATCH 6/6] chore: upgrade nix version --- nix/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/package.nix b/nix/package.nix index d66eab3..1075678 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -11,7 +11,7 @@ }: rustPlatform.buildRustPackage rec { pname = "rmenu"; - version = "1.2.0"; + version = "1.2.1"; src = lib.cleanSource ../.;