Skip to content

Instantly share code, notes, and snippets.

@DevSrSouza
DevSrSouza / get-theme.main.kts
Created February 2, 2022 04:40
Kotlin Script that get Linux System Theme based on Dbus appearance color-schema from Gnome 42, KDE and Elementary
@file:DependsOn("com.github.hypfvieh:dbus-java-core:4.0.0")
@file:DependsOn("com.github.hypfvieh:dbus-java-transport-jnr-unixsocket:4.0.0")
@file:DependsOn("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.0")
import org.freedesktop.dbus.annotations.DBusInterfaceName
import org.freedesktop.dbus.connections.impl.DBusConnection
import org.freedesktop.dbus.interfaces.DBusInterface
import org.freedesktop.dbus.types.Variant
val connection = DBusConnection.getConnection(DBusConnection.DBusBusType.SESSION)
@mosabua
mosabua / gist:1316903
Created October 26, 2011 16:28
ExpandableListFragment
package android.support.v4.app;
import android.os.Bundle;
import android.os.Handler;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnCreateContextMenuListener;