Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
WIttyJudge committed Nov 27, 2024
1 parent 363344b commit 27b570f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ Instead, it collects domains from different sources, combines them, and updates

# Installation

Head for the [releases page](https://github.com/wittyjudge/barrier/releases) and download the binary for your system.
## Package manager

Arch Linux:
Arch Linux (AUR):

```bash
yay -S barrier
```

## Manual Installation

Download a binary from the [releases page](https://github.com/WIttyJudge/barrier/releases) for Linux, macOS or Windows.

# Usage

```
Expand All @@ -37,7 +41,7 @@ COMMANDS:
GLOBAL OPTIONS:
--config-file value Path to the configuration file
--quite, -q Enable quiet mode
--quiet, -q Enable quiet mode
--verbose, -v Enable debug mode
--help, -h Show help
--version, -V Print the version
Expand All @@ -47,7 +51,7 @@ GLOBAL OPTIONS:

Barrier supports reading and writing configuration files.
The default configuration file is located at `$HOME/.config/barrier/config.yml`,
but you can customize its location using the following environment variables:
but it can be redefined using `--config` flag or the following environment variables:

- BARRIER_CONFIG_PATH - Specifies the full path to the configuration file.
- BARRIER_CONFIG_HOME - Specifies the folder where the `config.yml` file is located.
Expand Down
12 changes: 6 additions & 6 deletions internal/action/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (a *Action) BeforeAction(ctx *cli.Context) error {
zerolog.SetGlobalLevel(zerolog.DebugLevel)
}

if ctx.Bool("quite") {
if ctx.Bool("quiet") {
zerolog.SetGlobalLevel(zerolog.Disabled)
}

Expand All @@ -42,15 +42,15 @@ func (a *Action) GetCommands() []*cli.Command {
Name: "config",
Usage: "Manage the configuration file",
Description: "" +
"This command provides tools to manage the configuration file.\n" +
"You can view the current configuration, edit it using your preferred editor, or initialize a default configuration file.\n" +
"The command allows you to view the current configuration, edit it using " +
"your preferred editor, or initialize a default configuration file.\n" +
"By default, running this command without arguments will print the entire configuration.",
Action: a.Config,
Subcommands: []*cli.Command{
{
Name: "edit",
Action: a.ConfigEdit,
Usage: "Edit the configuration file using your preferred editor",
Usage: "Edit the configuration file",
Description: "" +
"Opens the configuration file in the editor specified by the $EDITOR environment variable.\n" +
"If the configuration file doesn't exist, it will be created with default settings.",
Expand Down Expand Up @@ -88,7 +88,7 @@ func (a *Action) GetCommands() []*cli.Command {
Usage: "Restore hosts file from backup to its previous state",
Description: "" +
"When a `enable`, `disable` or `update` command is invoked, it creates a backup of the " +
"original hosts file by copying it a backup file (hosts.backup).\n" +
"original hosts file by copying it to backup file (hosts.backup).\n" +
"The `restore` command copies the backup file (hosts.backup) back to its " +
"original location (hosts).\n" +
"Backup file must already exist to perform a command successfully.",
Expand All @@ -110,7 +110,7 @@ func (a *Action) GetFlags() []cli.Flag {
DisableDefaultText: true,
},
&cli.BoolFlag{
Name: "quite",
Name: "quiet",
Aliases: []string{"q"},
Usage: "Enable quiet mode",
DisableDefaultText: true,
Expand Down

0 comments on commit 27b570f

Please sign in to comment.