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

feat: Add automation based on config file #836

Merged
merged 7 commits into from
Nov 7, 2024

Conversation

jeevithakannan2
Copy link
Contributor

@jeevithakannan2 jeevithakannan2 commented Oct 15, 2024

Type of Change

  • New feature
  • Bug fix
  • Documentation update
  • Refactoring
  • Hotfix
  • Security patch
  • UI/UX improvement

Description

  • This PR introduces the ability to execute specified commands upon opening the TUI by providing a configuration file.
  • It implements a basic structure for optionally passing a config file to linutil.
  • This feature can be useful for automating system setups using a single config file (for non-interactive scripts), eliminating the need to repeatedly selecting the same set of commands for each system setup.
  • Users can now pass a config file to linutil, and the specified commands in config will be executed in order.
  • The config file is based on toml structure.
  • If used with feat: Add --skip-confirmation flag #834 the commands are executed without a confirmation prompt when opening linutil.
2024-10-16.00-08-11.mp4

Example toml file used in video:

auto_execute = [
    "Fastfetch",
    "Alacritty",
    "Kitty"
]

Testing

  • Tested on Arch Linux. No issues.

Checklist

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

@adamperkowski adamperkowski added the enhancement New feature or request label Oct 25, 2024
Copy link
Collaborator

@adamperkowski adamperkowski left a comment

Choose a reason for hiding this comment

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

Love this but

  1. I think config files need a bigger discussion in general
  2. This needs a documentation update

@jeevithakannan2
Copy link
Contributor Author

This is just a basic implementation. Starting point of config file.

@adamperkowski
Copy link
Collaborator

Can you update the docs to say something about this please?

@jeevithakannan2
Copy link
Contributor Author

jeevithakannan2 commented Oct 28, 2024

Can you update the docs to say something about this please?

Yeah will work on that. I would like some one to help me with that. I am not in my hometown and cannot do it rn.

@jeevithakannan2 jeevithakannan2 force-pushed the automation branch 2 times, most recently from 4914e88 to 6cabee6 Compare October 28, 2024 03:13
@adamperkowski
Copy link
Collaborator

Can you update the docs to say something about this please?

Yeah will work on that. I would like some one to help me with that. I am not in my hometown and cannot do it rn.

No problem. I can take a look later.

@jeevithakannan2
Copy link
Contributor Author

Can you update the docs to say something about this please?

Yeah will work on that. I would like some one to help me with that. I am not in my hometown and cannot do it rn.

No problem. I can take a look later.

Thank you

Copy link
Collaborator

@adamperkowski adamperkowski left a comment

Choose a reason for hiding this comment

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

MERGE #834 FIRST

@jeevithakannan2
Copy link
Contributor Author

@adamperkowski Thanks

@ChrisTitusTech ChrisTitusTech merged commit 9f08637 into ChrisTitusTech:main Nov 7, 2024
2 checks passed
@jeevithakannan2 jeevithakannan2 deleted the automation branch November 7, 2024 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants