# node-gsettings

> Node binding to gsettings dconf tool

Latest version **0.1.9** (published 2015-06-15) · 0 weekly downloads

## Install

```sh
npm install node-gsettings
pnpm add node-gsettings
yarn add node-gsettings
bun add node-gsettings
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.9 |
| Published | 2015-06-15 |
| First published | 2015-06-09 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.1.9 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 2 |
| Author | Leopold Burdyl |
| Maintainers | vilnius-leopold |
| Keywords | dconf, gsettings, settings, config, gnome, desktop, linux, gnu |

## Links

- npm: https://www.npmjs.com/package/node-gsettings
- Repository: https://github.com/vilnius-leopold/node-gsettings
- Issues: https://github.com/vilnius-leopold/node-gsettings/issues
- npm.io page: https://npm.io/package/node-gsettings

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.1.9 (latest) — 2015-06-15
- 0.1.8 — 2015-06-11
- 0.1.7 — 2015-06-11
- 0.1.6 — 2015-06-10
- 0.1.5 — 2015-06-10
- 0.1.4 — 2015-06-10
- 0.1.3 — 2015-06-10
- 0.1.2 — 2015-06-09
- 0.1.1 — 2015-06-09
- 0.1.0 — 2015-06-09

## README

node-gsettings
==============
Nodejs binding to [gsettings](https://developer.gnome.org/gio/stable/GSettings.html). Gsettings is a common way of storing application configurations on linux in a standardized, transparent manner. Gsettings uses [dconf](https://wiki.gnome.org/action/show/Projects/dconf) for its backend.

This project is a fork of [GPII/linux gsettingsBridge](https://github.com/GPII/linux/tree/master/gpii/node_modules/gsettingsBridge).


## Install
```sh
npm install node-gsettings
```

## API
Currently the API is very limited to very basic gsettings functionality. It is intended for updating and reading application settings. This is not an API for settings up or configuring dconf settings.


### Implemented Types
dconf has a very flexible [type system](https://developer.gnome.org/glib/stable/glib-GVariantType.html). Currently only the following are implemented:

| GVariant Type |  Javascript Type      | Javascript Example      | Read | Write |
| ------------- | --------------------- | ----------------------- | :--: | :---: |
| `b`           | Boolean               | `true`, `false`             |  ✓   |   ✓   |
| `s`           | String                | `"Some string"`           |  ✓   |   ✓   |
| `i`, `u`, `d` | Number                | `-12`, `5`, `3.12`            |  ✓   |   ✓   |
| `as`          | Array of Strings      | `[ 'one', 'two', 'three' ]` |  ✓   |   ✓   |
| `a(ss)`       | Array of String Pairs | `[ ['one', 'two'], ['three', 'four'] ]` |  ✓   |       |


### Usage
```javascript
var GSettings = require("node-gsettings");

var schemaId = 'org.gnome.desktop.interface';

// create a new settings object
var settings = new GSettings( schemaId );

// get single property
var clockFormat = settings.get('clock-format');

// get all properties
var settingsData = settings.getAll();

// get serialized properties
var settingsJSON = settings.serialize();

// get list of keys
var keyList = settings.getKeyList();

// setting a single key
settings.set('clock-format', '12h');
```

## Contributers
- [Antranig Basman](https://github.com/amb26)
- [Leopold Burdyl](https://github.com/vilnius-leopold)

## License
[BSD-3-Clause](LICENSE.txt)

---
_Source: https://npm.io/package/node-gsettings · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
