| Server IP : 93.86.61.54 / Your IP : 216.73.216.104 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /bin/ |
Upload File : |
#!/usr/bin/python3
""" Preview a Cinnamon gtk theme in a small window
Usage: cinnamon-preview-gtk-theme theme-name
"""
import sys
from setproctitle import setproctitle
import gi
gi.require_version("Gtk", "3.0") # noqa
from gi.repository import Gtk
if __name__ == '__main__':
setproctitle("cinnamon-preview-gtk-theme")
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
if len(sys.argv) != 2:
print("Usage: cinnamon-preview-gtk-theme theme-name")
exit(1)
else:
theme_name = sys.argv[1]
settings = Gtk.Settings.get_default()
settings.set_string_property("gtk-theme-name", theme_name, "gtkrc:0")
window = Gtk.Window()
vbox = Gtk.VBox()
hbox = Gtk.HBox()
button = Gtk.Button()
check = Gtk.CheckButton()
check.set_active(True)
radio = Gtk.RadioButton()
hbox.pack_start(button, False, False, 2)
button.set_label("Button")
hbox.pack_start(check, False, False, 2)
hbox.pack_start(radio, False, False, 2)
vbox.pack_start(hbox, False, False, 2)
window.add(vbox)
window.set_default_size(320, 200)
window.set_decorated(False)
window.show_all()
window.connect("destroy", Gtk.main_quit)
Gtk.main()