mirror of
https://github.com/tw93/Mole.git
synced 2026-03-24 04:20:07 +00:00
🎨 Display effect optimization
This commit is contained in:
19
mole
19
mole
@@ -356,16 +356,12 @@ show_main_menu() {
|
|||||||
local selected="${1:-1}"
|
local selected="${1:-1}"
|
||||||
local full_draw="${2:-true}"
|
local full_draw="${2:-true}"
|
||||||
|
|
||||||
if [[ "$full_draw" == "true" ]]; then
|
# Full redraw each time (prevents ghost menu items)
|
||||||
clear_screen
|
clear_screen
|
||||||
echo ""
|
echo ""
|
||||||
show_brand_banner
|
show_brand_banner
|
||||||
show_update_notification
|
show_update_notification
|
||||||
echo ""
|
echo ""
|
||||||
printf '\033[s'
|
|
||||||
else
|
|
||||||
printf '\033[u\033[0J'
|
|
||||||
fi
|
|
||||||
|
|
||||||
show_menu_option 1 "Clean Mac - Remove junk files and optimize" "$([[ $selected -eq 1 ]] && echo true || echo false)"
|
show_menu_option 1 "Clean Mac - Remove junk files and optimize" "$([[ $selected -eq 1 ]] && echo true || echo false)"
|
||||||
show_menu_option 2 "Uninstall Apps - Remove applications completely" "$([[ $selected -eq 2 ]] && echo true || echo false)"
|
show_menu_option 2 "Uninstall Apps - Remove applications completely" "$([[ $selected -eq 2 ]] && echo true || echo false)"
|
||||||
@@ -410,6 +406,9 @@ interactive_main_menu() {
|
|||||||
first_draw=false
|
first_draw=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Drain any pending input to prevent touchpad scroll issues
|
||||||
|
drain_pending_input
|
||||||
|
|
||||||
local key=$(read_key)
|
local key=$(read_key)
|
||||||
[[ $? -ne 0 ]] && continue
|
[[ $? -ne 0 ]] && continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user