CLEANUP: removed preferences -> not needed
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,4 +1,2 @@
|
|||||||
**node_modules
|
**node_modules
|
||||||
package-lock.json
|
package-lock.json
|
||||||
floatbar.zip
|
|
||||||
**.compiled
|
|
||||||
10
dist/metadata.json
vendored
10
dist/metadata.json
vendored
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "float bar",
|
|
||||||
"description": "Adaptive floating topbar",
|
|
||||||
"uuid": "floatbar@tomtroeger.de",
|
|
||||||
"settings-schema": "org.gnome.shell.extensions.my-extension",
|
|
||||||
"shell-version": [
|
|
||||||
"46"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
42
dist/prefs.js
vendored
42
dist/prefs.js
vendored
@@ -1,42 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<schemalist>
|
|
||||||
<schema id="org.gnome.shell.extensions.my-extension" path="/org/gnome/shell/extensions/my-extension/">
|
|
||||||
<key name="padding-inner" type="i">
|
|
||||||
<default>8</default>
|
|
||||||
<summary>Inner padding</summary>
|
|
||||||
<description>Padding between windows</description>
|
|
||||||
</key>
|
|
||||||
<key name="float" type="b">
|
|
||||||
<default>true</default>
|
|
||||||
<summary>Floating</summary>
|
|
||||||
<description>Whether the topbar floats or not</description>
|
|
||||||
</key>
|
|
||||||
</schema>
|
|
||||||
</schemalist>
|
|
||||||
9
dist/stylesheet.css
vendored
9
dist/stylesheet.css
vendored
@@ -1,9 +0,0 @@
|
|||||||
#panel.floating {
|
|
||||||
margin: 3px;
|
|
||||||
border-radius: 9999px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#panel.solid {
|
|
||||||
margin: 0;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
51
prefs.ts
51
prefs.ts
@@ -1,51 +0,0 @@
|
|||||||
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?: Gio.Settings;
|
|
||||||
|
|
||||||
fillPreferencesWindow(window: Adw.PreferencesWindow) {
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<schemalist>
|
|
||||||
<schema id="org.gnome.shell.extensions.my-extension" path="/org/gnome/shell/extensions/my-extension/">
|
|
||||||
<key name="padding-inner" type="i">
|
|
||||||
<default>8</default>
|
|
||||||
<summary>Inner padding</summary>
|
|
||||||
<description>Padding between windows</description>
|
|
||||||
</key>
|
|
||||||
<key name="float" type="b">
|
|
||||||
<default>true</default>
|
|
||||||
<summary>Floating</summary>
|
|
||||||
<description>Whether the topbar floats or not</description>
|
|
||||||
</key>
|
|
||||||
</schema>
|
|
||||||
</schemalist>
|
|
||||||
@@ -15,6 +15,5 @@
|
|||||||
],
|
],
|
||||||
"files": [
|
"files": [
|
||||||
"extension.ts",
|
"extension.ts",
|
||||||
"prefs.ts"
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user