diff options
| author | Dylan Araps <dylanaraps@users.noreply.github.com> | 2017-07-24 22:29:11 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-24 22:29:11 +1000 |
| commit | 7f2bc603c3944707a07f856f98bc29dfe45d6d9b (patch) | |
| tree | c8a2f1dd67b8b82b0fba7c714aa1fb0e2a05b997 /pywal/scripts | |
| parent | ed49a5c793b47e8b8e701a06a4372770babb950d (diff) | |
| parent | 4fecce6e9c326970a73f8f3a599be8a02aeea381 (diff) | |
Merge pull request #57 from dylanaraps/gtk2
general: Added GTK2 support.
Diffstat (limited to 'pywal/scripts')
| -rw-r--r-- | pywal/scripts/gtk_reload.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/pywal/scripts/gtk_reload.py b/pywal/scripts/gtk_reload.py new file mode 100644 index 0000000..4de7ca3 --- /dev/null +++ b/pywal/scripts/gtk_reload.py @@ -0,0 +1,23 @@ +#!/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. + +Original source: https://crunchbang.org/forums/viewtopic.php?id=39646 +""" +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() |
