Skip to content
This repository was archived by the owner on Nov 2, 2024. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions gnome-extension/extension.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/* extension.js
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/

/* exported init */
const {Gio, GObject} = imports.gi;

const QuickSettings = imports.ui.quickSettings;

const FeatureToggle = GObject.registerClass(
class FeatureToggle extends QuickSettings.QuickToggle {
_init() {
super._init({
label: 'Feature Name',
iconName: 'selection-mode-symbolic',
toggleMode: true,
});

/* // Binding the toggle to a GSettings key
this._settings = new Gio.Settings({
schema_id: 'org.gnome.shell.extensions.example',
});

this._settings.bind('feature-enabled',
this, 'checked',
Gio.SettingsBindFlags.DEFAULT); */
}
});

class Extension {
constructor() {
this._indicator = null;
}

enable() {
this._indicator = new FeatureToggle();
}

disable() {
this._indicator.destroy();
this._indicator = null;
}
}

function init() {
return new Extension();
}
8 changes: 8 additions & 0 deletions gnome-extension/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "Lenovoctrl",
"description": "GNOME extension to control aspects of Lenovo IdeaPad/Legion devices. Requires lenovoctrl daemon to be installed.",
"uuid": "lenovoctrl@retrixe.me",
"shell-version": [
"43"
]
}
1 change: 1 addition & 0 deletions gnome-extension/stylesheet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* Add your custom extension styling here */