forked from kozec/syncthing-gtk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsyncthing-gtk.py
executable file
·32 lines (27 loc) · 1.03 KB
/
syncthing-gtk.py
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
#!/usr/bin/env python2
import os, sys, signal
def sigint(*a):
print("\n*break*")
sys.exit(0)
if __name__ == "__main__":
signal.signal(signal.SIGINT, sigint)
from syncthing_gtk.tools import init_logging, init_locale, IS_WINDOWS
if IS_WINDOWS:
from syncthing_gtk import windows
windows.enable_localization()
init_logging()
init_locale("locale/")
if IS_WINDOWS:
from syncthing_gtk import windows, Configuration
config = Configuration()
if config["force_dark_theme"]:
os.environ["GTK_THEME"] = "Adwaita:dark"
windows.fix_localized_system_error_messages()
windows.override_menu_borders()
from gi.repository import Gtk
Gtk.IconTheme.get_default().prepend_search_path(os.path.abspath(os.path.join(os.getcwd(), "icons", "32x32", "apps")))
Gtk.IconTheme.get_default().prepend_search_path(os.path.abspath(os.path.join(os.getcwd(), "icons")))
from gi.repository import Gtk
Gtk.IconTheme.get_default().append_search_path(os.path.join(os.getcwd(), "icons"))
from syncthing_gtk import App
App(".", "./icons").run(sys.argv)