Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/python
- import gi
- import subprocess
- gi.require_version("Gtk", "3.0")
- from gi.repository import Gtk, GLib
- class EntryWindow(Gtk.Window):
- def __init__(self):
- Gtk.Window.__init__(self, title="Notejot Input")
- self.set_size_request(300, 100)
- self.set_decorated(False)
- self.timeout_id = None
- vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=3)
- self.add(vbox)
- self.entry = Gtk.Entry()
- self.entry.set_placeholder_text("Add to 'Notejot'...")
- vbox.pack_start(self.entry, True, True, 0)
- self.set_focus(self.entry)
- def f(text,ddd):
- #return subprocess.run("~/Scripts/notejot-add.sh "+str(text),shell=True)
- return subprocess.run("echo hmm",shell=True)
- win = EntryWindow()
- x = str(win.entry.get_text())
- win.entry.connect('activate', f, str(win.entry.get_text()))
- win.connect("destroy", Gtk.main_quit)
- win.show_all()
- Gtk.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement