Skip to content

Commit

Permalink
build: update script installation paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jmattaa committed Nov 30, 2024
1 parent 045e7ba commit 1404bc7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ file(GLOB_RECURSE SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.c")

include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")

set(DEFAULT_SCRIPT_PATH "$ENV{HOME}/.lsr/lsr.lua")
set(DEFAULT_SCRIPT_PATH "${CMAKE_INSTALL_PREFIX}/.lsr/lsr.lua")

add_executable(lsr ${SRCS})

Expand All @@ -36,7 +36,7 @@ target_link_libraries(lsr PRIVATE ${LUA_LIBRARIES})

add_custom_target(format COMMAND clang-format -i ${SRCS})

set(LUA_INSTALL_PATH "$ENV{HOME}/.lsr")
set(LUA_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/.lsr")

file(GLOB LUA_SCRIPTS "${CMAKE_CURRENT_SOURCE_DIR}/lua/*.lua")
file(MAKE_DIRECTORY "${LUA_INSTALL_PATH}")
Expand Down
2 changes: 1 addition & 1 deletion CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ create your own configuration file to change the behavior of laser.
## Creating Your Own Configuration File

To create your own configuration all that you need to do is to create a lua
file at `~/.config/lsr/lsr.lua`. This will be the default file where laser will
file at `/usr/local/share/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
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Install system-wide:

```sh
cmake -S . -B build
cmake --build build
sudo cmake --build build
sudo cmake --install build
```

Expand Down Expand Up @@ -81,11 +81,12 @@ 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 `$HOME/.lsr/`. But if you want to
configuration will be installed at `/usr/local/lsr`. But if you want to
write some own configuration you can place it in `~/.config/lsr/lsr.lua`.

Copy the files from `$HOME/.lsr` to `~/.config/lsr/` and you can edit them (do
not change in the files in the `$HOME/.lsr` directory because they will be used
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`).

Check out the [configuration guide](/CONFIGURATION.md)
Expand Down

0 comments on commit 1404bc7

Please sign in to comment.