-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
110 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
{ | ||
"eslint.experimental.useFlatConfig": true | ||
"eslint.experimental.useFlatConfig": true, | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true, | ||
"**/Thumbs.db": true, | ||
"**/node_modules": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
schemas/org.gnome.shell.extensions.vscode-search-provider.gschema.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<schemalist> | ||
<schema id="org.gnome.shell.extensions.vscode-search-provider" path="/org/gnome/shell/extensions/vscode-search-provider/"> | ||
<key name="suffix" type="b"> | ||
<default>true</default> | ||
<summary>Boolean, whether to show a suffix next to the workspace name. (Remote, Codespaces...)</summary> | ||
</key> | ||
</schema> | ||
</schemalist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import Gio from "gi://Gio"; | ||
import Adw from "gi://Adw"; | ||
|
||
import { | ||
ExtensionPreferences, | ||
gettext as _, | ||
} from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js"; | ||
|
||
type Window = Adw.PreferencesWindow & { | ||
_settings: Gio.Settings | null; | ||
}; | ||
|
||
export default class ExamplePreferences extends ExtensionPreferences { | ||
_settings: Gio.Settings | null = null; | ||
|
||
fillPreferencesWindow(window: Window) { | ||
// Create a preferences page, with a single group | ||
const page = new Adw.PreferencesPage({ | ||
title: _("General"), | ||
icon_name: "dialog-information-symbolic", | ||
}); | ||
window.add(page); | ||
|
||
const group = new Adw.PreferencesGroup({ | ||
title: _("Appearance"), | ||
description: _("Configure the appearance of the extension"), | ||
}); | ||
|
||
page.add(group); | ||
|
||
// Create a new preferences row | ||
const row = new Adw.SwitchRow({ | ||
title: _("Show Suffix"), | ||
subtitle: _( | ||
"Whether to show a suffix next to the workspace name. (Remote, Codespaces...)", | ||
), | ||
}); | ||
group.add(row); | ||
|
||
// Create a settings object and bind the row to the `show-indicator` key | ||
window._settings = this.getSettings(); | ||
window._settings.bind( | ||
"suffix", | ||
row, | ||
"active", | ||
Gio.SettingsBindFlags.DEFAULT, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters