linutil icon indicating copy to clipboard operation
linutil copied to clipboard

feat: Multi-selection and installation

Open jeevithakannan2 opened this issue 5 months ago • 4 comments

Pull Request

Implement Multi-Selection and Installation feature

preview

Type of Change

  • [x] New feature
  • [x] UI/UX improvement

Description

This pull request introduces a multi-selection feature that allows users to select multiple commands and execute them in one button press. The commands will be executed one after another in sequential order. Selected commands are marked with an asterisk (*) next to the command name. When executed, the selected commands are concatenated allowing them to run sequentially.

[!NOTE] If you want to disable multi-selection for a specific tab it can be specified in the tab_data.toml as multi_selectable = false

  • Press V to toggle multi-selection option.
  • Press Space to select/unselect an command.
  • Press Enter to install all the selected commands.

Testing

Works as described.

Impact

  • Add keybind to enable multi-selection.
  • Adds multi-selection functionality to the command list.
  • Displays an asterisk (*) next to selected commands.
  • Runs the selected commands sequentially by merging them.
  • Should add multi_selectable = false to disable multi selection in specific tab. By default it is enabled.
  • If one script fails the whole execution off all selected commands will not execute.

Additional Information

[!WARNING] The only issue I faced was the commands are executed in the order you select them, so If system update is selected at last it would run the system update at the last only. I was planning on implementing a priority based execution but it needs more work to be done. I planned it for another PR. For now this PR is solely focused on multi selection and execution of commands.

I have disabled multi selection for utilities tab by adding multi_selectable = false as we don't want to execute them with any other commands.

Checklist

  • [x] My code adheres to the coding and style guidelines of the project.
  • [x] I have performed a self-review of my own code.
  • [x] I have commented my code, particularly in hard-to-understand areas.
  • [x] My changes generate no errors/warnings/merge conflicts.

jeevithakannan2 avatar Sep 07 '24 17:09 jeevithakannan2