Skip to content

Instantly share code, notes, and snippets.

@tesfabpel
Created May 24, 2018 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tesfabpel/fa1cff523ee0aae1464a6870bfeb1745 to your computer and use it in GitHub Desktop.
Save tesfabpel/fa1cff523ee0aae1464a6870bfeb1745 to your computer and use it in GitHub Desktop.
plasmashell lock
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