diff --git a/plugins/wm_tweaks.py b/plugins/wm_tweaks.py new file mode 100644 index 00000000..43d178fb --- /dev/null +++ b/plugins/wm_tweaks.py @@ -0,0 +1,30 @@ +# Bryan Schumaker (10/30/2010) + +import ocarina +libsaria = ocarina.libsaria +lib_find_id = libsaria.collection.lib_find_id +lib_get_attr = libsaria.collection.lib_get_attr +invite = libsaria.event.invite + +def reset(*args): + ocarina.set_window_icon("images/ocarina.png") + ocarina.set_window_title(ocarina.__vers__) + +def tweak_icon(file): + if file != None: + ocarina.set_window_icon(file) + +def tweak_title(filepath): + if filepath != None: + id = lib_find_id(filepath) + title = lib_get_attr(id, "title") + ocarina.set_window_title(title) + +def start(): + invite("PRELOAD", reset) + invite("POSTLOAD", tweak_title) + invite("POSTGETART", tweak_icon) + + +def stop(): + pass