forked from mamolinux/theme-manager
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate_desktop_files
executable file
·55 lines (43 loc) · 1.61 KB
/
generate_desktop_files
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
48
49
50
51
52
53
54
55
#!/usr/bin/python3
DOMAIN = "theme-manager"
PATH = "/usr/share/locale"
import os
import gettext
import additionalfiles
os.environ['LANGUAGE'] = "en_US.UTF-8"
gettext.install(DOMAIN, PATH)
# desktop file for generic
prefix = "[Desktop Entry]\n"
suffix = """Exec=theme-manager
Icon=theme-manager
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Application;Utility;
StartupNotify=true
NotShowIn=KDE;
"""
additionalfiles.generate(DOMAIN, PATH, "usr/share/applications/theme-manager.desktop", prefix, _("Theme Manager"), _("Very simple Python3-based GUI application to randomly choose and set different theme variants on linux."), suffix)
# desktop file for KDE
prefix = "[Desktop Entry]\n"
suffix = """Exec=theme-manager
Icon=theme-manager
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Application;Utility;
X-KDE-StartupNotify=true
OnlyShowIn=KDE;
"""
additionalfiles.generate(DOMAIN, PATH, "usr/share/applications/kde4/theme-manager.desktop", prefix, _("Theme Manager"), _("Very simple Python3-based GUI application to randomly choose and set different theme variants on linux."), suffix, genericName=_("Theme Manager"))
# desktop file for continuous running from startup
prefix = "[Desktop Entry]\n"
suffix = """Exec=theme-manager --indicator
Icon=theme-manager
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Application;Utility;
StartupNotify=true
"""
additionalfiles.generate(DOMAIN, PATH, "etc/xdg/autostart/theme-manager-autostart.desktop", prefix, _("Theme Manager Indicator"), _("Very simple Python3-based GUI application to randomly choose and set different theme variants on linux."), suffix)