mintterm 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mintterm/__init__.py +3 -0
- mintterm/__main__.py +38 -0
- mintterm/app.py +765 -0
- mintterm/assets/icon.svg +12 -0
- mintterm/assets/logo.svg +15 -0
- mintterm/branding.py +21 -0
- mintterm/clipboard.py +22 -0
- mintterm/helper.py +132 -0
- mintterm/prompt.py +64 -0
- mintterm/render.py +23 -0
- mintterm/runner.py +106 -0
- mintterm/safety.py +97 -0
- mintterm/storage.py +82 -0
- mintterm/themes.py +34 -0
- mintterm/trash.py +68 -0
- mintterm/views.py +412 -0
- mintterm-0.2.0.dist-info/METADATA +168 -0
- mintterm-0.2.0.dist-info/RECORD +22 -0
- mintterm-0.2.0.dist-info/WHEEL +5 -0
- mintterm-0.2.0.dist-info/entry_points.txt +2 -0
- mintterm-0.2.0.dist-info/licenses/LICENSE +21 -0
- mintterm-0.2.0.dist-info/top_level.txt +1 -0
mintterm/__init__.py
ADDED
mintterm/__main__.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Command-line entry point: `mintterm [--theme NAME] [--version]`."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
from . import __version__
|
|
7
|
+
from . import storage
|
|
8
|
+
from .themes import THEMES
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def main(argv=None):
|
|
12
|
+
argv = sys.argv[1:] if argv is None else argv
|
|
13
|
+
|
|
14
|
+
if "--version" in argv:
|
|
15
|
+
print(f"mintterm {__version__}")
|
|
16
|
+
return 0
|
|
17
|
+
if "--help" in argv or "-h" in argv:
|
|
18
|
+
print("usage: mintterm [--theme NAME] [--version]")
|
|
19
|
+
print("themes: " + ", ".join(THEMES))
|
|
20
|
+
print("settings are saved in " + storage.CONFIG_FILE + " (or use the set command inside mintterm)")
|
|
21
|
+
return 0
|
|
22
|
+
|
|
23
|
+
cfg = storage.load_config()
|
|
24
|
+
if "--theme" in argv:
|
|
25
|
+
i = argv.index("--theme")
|
|
26
|
+
if i + 1 < len(argv) and argv[i + 1] in THEMES:
|
|
27
|
+
cfg["theme"] = argv[i + 1] # for this run only; not saved
|
|
28
|
+
|
|
29
|
+
# Hide pygame's startup banner, and import pygame only when the window opens.
|
|
30
|
+
os.environ.setdefault("PYGAME_HIDE_SUPPORT_PROMPT", "1")
|
|
31
|
+
from .app import App
|
|
32
|
+
|
|
33
|
+
App(cfg).run()
|
|
34
|
+
return 0
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
if __name__ == "__main__":
|
|
38
|
+
raise SystemExit(main())
|