-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
7edcdb3
commit 7810b7c
Showing
7 changed files
with
108 additions
and
103 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 |
---|---|---|
|
@@ -6,3 +6,4 @@ settings.json | |
*.zip | ||
bin/ | ||
tmp/ | ||
*.log |
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
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,7 @@ | ||
|
||
#!/bin/sh -e | ||
|
||
export G_MESSAGES_DEBUG=all | ||
export MUTTER_DEBUG_DUMMY_MODE_SPECS=1366x768 | ||
export SHELL_DEBUG=backtrace-segfaults | ||
dbus-run-session -- gnome-shell --nested --wayland > nested.log |
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 |
---|---|---|
@@ -1,70 +1,63 @@ | ||
'use strict'; | ||
|
||
const {Adw, Gio, Gtk} = imports.gi; | ||
|
||
const ExtensionUtils = imports.misc.extensionUtils; | ||
const Me = ExtensionUtils.getCurrentExtension(); | ||
|
||
|
||
/** | ||
* | ||
*/ | ||
function init() { | ||
} | ||
|
||
/** | ||
* | ||
* @param window | ||
*/ | ||
function fillPreferencesWindow(window) { | ||
// Use the same GSettings schema as in `extension.js` | ||
const settings = ExtensionUtils.getSettings( | ||
'org.gnome.shell.extensions.colortint'); | ||
|
||
import Gio from "gi://Gio"; | ||
import Adw from "gi://Adw"; | ||
import Gtk from "gi://Gtk"; | ||
|
||
import { | ||
ExtensionPreferences, | ||
gettext as _, | ||
} from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js"; | ||
|
||
export default class ColorTintPreferences extends ExtensionPreferences { | ||
fillPreferencesWindow(window) { | ||
window._settings = this.getSettings("org.gnome.shell.extensions.colortint"); | ||
// Create a preferences page and group | ||
const page = new Adw.PreferencesPage(); | ||
const group = new Adw.PreferencesGroup(); | ||
page.add(group); | ||
|
||
// Create a new preferences row | ||
const row = new Adw.ActionRow({title: 'Overlay active on start'}); | ||
const row = new Adw.ActionRow({ title: "Overlay active on start" }); | ||
group.add(row); | ||
|
||
// Create the switch and bind its value to the `autostart` key | ||
const toggle = new Gtk.Switch({ | ||
active: settings.get_boolean('autostart'), | ||
valign: Gtk.Align.CENTER, | ||
active: window._settings.get_boolean("autostart"), | ||
valign: Gtk.Align.CENTER, | ||
}); | ||
settings.bind( | ||
'autostart', | ||
toggle, | ||
'active', | ||
Gio.SettingsBindFlags.DEFAULT | ||
window._settings.bind( | ||
"autostart", | ||
toggle, | ||
"active", | ||
Gio.SettingsBindFlags.DEFAULT | ||
); | ||
|
||
// Add the switch to the row | ||
row.add_suffix(toggle); | ||
row.activatable_widget = toggle; | ||
|
||
// Create a new preferences row | ||
const row2 = new Adw.ActionRow({title: 'Use monochrome system tray icon', subtitle: 'Changes take effect on restart of extension'}); | ||
const row2 = new Adw.ActionRow({ | ||
title: "Use monochrome system tray icon", | ||
subtitle: "Changes take effect on restart of extension", | ||
}); | ||
group.add(row2); | ||
|
||
// Create the switch and bind its value to the `monochrome` key | ||
const toggle2 = new Gtk.Switch({ | ||
active: settings.get_boolean('monochrome-icon'), | ||
valign: Gtk.Align.CENTER, | ||
active: window._settings.get_boolean("monochrome-icon"), | ||
valign: Gtk.Align.CENTER, | ||
}); | ||
settings.bind( | ||
'monochrome-icon', | ||
toggle2, | ||
'active', | ||
Gio.SettingsBindFlags.DEFAULT | ||
window._settings.bind( | ||
"monochrome-icon", | ||
toggle2, | ||
"active", | ||
Gio.SettingsBindFlags.DEFAULT | ||
); | ||
|
||
// Add the switch to the row | ||
row2.add_suffix(toggle2); | ||
row2.activatable_widget = toggle2; | ||
// Add our page to the window | ||
window.add(page); | ||
} | ||
} |