Skip to content

Disclaimer

Disclaimer

Let’s be real—I didn’t create the TUI for the Carch project from scratch. My amazing noob skills in Rust made that impossible. Instead, all credit goes to the ChrisTitusTech LinUtil project and its Contributors. Thanks to its MIT license, I was able to use their TUI for my project. However, the bash scripts inside the TUI? Those are my creation.

Now, Carch doesn’t fully depend on this TUI. It’s just an extra feature to make things more user-friendly. While the TUI lets you run Carch scripts, it’s not exactly the same as the main scripts. For example, I had to remove gum for menu and item selection to make it work. Instead, you’ll need to type your options in the TUI. These are small changes and won’t affect how the scripts work much.

Keep in mind, the TUI is still in development, so bugs might pop up. If you find any, please let me know, and I’ll fix them as soon as I can.

Lastly, a big thank you to ChrisTitusTech and the Contributors. Your work in the Linux community is amazing, and I’m grateful to have been able to use your project as part of mine.

Installation

TUI

Install TUI Directly from the GitHub Repository

Run the following command to download and use the TUI directly:

sh
bash <(curl -L https://chalisehari.com.np/carchtui)

TUI

Install Using the Main Script

This will download the TUI along with the main script. Once installed, you can run the TUI using:

  • carch --tui
  • carch -t

First, install carch by running:

sh
bash <(curl -L https://chalisehari.com.np/carchx)

TUI

Customize with .toml Files

The TUI supports custom .toml files for executing specific commands.
Here’s an example carch.toml configuration:

toml
# example carch.toml

auto_execute = [
    "Communication Apps",
    "Android",
    "Thunar"
]

TUI

Usage

🗂 Specify Your Configuration File

Save your .toml configuration file at:
~/.config/carch/carch.toml

To execute the commands in the order specified in your .toml file, run:

sh
carch-tui --config ~/.config/carch/carch.toml

This will execute the commands in the order you have specified in the .toml file.

NOTE

This TUI is an optional feature for a more user-friendly experience.

The main carch script remains unaffected and works independently.

The TUI is still in development, so bugs may appear. Feel free to report them for a quick fix!


TUI

Contributing to TUI

Thank you for considering contributing to Carch! Your efforts help improve the project, and we’re excited to have you on board. Follow these simple guidelines to ensure a smooth contribution process.

📦 1. Install Rust

Before you start, ensure you have Rust installed on your machine. If not, you can install it by following the instructions at rust-lang.org.

🍴 2. Fork and Clone the Repository

  • Fork the repository on GitHub.

  • Clone your forked repository locally by running:

    sh
    git clone https://github.com/YOUR_USERNAME_HERE/carch.git
    cd carch

✏️ 3. Make Your Changes

  • Edit Files: Modify the relevant files to implement your changes.

  • Test Your Changes: Use the following command to test your modifications:

    sh
    cargo run

    This will execute the project locally to ensure everything works as expected.

🧠 4. Understand the Existing Code

  • Have a Clear Reason: Avoid making unnecessary changes. Be prepared to explain why your updates are essential and how they improve the project.
  • Follow Conventions: Ensure your changes align with the existing coding style, design patterns, and overall project goals. Justify new methods or patterns clearly if introduced.

🔎 5. Learn from Past Pull Requests (PRs)

  • Review Merged PRs: Study previously merged PRs to understand what types of contributions are accepted.
  • Check Rejected PRs: Avoid repeating mistakes or proposing changes that were previously declined.

📝 6. Write Clean, Descriptive Commit Messages

  • Be Clear: Describe what the commit does and why the change was made.
  • Use the Imperative Mood: For example, "Add feature X" or "Fix bug Y" instead of "Added feature X" or "Fixed bug Y".
  • Keep Commits Clean: Avoid committing changes followed by immediate fixes. Instead, amend your commits or squash them if necessary.

🔒 7. Keep Pull Requests (PRs) Small and Focused

  • One Feature or Fix per PR: Small, targeted PRs are easier to review and more likely to be accepted.
  • Avoid Unrelated Changes: Grouping unrelated updates in a single PR can complicate reviews and result in rejections.

8. Understand and Test the Code You Write

  • Code Review: Check your code for readability, performance, and efficiency.
  • No Blind Submissions: Avoid submitting AI-generated code without fully understanding and testing it.
  • Testing is Mandatory: Ensure your code works as intended. PRs without proper testing may be rejected.

💬 9. Code Review and Feedback

  • Be Open to Feedback: PRs will be reviewed, and feedback will be provided. Be ready to adjust your changes accordingly.
  • Review Others’ PRs: If you feel comfortable, help review other contributors’ PRs. This fosters collaboration and ensures high-quality contributions.

🎨 10. Contributions Beyond Code

  • Test the Tool: Running the project in various environments and providing feedback is invaluable.
  • Report Issues: Clearly describe any bugs or problems you encounter, providing detailed reproduction steps.
  • Suggest Features: Propose new features with clear reasoning and use cases, ensuring they align with the project’s scope and style.

📜 License

By contributing to Carch, you agree that your contributions will be licensed under the project’s GPL license.

We appreciate your contributions and look forward to collaborating with you to make Carch even better!

Source Contribution Guide ChrisTitusTech/linutil

Released under the GPL-3.0 License.