Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing to loop and adding focus #394

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Roman-Weisman
Copy link

  1. Although the previous solution worked, surrounding with while for readability.
  2. Focus ( if that's the name ) :
  • First, reading the exsiting size value from the .toml
  • Then, on load, the focus will be on the configured font size, rather than on the first item. Changing font size will keep the focus on the new value.
  • Inside the while, in the first run, the sed will rewrite the existing value; the other approach is to move this line below the choise selection, but then, there's a need to first check that in case of "<<Back" the value won't accidently change the size = << Back in the .toml.
    To avoid it, I just moved the sed line above the choice and know that in the first run it will override the same value in the .toml; still looks cleaner than adding an if or a case loop.

Also - kept the same regex; as changing it to something like loop while it's not "<< Back" breaks the ctrl+c , which by default goes to the previous menu. It's possible to add another check for this as well, but it's getting more complex than the existing regex.

1. Although the previous solution worked, surrounding with while for
readability.
2. Focus ( if that's the name ) :
 - First, reading the exsiting size value from the .toml
 - Then, on load, the focus will be on the configured font size, rather
than on the first item. Changing font size will keep the focus on the
new value.

* Inside the while, in the first run, the sed will rewrite the existing
value; the other approach is to move this line below the choise
selection, but then, there's a need to first check that in case of
"<<Back" the value won't accidently change the size = << Back in the
.toml.
To avoid it, I just moved the sed line above the choice and know that in
the first run it will override the same value in the .toml; still looks
cleaner than adding an if or a case loop.
1. Getting all apps from $OMAKUB_PATH/uninstall, removing path and app-
prefix if exists, also, removing the .sh postfix, sorting and adding the
"<< Back" option at the end.
2. Add header "Uninstall application" ( similar to the one in install.sh
), set height to 29 ( to see all items ).
3. Going back to $OMAKUB_PATH/uninstall to fetch the full path to the
.sh app.
4. reusing the exisintg gum confirm logic.

* if user is pressing Back or ctrl+c, it will bring him to previous
menu.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant