1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-05 10:53:48 +00:00
Commit Graph

10 Commits

Author SHA1 Message Date
Else00
cfdd414320 feat(menu): add sort (date/name/size), live filter, reverse; visible-only A/N; responsive footer (#34)
Paginated menu:
- Sorting: press S/s to cycle Date → Name → Size; press R/r to reverse.
- Live filter: press F/f to enter; case-insensitive substring; prefix with ' to anchor at start; DELETE to backspace; ENTER to apply; ESC to cancel. Shows “searching…” while rebuilding.
- Selection scope: A (All) and N (None) now work on the currently visible items only (after filter/sort), not the entire list.
- Footer: adds A/N to the help line and wraps only at ' | ' separators so labels are never broken; adapts to terminal width.
- Internals: view_indices mapping for filtered/sorted view; glob-safe matching via _pm_escape_glob; drain_pending_input; robust stty restore; optional MOLE_MANAGED_ALT_SCREEN; cleanup unsets MOLE_READ_KEY_FORCE_CHAR; shellcheck clean.

common.sh:
- read_key supports a raw typing mode (MOLE_READ_KEY_FORCE_CHAR=1) emitting CHAR:<k>; ENTER/DELETE/ESC handled.
- Uppercase A/N/R mappings (ALL/NONE/RETRY), printable-key detection, better ESC sequence handling.

app_selector.sh:
- Builds and exports per-item metadata CSV for epochs and size_kb via MOLE_MENU_META_EPOCHS and MOLE_MENU_META_SIZEKB; unsets them after the menu.
- Menu options keep display text; sorting/filtering use metadata.

uninstall.sh:
- Computes app_size_kb using du -sk for numeric sorting while keeping human-readable size; writes it as the final field.
- load_applications reads the new size_kb field.

Notes:
- Footer grew due to new commands; responsive wrapping prevents mid-word breaks.
- ./tests/run.sh: only the two upstream failures remain (unchanged by this patch).

Co-authored-by: Jonas Bertossa <jonas.bertossa@eoc.ch>
2025-10-14 09:40:47 +08:00
Tw93
62537d8d44 Automatic formatting 2025-10-12 21:43:37 +08:00
Tw93
65e3585f95 Uninstall function detailed upgrade 2025-10-11 11:40:01 +08:00
Tw93
6c60c0f01b I don't like emojis anymore 2025-10-08 23:21:52 +08:00
Tw93
1ae3479072 Compatible with German and French system users 2025-10-08 11:31:03 +08:00
Tw93
53bb2751a3 fix: correctly parse comma-separated indices for batch uninstall selection 2025-10-05 19:16:32 +08:00
Tw93
a830123ac4 🎨 Uninstalling and cleaning is a cleaner experience 2025-10-04 17:59:12 +08:00
Tw93
59f4c22a32 🎨 Updates for better use and support 2025-09-30 13:48:28 +08:00
Tw93
e2fd35f8a7 🎨 Continue to upgrade to easy to use 2025-09-30 00:43:52 +08:00
Tw93
c35a210344 🎨 Refactor new feature uninstall 2025-09-25 20:22:51 +08:00