aboutsummaryrefslogtreecommitdiff
path: root/src/themedetector.c
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-09-20 11:13:53 -0400
committerB Stack <bgstack15@gmail.com>2020-09-20 11:13:53 -0400
commitfc36604e4522ab7b2cb8309e8727e6664a92dc92 (patch)
tree253150c367ba39724a7d91b04fe3aa94539b71c3 /src/themedetector.c
downloadthemedetector-fc36604e4522ab7b2cb8309e8727e6664a92dc92.tar.gz
themedetector-fc36604e4522ab7b2cb8309e8727e6664a92dc92.tar.bz2
themedetector-fc36604e4522ab7b2cb8309e8727e6664a92dc92.zip
initial commitHEADmaster
Diffstat (limited to 'src/themedetector.c')
-rw-r--r--src/themedetector.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/themedetector.c b/src/themedetector.c
new file mode 100644
index 0000000..04a1aba
--- /dev/null
+++ b/src/themedetector.c
@@ -0,0 +1,9 @@
+// https://stackoverflow.com/questions/54365212/gtk2-vs-gtk3-detect-gtk3-theme-in-bash-script/54384946#54384946
+#include <stdio.h>
+#include <gtk/gtk.h>
+int main() {
+ gchar *prop;
+ gtk_init(0, 0);
+ g_object_get(gtk_settings_get_default(), "gtk-theme-name", &prop, 0);
+ return !printf("%s\n", prop);
+}
bgstack15