Skip to content

Commit

Permalink
Guide For Tui Installation
Browse files Browse the repository at this point in the history
Co-Authored-By: aayush <[email protected]>
Co-Authored-By: Smriti Bhandari <[email protected]>
  • Loading branch information
3 people committed Jan 2, 2025
1 parent 77ccb17 commit 9039135
Show file tree
Hide file tree
Showing 2 changed files with 187 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/installation/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


```sh [Install]
bash <(curl -L https://chalisehari.com.np/lvfs)
bash <(curl -L https://chalisehari.com.np/carchx)
```

```sh [Run]
Expand All @@ -21,5 +21,5 @@ You don't need to run the installation script every time. You can run it once, a
<br><br>
If the installation command fails, you can try running
<br>
`curl -fsSL https://chalisehari.com.np/lvfs | sh`
`curl -fsSL https://chalisehari.com.np/carchx | sh`
:::
188 changes: 185 additions & 3 deletions docs/installation/tui.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<h1></h1>

<img
src="https://cdn-icons-png.flaticon.com/128/4330/4330899.png"
alt="Disclaimer"
width="100"
width="80"
align="right"
/>

<h1>Disclaimer</h1>

<a href="https://github.com/ChrisTitusTech/linutil" target="blank"><img src="https://img.shields.io/badge/TUI%20CREDIT-ChrisTitusTech/linutil-ef9f76?style=for-the-badge&logoColor=FB4700&labelColor=1c1c29&logo=rust"/></a>

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`](https://github.com/ChrisTitusTech/linutil) and its [`Contributors`](https://github.com/ChrisTitusTech/linutil/graphs/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.


Expand All @@ -18,3 +18,185 @@ Keep in mind, the TUI is still in development, so bugs might pop up. If you find

Lastly, a big thank you to [`ChrisTitusTech`](https://github.com/ChrisTitusTech) and the [`Contributors`](https://github.com/ChrisTitusTech/linutil/graphs/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

<img
src="https://cdn-icons-png.flaticon.com/128/733/733553.png"
alt="TUI"
width="50"
align="right"
/>

### 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)
```

<br>

<img
src="https://cdn-icons-png.flaticon.com/128/4555/4555440.png"
alt="TUI"
width="50"
align="right"
/>

### 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)
```

<br>

<img
src="https://cdn-icons-png.flaticon.com/128/487/487551.png"
alt="TUI"
width="45"
align="right"
/>

### 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"
]
```

<br>

<img
src="https://cdn-icons-png.flaticon.com/128/1753/1753543.png"
alt="TUI"
width="55"
align="right"
/>

### **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!
<br>

<img
src="https://cdn-icons-png.flaticon.com/128/993/993723.png"
alt="TUI"
width="50"
align="right"
/>

### **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](https://www.rust-lang.org/tools/install).


#### 🍴 **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](https://github.com/harilvfs/carch/blob/main/LICENSE).

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

**Source Contribution Guide [ChrisTitusTech/linutil](https://github.com/harilvfs/linutil/blob/main/.github/CONTRIBUTING.md)**


0 comments on commit 9039135

Please sign in to comment.