From c8aed9d048ad980e3c8f9a770474b2e663b4528a Mon Sep 17 00:00:00 2001 From: Stefano Mazzucco Date: Sun, 16 Jul 2017 13:02:46 +0100 Subject: [PATCH] Improve documentation about installing localy with luarocks Make clear that when installing with `luarocks install --local` one needs to export the local LUA_PATH or the libraries won't be picked up. Addresses https://github.com/stefano-m/awesome-pulseaudio_widget/issues/2 --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index d1cb775..1fd3d3c 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,33 @@ it system-wide This will ensure that all its dependencies are installed. +Note that if you install with `--local` you will have to make sure that the +`LUA_PATH` environment variable includes the local luarocks path. This can be +achieved by `eval`ing the command `luarocks path --bin` **before** Awesome is +started. + +For example, if you start Awesome from the Linux console (e.g. `xinit +awesome`) and you use `zsh`, you can add the following lines to your +`~/.zprofile`: + +``` shell +if (( $+commands[luarocks] )); then + eval `luarocks path --bin` +fi +``` + +If you use `bash`, you can add the following lines to your `~/.bash_profile`: + +``` shell +if [[ -n "`which luarocks 2>/dev/null`" ]]; then + eval `luarocks path --bin` +fi +``` + +If you use +an [X Display Manager](https://en.wikipedia.org/wiki/Display_manager) you will +need to do what explained above in your `~/.xprofile` or `~/.xinitrc`. See the +documentation of your display manager of choice for more information. # Configuration