This file contains hidden or 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
// LD_LIBRARY_PATH=/usr/lib64/gnome-shell/ gjs shell_object_sample.js | |
const GIRepository = imports.gi.GIRepository; | |
const GLib = imports.gi.GLib; | |
const Gio = imports.gi.Gio; | |
function findLib(path, prefix) { | |
const libdir = Gio.File.new_for_path(path); | |
const files = libdir.enumerate_children('', Gio.FileQueryInfoFlags.NONE, null); | |
for (;;) { |
This file contains hidden or 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
const GLib = imports.gi.GLib | |
const Gio = imports.gi.Gio | |
const loop = new GLib.MainLoop (null, false) | |
const home = GLib.get_home_dir () | |
const file = Gio.File.new_for_path (home + '/a/b') | |
const monitor = file.monitor (Gio.FileMonitorFlags.WATCH_MOVES, null) | |
monitor.connect ('changed', (monitor, file, otherFile, eventType) => { |