added add_header and wzp to docs

This commit is contained in:
Jeremie Fraeys 2024-05-31 14:21:49 -04:00
parent 9802d93dc8
commit 74460666d5
4 changed files with 71 additions and 0 deletions

View file

@ -15,6 +15,8 @@ Welcome to the .local-bin repository! Find key components below to enhance your
- `-a` or `--disable-auto-update`: Disable Homebrew auto-updates.
- `-n` or `--disable-notification`: Disable notifications during setup.
- **[docker_check](docker_check):** This script automates the process of ensuring Docker is installed and running before executing Docker-related commands. If Docker is not installed, it provides an option to install it via Homebrew.
- **[yaml_header_adder.sh](yaml_header_adder.sh):** This script ensures that YAML files within a specified directory contain the necessary `---` header. If a YAML file does not have the `---` header, the script adds it.
- **[wzp.sh](wzp.sh):** This script automates the process of starting a new Wezterm project. It allows you to select a project from a predefined list or specify a project name as an argument.
## Documentation

View file

@ -0,0 +1,31 @@
## [yaml_header_adder](../../yaml_header_adder)
This script automates the process of ensuring that YAML files within a specified directory contain the necessary `---` header. If a YAML file does not have the `---` header, the script adds it.
## Usage
Run the script with the directory containing your YAML files as an argument. The script will check each file in the directory (and its subdirectories) to see if it starts with `---`. If the header is missing, the script will add it.
```bash
./yaml_header_adder.sh <directory>
```
### Example Usage
Automatically add `---` headers to YAML files in the specified directory:
```bash
./yaml_header_adder.sh /path/to/directory
```
## Script Details
- The script uses `fd` to find all files with the `.yaml` or `.yml` extension in the specified directory.
- For each file, it checks if the first line is `---`.
- If the `---` header is missing, it adds it to the top of the file using `sed`.
## Notes
- Ensure `fd` is installed (`brew install fd` on macOS).
- The script modifies files in place; consider using version control to track changes.

0
docs/docker_check/Usage.md Executable file → Normal file
View file

38
docs/wzp/Usage.md Executable file
View file

@ -0,0 +1,38 @@
## [wezterm_project_starter](../../wezterm_project_starter)
This script automates the process of starting a new Wezterm project. It allows you to select a project from a predefined list or specify a project name as an argument.
## Usage
Run the script without any arguments to select a project from the list of available projects. Alternatively, you can provide a project name as an argument to start that specific project.
```bash
./wezterm_project_starter.sh [project_name]
```
### Example Usage
1. Select a project from the list:
```bash
./wezterm_project_starter.sh
```
2. Start a specific project:
```bash
./wezterm_project_starter.sh my_project
```
## Script Details
- The script sets the `PROJECTS_DIR` to `~/.config/wezterm/projects`.
- If no argument is provided, the script lists all `.lua` files in the `PROJECTS_DIR` and allows the user to select one using `fzf`.
- If an argument is provided, the script checks if the corresponding `.lua` file exists in the `PROJECTS_DIR`.
- If a project is selected or specified, the script sets the `WZ_PROJECT` environment variable and starts Wezterm with the selected project.
## Notes
- Ensure `fd` and `fzf` are installed on your system (`brew install fd fzf` on macOS).
- The script relies on the presence of `.lua` files in the `PROJECTS_DIR` to list and start projects.