Created
May 24, 2018 06:47
-
-
Save tesfabpel/fa1cff523ee0aae1464a6870bfeb1745 to your computer and use it in GitHub Desktop.
plasmashell lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk | |
from gi.repository import GLib | |
i=0 | |
def func(obj): | |
global i | |
win.set_title("i: %d" % i) | |
i+=1 | |
return GLib.SOURCE_CONTINUE | |
win = Gtk.Window() | |
win.connect("destroy", Gtk.main_quit) | |
win.show_all() | |
#GLib.timeout_add(10, func, None) # this locks | |
GLib.timeout_add(500, func, None) # this doesn't | |
Gtk.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment