Skip to content

Instantly share code, notes, and snippets.

@lexruee
Created July 16, 2017 17:33
Show Gist options
  • Save lexruee/b73c52d0174f315395dfbdde07e9808d to your computer and use it in GitHub Desktop.
Save lexruee/b73c52d0174f315395dfbdde07e9808d to your computer and use it in GitHub Desktop.
disable suspend button feature
let disableSuspendButtonFrame = new AM.FrameBox();
let disableSuspendButtonRow = new AM.FrameBoxRow();
let disableSuspendButtonLabel = new Gtk.Label({
label: _("Disable activities hot corner"),
use_markup: true,
xalign: 0,
hexpand: true
});
let disableSuspendButtonSwitch = new Gtk.Switch({ halign: Gtk.Align.END });
disableSuspendButtonSwitch.set_active(this.settings.get_boolean('disable-suspend-button'));
disableSuspendButtonSwitch.connect('notify::active', Lang.bind(this, function(check) {
this.settings.set_boolean('disable-suspend-button', check.get_active());
}));
disableSuspendButtonRow.add(disableSuspendButtonLabel);
disableSuspendButtonRow.add(disableSuspendButtonSwitch);
disableSuspendButtonFrame.add(disableSuspendButtonSwitch);
<key type="b" name="disable-suspend-button">
<default>false</default>
<summary>Disable suspend button</summary>
<description>Disable suspend button.</description>
</key>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment