dot/.local/share/gnome-shell/extensions/wsmatrix@martin.zurowietz.de/extension.js

32 lines
908 B
JavaScript
Raw Normal View History

2020-05-11 09:16:27 +00:00
const WsMatrix = imports.misc.extensionUtils.getCurrentExtension();
const Lang = imports.lang;
const Meta = imports.gi.Meta;
const Settings = WsMatrix.imports.Settings.Settings;
const WmOverride = WsMatrix.imports.WmOverride.WmOverride;
const OverviewOverride = WsMatrix.imports.OverviewOverride.OverviewOverride;
class WsMatrixExtension {
constructor() {
let settings = new Settings(WsMatrix.metadata['settings-schema']);
let keybindings = new Settings(WsMatrix.metadata['keybindings-schema']);
this.overrideWorkspace = new WmOverride(settings, keybindings);
this.overrideOverview = new OverviewOverride(settings, keybindings);
}
destroy() {
this.overrideWorkspace.destroy();
this.overrideOverview.destroy();
}
}
let wsMatrix;
function enable() {
wsMatrix = new WsMatrixExtension();
}
function disable() {
wsMatrix.destroy();
wsMatrix = null;
}