diff --git a/files/system-monitor-graph@rcassani/desklet.js b/files/system-monitor-graph@rcassani/desklet.js index b65475d..8703719 100644 --- a/files/system-monitor-graph@rcassani/desklet.js +++ b/files/system-monitor-graph@rcassani/desklet.js @@ -26,6 +26,8 @@ MyDesklet.prototype = { // initialize settings this.settings = new Settings.DeskletSettings(this, this.metadata["uuid"], desklet_id); this.settings.bindProperty(Settings.BindingDirection.IN, "type", "type", this.on_setting_changed); + this.settings.bindProperty(Settings.BindingDirection.IN, "refresh-interval", "refresh_interval", this.on_setting_changed); + // initialize desklet GUI this.setupUI(); diff --git a/files/system-monitor-graph@rcassani/settings-schema.json b/files/system-monitor-graph@rcassani/settings-schema.json index a16d79f..2875607 100644 --- a/files/system-monitor-graph@rcassani/settings-schema.json +++ b/files/system-monitor-graph@rcassani/settings-schema.json @@ -27,5 +27,18 @@ "type": "colorchooser", "default": "rgba(50,168,82,1.0)", "description": "Line color" + }, + "refresh-interval": { + "type": "spinbutton", + "default": 2, + "step": 1, + "min": 1, + "max": 30, + "units": "seconds", + "description": "Refresh interval", + "tooltip": "Increase or decrease refresh interval in seconds." } + + + }