Skip to content

Commit

Permalink
docs: update default script path
Browse files Browse the repository at this point in the history
  • Loading branch information
jmattaa committed Dec 12, 2024
1 parent 226a11d commit 43c0772
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
15 changes: 8 additions & 7 deletions CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,25 @@
3. [Using Defaults](#using-defaults)

Laser is highly customizable through Lua scripts. The default configuration
file is located at `/usr/local/share/lsr/lsr.lua`. This file is loaded by the
program and sets the default behavior for laser. You can modify this file or
create your own configuration file to change the behavior of laser.
file is located at `~/.lsr/lsr.lua`. This file is loaded by the
program and sets the default behavior for laser. Do not modify this file unless
you know what you are doing. (cuz the program will break if you do) So it's
recommended that you create your own configuration file.

## Creating Your Own Configuration File

To create your own configuration all that you need to do is to create a lua
file at `/usr/local/share/lsr/`. This will be the default file where laser will
file at `~/.config/lsr`. This will be the default file where laser will
look for your configuration. You can of course add more files to this directory
(check the `lua` directory in the repo). Other files in this directory will not
be loaded by laser but you can do a `require` to them to load them into the
`lsr.lua` file.

## Writing Your Own Configuration

The default configuration file is located at `/usr/local/share/lsr/lsr.lua`.
You can copy these files and edit them to your liking. But here comes a small
guide on what you can do with a blank `lsr.lua` file.
The default configuration file is located at `~/.lsr/lsr.lua`. You can copy
these files and edit them to your liking. But here comes a small guide on what
you can do with a blank `lsr.lua` file.

> [!NOTE]
> All laser-specific functions and constants are prefixed with `L_`.
Expand Down
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,14 @@ lsr some-directory

If you'd like to configure the program's behavior, or change the default colors,
add icons and more. You can configure the program with lua :fire:. A default
configuration will be installed at `/usr/local/.lsr/`. But if you want to
configuration will be installed at `~/.lsr/`. But if you want to
write some own configuration you can place it in `~/.config/lsr/lsr.lua`.

Copy the files from `/usr/local/.lsr/` to `~/.config/lsr/` and you can edit
them (do not change in the files in the `/usr/local/lsr/` directory
because they will be used
as default if there are missing values in the `.config`).
Copy the files from `~/.lsr/` to `~/.config/lsr/` and you can edit them (do not
change in the files in the `~/.lsr/` directory because they will be used as
default if there are missing values in the config files).

Check out the [configuration guide](/CONFIGURATION.md)
Check out the [configuration guide](/CONFIGURATION.md) for more information.

### Command-line options

Expand All @@ -110,13 +109,8 @@ you can directly pass in the flags.
- `-l` or `--long` displays in long format (permissions, last modified, size
and owner)
- `-fmyfilter` or `--filter=myfilter` applies a user defined filter from lua
check the [CONFIGURATION.md](/CONFIGURATION.md)

The flags can be chained for example using:
```sh
lsr -Dar # this will show all directories including hidden ones recursivly
lsr -GDS # this will only show directories (not hidden) and symlinks that are not mentioned in .gitignore
```
check the [CONFIGURATION.md](/CONFIGURATION.md#L_filters) for more
information

# Contributing

Expand Down

0 comments on commit 43c0772

Please sign in to comment.