Skip to content

Instantly share code, notes, and snippets.

View yilozt's full-sized avatar
🐢

Yi yilozt

🐢
View GitHub Profile
@yilozt
yilozt / shell_object_sample.js
Created July 4, 2022 02:22 — forked from buzztaiki/shell_object_sample.js
Using shell object in gjs
// 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 (;;) {