Skip to content

Navigation Menu

Sign in
Sign up
This repository was archived by the owner on Aug 30, 2026. It is now read-only.

feat: improving uninstaller experience - #527

Open
Pedro-Appel wants to merge 2 commits into
omacom:master from
Pedro-Appel:master
Open

feat: improving uninstaller experience #527
Pedro-Appel wants to merge 2 commits into
omacom:master from
Pedro-Appel:master

Conversation

@Pedro-Appel

@Pedro-Appel Pedro-Appel commented Aug 10, 2025

Copy link
Copy Markdown

_Hi, this is my first OSS contribution ever and I'm very happy to be doing for this project.

I have been developing something like this project but for personal use only, with my own preferences and to see this project evolve as it is shines my eyes._

About the feature.

I noticed that using the installer was different than other components.

  1. You could not go back.
  2. You could see file permissions.
  3. There was not enought space to show all files.

I just made a little adjustments and tested locally.

@Kasui92 Kasui92 left a comment
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the latest changes, gum has also been updated to version 0.17.0, which includes the ability to press 'ESC' to exit the file option selection.

However, I would suggest a more dynamic approach, still using choose.

UNINSTALLER_LIST=()
while IFS= read -r path; do
 UNINSTALLER_LIST+=("$(basename "$path" | sed 's/\.sh$//')")
done < <(find "$OMAKUB_PATH/uninstall" -mindepth 1 -maxdepth 1 -type f | sort)
CHOICE=$(gum choose "${UNINSTALLER_LIST[@]}" "<< Back" --header "Uninstall application" --height "$((${#UNINSTALLER_LIST[@]} + 2))")
if [[ "$CHOICE" == "<< Back"* ]] || [[ -z "$CHOICE" ]]; then
 # Don't uninstall anything
 echo ""
else
 [ -n "$CHOICE" ] && gum confirm "Run uninstaller?" && source "$CHOICE" && gum spin --spinner globe --title "Uninstall completed!" -- sleep 3
fi
clear
source $OMAKUB_PATH/bin/omakub

This way, the --height is also managed dynamically without passing a value that needs to be updated each time.

Copy link
Copy Markdown
Author

I'm currently looking to update GUM version, I think the ESC functionality is a great bonus, and the newest version has a lot of bug fixes

Kasui92 commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

I'm currently looking to update GUM version, I think the ESC functionality is a great bonus, and the newest version has a lot of bug fixes

Yep, the latest version of gum has significantly simplified the use of the file command.
However, even for future developments (e.g., multiple choice), choose can be a valid solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@Kasui92 Kasui92 Kasui92 approved these changes
Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /