Skip to content

Commit

Permalink
Fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
JezerM committed Jul 14, 2024
1 parent 993aa30 commit bac916e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ jobs:
-
name: Run Prettier
run: npm run prettier
-
name: Run Prettier for themes
run: npm run prettier:themes

package-lock:

Expand Down
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
themes/
out/
build/unpacked
build/nody-asar
.github/
dist/
*.json
6 changes: 5 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
module.exports = {
/**
* @see https://prettier.io/docs/en/configuration.html
* @type {import("prettier").Config}
*/
export default {
trailingComma: "es5",
tabWidth: 2,
semi: true,
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,23 @@ sudo node make install
This will rebuild **electron** along with **node-gtk**, compile typescript with `npx tsc`, and then build the package root directory inside `build/unpacked`. Later, install it with `node make install`.

Also, you can package `build/unpacked` to whatever you want, like **.deb** with:

```sh
dpkg-deb --root-owner-group --build unpacked
```

### Setting up with LightDM

Inside `/etc/lightdm/lightdm.conf`, below a Seat configuration, add:

```
greeter-session=nody-greeter
```

Afterwards, restart the lightdm service.

> ***Note:*** Be sure that nody-greeter works before restarting lightdm
> [!CAUTION]
> Be sure that nody-greeter works before restarting lightdm
## Theme JavaScript API

Expand All @@ -99,18 +102,21 @@ npm install nody-greeter-types
## Additional features

### Brightness control

`acpi` is the only tool needed to control the brightness, besides a compatible device. This functionality is based on [acpilight][acpilight] replacement for `xbacklight`.

udev rules are needed to be applied before using it, check [acpilight rules][acpilight_rules]. Then, lightdm will need to be allowed to change backlight values, to do so add lightdm user to **video** group: `sudo usermod -a -G video lightdm`

You can enable it inside `/etc/lightdm/web-greeter.yml`

### Battery status

`acpi` and `acpi_listen` are the only tools you need (and a battery). This functionality is based on ["bat" widget][bat_widget] from ["lain" awesome-wm library][lain].

You can enable it inside `/etc/lightdm/web-greeter.yml`.

## Debugging

You can run the greeter from within your desktop session if you add the following line to the desktop file for your session located in `/usr/share/xsessions/`: `X-LightDM-Allow-Greeter=true`.

You have to log out and log back in after adding that line. Then you can run the greeter from command line.
Expand All @@ -123,7 +129,8 @@ nody-greeter --debug

Check `nody-greeter --help` for more commands.

> ***Note:*** Do not use `lightdm --test-mode` as it is not supported.
> [!NOTE]
> Do not use `lightdm --test-mode` as it is not supported.
## Troubleshooting

Expand All @@ -133,9 +140,8 @@ Check `nody-greeter --help` for more commands.
Make sure you are using a [node-gtk][node-gtk] supported Node.js version.


[web-greeter]: https://github.com/JezerM/web-greeter "Web Greeter"
[nody-greeter-types]: https://github.com/JezerM/nody-greeter-types "nody-greeter-types"
[nody-greeter-types]: https://github.com/JezerM/nody-greeter-types "nody-greeter-types"
[web-greeter-docs]: https://jezerm.github.io/web-greeter-page/docs/ "API Documentation"
[acpilight]: https://gitlab.com/wavexx/acpilight/ "acpilight"
[acpilight_rules]: https://gitlab.com/wavexx/acpilight/-/blob/master/90-backlight.rules "udev rules"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"lint:theme:dracula:fix": "eslint \"themes/themes/dracula/ts/**\" --fix",
"lint:themes": "npm run lint:theme:gruvbox && npm run lint:theme:dracula",
"lint:themes:fix": "npm run lint:theme:gruvbox:fix && npm run lint:theme:dracula:fix",
"prettier": "prettier --check src/",
"prettier:fix": "prettier --write src/",
"prettier": "prettier --check .",
"prettier:fix": "prettier --write .",
"prettier:theme:gruvbox": "prettier --check themes/themes/gruvbox/ts/ ",
"prettier:theme:gruvbox:fix": "prettier --write themes/themes/gruvbox/ts/",
"prettier:theme:dracula": "prettier --check themes/themes/dracula/ts/ ",
Expand Down

0 comments on commit bac916e

Please sign in to comment.