diff --git a/README.md b/README.md index 4b3fe6a..3544db4 100644 --- a/README.md +++ b/README.md @@ -295,9 +295,9 @@ close · `SUPER+1..9` workspaces · `Print` region screenshot. `nomarchy-menu` dispatcher: root picker (no args) · `power` (lock/logout/suspend/hibernate/reboot/shutdown, SUPER+X) · `theme` (SUPER+T) · `clipboard` (cliphist, SUPER+CTRL+V) · `calc` - (rofi-calc, live, SUPER+CTRL+C) · `files` (rofi-file-browser, live - navigation, SUPER+CTRL+F) · `emoji` (rofi-emoji, SUPER+CTRL+E) · - `web` (Google). SUPER+D is `rofi -show drun`. + (rofi-calc, live, SUPER+CTRL+C) · `files` (fd → xdg-open, + SUPER+CTRL+F) · `emoji` (rofi-emoji, SUPER+CTRL+E) · `web` (Google). + SUPER+D is `rofi -show drun`. - ✓ shipped modules: `network` (nmtui in `$TERMINAL`) · `bluetooth` (blueman-manager) · `capture` (grim/slurp submenu: region/full → clipboard/file, saved to `~/Pictures/Screenshots`) · `keybinds` (the @@ -326,11 +326,12 @@ close · `SUPER+1..9` workspaces · `Print` region screenshot. - **calc** → **rofi-calc**: live results as you type via libqalculate directly (dodging the qalc-CLI "of" bug), Enter copies, menu persists to chain calculations. - - **files** → **rofi-file-browser-extended**: live directory navigation - (Backspace to ascend, toggle hidden) opening with xdg-open, replacing - the flat `fd` dump of `$HOME`. yazi (SUPER+E) stays the power browser. - **emoji** → **rofi-emoji** (new module, SUPER+CTRL+E): glyph picker, copies via the plugin's Wayland clipboard adapter. + - **files** stays the hand-rolled `fd` → `rofi -dmenu` → xdg-open fuzzy + search: rofi-file-browser-extended was tried and dropped — its + navigate-a-tree model felt worse than flat fuzzy-find for a quick + launcher, and yazi (SUPER+E) already covers real browsing. - **More menu modules from rofi tools:** the script-based counterparts (run via `rofi -dmenu`, like the hand-rolled modules), each a deliberate replacement of an existing flow: **rofi-network-manager** (a keyboard diff --git a/modules/home/keybinds.nix b/modules/home/keybinds.nix index 54b610a..7b60b1c 100644 --- a/modules/home/keybinds.nix +++ b/modules/home/keybinds.nix @@ -41,7 +41,7 @@ { mods = "$mod CTRL"; key = "V"; action = "exec, nomarchy-menu clipboard"; desc = "Clipboard history"; } { mods = "$mod CTRL"; key = "C"; action = "exec, nomarchy-menu calc"; desc = "Calculator"; } { mods = "$mod CTRL"; key = "W"; action = "exec, nomarchy-menu web"; desc = "Web search"; } - { mods = "$mod CTRL"; key = "F"; action = "exec, nomarchy-menu files"; desc = "File browser"; } + { mods = "$mod CTRL"; key = "F"; action = "exec, nomarchy-menu files"; desc = "File search"; } { mods = "$mod CTRL"; key = "E"; action = "exec, nomarchy-menu emoji"; desc = "Emoji picker"; } { mods = "$mod CTRL"; key = "N"; action = "exec, nomarchy-menu network"; desc = "Network (nmtui)"; } { mods = "$mod CTRL"; key = "B"; action = "exec, nomarchy-menu bluetooth"; desc = "Bluetooth"; } diff --git a/modules/home/rofi.nix b/modules/home/rofi.nix index 37d759c..39b5f0d 100644 --- a/modules/home/rofi.nix +++ b/modules/home/rofi.nix @@ -108,13 +108,11 @@ let -calc-command "echo -n '{result}' | wl-copy" ;; files) - # Live file browser (rofi-file-browser-extended): navigate into - # directories, go up with Backspace, toggle hidden files with the - # rofi custom key, and open the selection with xdg-open. Starts in - # $HOME. The keyboard-heavy TUI flagship for real work is yazi - # (SUPER+E); this is the quick launcher path. - exec rofi -show file-browser-extended -modi file-browser-extended \ - -file-browser-dir "$HOME" -file-browser-cmd xdg-open ;; + sel=$(fd . "$HOME" --type f --hidden --exclude .git --exclude .cache 2>/dev/null \ + | head -n 50000 \ + | sed "s|^$HOME/||" \ + | rofi -dmenu -p file) || exit 0 + [ -n "$sel" ] && exec xdg-open "$HOME/$sel" ;; emoji) # Emoji / symbol picker (rofi-emoji). The default action copies the @@ -217,7 +215,8 @@ in config = lib.mkIf cfg.rofi.enable { home.packages = [ nomarchy-menu - pkgs.xdg-utils # xdg-open for the web + file-browser modules + pkgs.fd # files module (fuzzy search over $HOME) + pkgs.xdg-utils # xdg-open for the files + web modules pkgs.nodejs # npx, for the Ask Claude module (claude-code from npm) ]; @@ -226,11 +225,11 @@ in terminal = cfg.terminal; font = "${t.fonts.ui} 12"; - # Native rofi modi backing three menu modules: calc (live, via - # libqalculate — no qalc CLI needed), emoji (glyph picker, copies via - # its bundled Wayland adapter), file-browser (live navigation). All - # render through the generated/whole-swap theme like every other modi. - plugins = [ pkgs.rofi-calc pkgs.rofi-emoji pkgs.rofi-file-browser ]; + # Native rofi modi backing two menu modules: calc (live, via + # libqalculate — no qalc CLI needed) and emoji (glyph picker, copies + # via its bundled Wayland adapter). Both render through the + # generated/whole-swap theme like every other modi. + plugins = [ pkgs.rofi-calc pkgs.rofi-emoji ]; extraConfig = { modi = "drun,run";