diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-07-24 21:48:57 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-07-24 21:48:57 +1000 |
| commit | b3fe4d47ae12fba7e43bf849a1d9e13703bf7581 (patch) | |
| tree | b6ea79f79395e439925ab68e0f200caaf795b9fc /pywal/scripts | |
| parent | 0ec21b4ad22a0ef62409dd8a02d4cd704a1927ea (diff) | |
gtk: Added script to reload GTK themes.
Diffstat (limited to 'pywal/scripts')
| -rw-r--r-- | pywal/scripts/gtk_reload.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pywal/scripts/gtk_reload.py b/pywal/scripts/gtk_reload.py new file mode 100644 index 0000000..1377929 --- /dev/null +++ b/pywal/scripts/gtk_reload.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python2 +""" +Small Python 2 script to reload GTK2 themes. + +This uses Python2 since this requires 'send_clientmessage_toall()' +which isn't available in Python 3. +""" +import gtk + + +def gtk_reload(): + """Reload GTK2 themes.""" + events = gtk.gdk.Event(gtk.gdk.CLIENT_EVENT) + data = gtk.gdk.atom_intern("_GTK_READ_RCFILES", False) + events.data_format = 8 + events.send_event = True + events.message_type = data + events.send_clientmessage_toall() + + +gtk_reload() |
