Skip to content

Instantly share code, notes, and snippets.

@itzexor
itzexor / applet.js
Created February 22, 2019 00:59
muffin-debug@cobinja.de
const Applet = imports.ui.applet;
const PopupMenu = imports.ui.popupMenu;
const Meta = imports.gi.Meta;
const TOPICS = [
[Meta.DebugTopic.VERBOSE, "Verbose"],
[Meta.DebugTopic.COMPOSITOR, "Compositor"],
[Meta.DebugTopic.EDGE_RESISTANCE, "Edge Resistance"],
[Meta.DebugTopic.ERRORS, "Errors"],
_pkgname=cjs
pkgname=${_pkgname}-g
pkgver=r2301.b52a8550
pkgrel=1
pkgdesc="Javascript Bindings for Cinnamon"
arch=(i686 x86_64)
url="https://github.com/linuxmint/cjs"
license=(GPL)
depends=(gtk3 gobject-introspection-runtime js52 dbus-glib)
makedepends=(autoconf-archive gobject-introspection)
@itzexor
itzexor / gist:edeb5126290fa2462220010ebb5e2a28
Created March 31, 2018 04:17
GtkShortcutsLabel alternative for use outside of a GtkShortcutsWindow
class ShortcutDisplay(Gtk.Box):
def __init__(self, accel_string):
Gtk.Box.__init__(self, Gtk.Orientation.HORIZONTAL, 2)
def get_label(text, style_class=None):
label = Gtk.Label(text)
if style_class is not None:
label.get_style_context().add_class(style_class)
return label
@itzexor
itzexor / metadata.json
Last active September 5, 2017 00:38
open windows search provider
{
"description": "Searches open windows",
"uuid": "open-windows@exor",
"name": "Open Windows Search Provider"
}
@itzexor
itzexor / applet.js
Last active August 8, 2017 19:55
cinnamonitor
const Lang = imports.lang;
const Signals = imports.signals;
const Applet = imports.ui.applet;
const Mainloop = imports.mainloop;
const Main = imports.ui.main;
const Tooltips = imports.ui.tooltips;
const Clutter = imports.gi.Clutter;
const GTop = imports.gi.GTop;
const Cinnamon = imports.gi.Cinnamon;
const St = imports.gi.St;
/**
* FILE:cinnamonShortcutsDialog.js
* @short_description: A dialog that shows common cinnamon shortcuts.
*
* Shows a dialog with the current common shortcuts.
*/
const Lang = imports.lang;
const Gio = imports.gi.Gio;
const St = imports.gi.St;
const Cinnamon = imports.gi.Cinnamon;
/**
* isError:
* @obj (Object): the object to be tested
*
* Tests whether @obj is an error object. If the object
* is a GLib.Error then we add a stack trace to it.
*
* Returns (boolean): whether @obj is an error object
*/
function isError(obj) {
===== startup =======
Cjs-Message: JS WARNING: [/home/exor/.local/share/cinnamon/applets/cinnamem@exor/applet.js 90]: reference to undefined property this.maxMem
Cjs-Message: JS WARNING: [/usr/share/cinnamon/applets/trash@cinnamon.org/applet.js 37]: Too many arguments to method Gio.File.monitor_directory: expected 2, got 3
Cjs-Message: JS WARNING: [resource:///org/cinnamon/cjs/modules/tweener/tweener.js 545]: reference to undefined property properties[istr].arrayIndex
Cjs-Message: JS WARNING: [/usr/share/cinnamon/applets/trash@cinnamon.org/applet.js 80]: Too many arguments to method Gio.FileEnumerator.next_file: expected 1, got 2
Cjs-Message: JS WARNING: [/usr/share/cinnamon/js/ui/panel.js 2393]: reference to undefined property this._focusWindow
===== trash applet -> empty trash =======
@itzexor
itzexor / applet.js
Created March 1, 2017 20:22
power-switcher@exor
const Applet = imports.ui.applet;
const Lang = imports.lang;
const Util = imports.misc.util;
function MyApplet(orientation, panel_height, instance_id) {
this._init(orientation, panel_height, instance_id);
}
MyApplet.prototype = {
__proto__: Applet.IconApplet.prototype,