ADD: make install and dist folder with compiled extension

This commit is contained in:
2024-07-01 10:25:22 +01:00
parent 4f1f7aa9c8
commit faaf3a4840
7 changed files with 173 additions and 2 deletions

42
dist/prefs.js vendored Normal file
View File

@@ -0,0 +1,42 @@
import Gtk from "gi://Gtk";
import Adw from "gi://Adw";
import Gio from "gi://Gio";
import { ExtensionPreferences, gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js";
export default class GnomeRectanglePreferences extends ExtensionPreferences {
_settings;
fillPreferencesWindow(window) {
this._settings = this.getSettings();
const page = new Adw.PreferencesPage({
title: _("General"),
iconName: "dialog-information-symbolic",
});
const animationGroup = new Adw.PreferencesGroup({
title: _("Animation"),
description: _("Configure move/resize animation"),
});
page.add(animationGroup);
const animationEnabled = new Adw.SwitchRow({
title: _("Enabled"),
subtitle: _("Floating Window"),
});
animationGroup.add(animationEnabled);
const paddingGroup = new Adw.PreferencesGroup({
title: _("Paddings"),
description: _("Configure the padding between windows"),
});
page.add(paddingGroup);
const paddingInner = new Adw.SpinRow({
title: _("Inner"),
subtitle: _("Padding between windows"),
adjustment: new Gtk.Adjustment({
lower: 0,
upper: 1000,
stepIncrement: 1,
}),
});
paddingGroup.add(paddingInner);
window.add(page);
this._settings.bind("float", animationEnabled, "active", Gio.SettingsBindFlags.DEFAULT);
this._settings.bind("padding-inner", paddingInner, "value", Gio.SettingsBindFlags.DEFAULT);
}
}