Improve documentation about installing the widget

- remove section about installing from source: this requires some juggling and
  symlinking, so I will leave it to people who *really* want to do it
- explain how to export the local luarocks path when installint locally with luarocks
This commit is contained in:
Stefano Mazzucco 2017-07-16 13:14:46 +01:00
parent 9a5a560cae
commit a254bfe596
1 changed files with 26 additions and 6 deletions

View File

@ -14,8 +14,6 @@ documentation).
# Installation
## Using Luarocks
Probably, the easiest way to install this widget is to use `luarocks`:
luarocks install connman_widget
@ -25,11 +23,33 @@ it system-wide
This will ensure that all its dependencies are installed.
## From source
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.
Alternatively, you can copy the `connman_widget.lua` file in your
`~/.config/awesome` folder. You will have to install all the dependencies
manually though (see the `rockspec` file for more information).
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