/usr/bin/cinnamon-preview-gtk-theme is in cinnamon 3.2.7-4.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #!/usr/bin/python3
""" Preview a Cinnamon gtk theme in a small window
Usage: cinnamon-preview-gtk-theme theme-name
"""
import sys
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
if __name__ == '__main__':
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()
|