0.1.9 • Published 9 years ago

node-gsettings v0.1.9

Weekly downloads
4
License
-
Repository
github
Last release
9 years ago

node-gsettings

Nodejs binding to gsettings. Gsettings is a common way of storing application configurations on linux in a standardized, transparent manner. Gsettings uses dconf for its backend.

This project is a fork of GPII/linux gsettingsBridge.

Install

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. Currently only the following are implemented:

GVariant TypeJavascript TypeJavascript ExampleReadWrite
bBooleantrue, false
sString"Some string"
i, u, dNumber-12, 5, 3.12
asArray of Strings[ 'one', 'two', 'three' ]
a(ss)Array of String Pairs[ ['one', 'two'], ['three', 'four'] ]

Usage

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

License

BSD-3-Clause

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago