mintterm 0.2.0__tar.gz

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-0.2.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Your Name
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,168 @@
1
+ Metadata-Version: 2.4
2
+ Name: mintterm
3
+ Version: 0.2.0
4
+ Summary: A block-based terminal for Linux, built with pygame. Real bash, with safer and clearer output.
5
+ Author: Your Name
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/YOUR-USER/mintterm
8
+ Project-URL: Issues, https://github.com/YOUR-USER/mintterm/issues
9
+ Keywords: terminal,linux,ubuntu,linux-mint,pygame,shell
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Operating System :: POSIX :: Linux
15
+ Classifier: Environment :: X11 Applications
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Topic :: System :: Shells
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: pygame>=2.5
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest>=7; extra == "dev"
24
+ Requires-Dist: build>=1; extra == "dev"
25
+ Requires-Dist: twine>=5; extra == "dev"
26
+ Dynamic: license-file
27
+
28
+ <p align="center">
29
+ <img src="src/mintterm/assets/logo.svg" alt="mintterm" width="420">
30
+ </p>
31
+
32
+ # mintterm
33
+
34
+ A block-based terminal for Linux, built with pygame. It runs real bash underneath, so every command you know keeps working. Each command and its output become a card, common commands show tables and bars instead of walls of text, and risky commands ask before they touch your files.
35
+
36
+ ## Install
37
+
38
+ Linux Mint and Ubuntu:
39
+
40
+ ```bash
41
+ pip install mintterm
42
+ mintterm
43
+ ```
44
+
45
+ Windows 11, through WSL:
46
+
47
+ ```powershell
48
+ wsl --install
49
+ ```
50
+
51
+ Open Ubuntu from the Start menu, then run `pip install mintterm` and `mintterm`. Windows 11 shows the window through WSLg with no extra setup. Windows 10 needs an X server such as VcXsrv and is not supported in v0.2.
52
+
53
+ ## Commands that look different
54
+
55
+ These run as real commands. mintterm adds flags behind the scenes so the output can be parsed, and you see the output as a table or bars.
56
+
57
+ | You type | You get |
58
+ | --- | --- |
59
+ | `ls`, `ls ~/Downloads` | Table with size, date, permissions, owner. ▸ folders, * programs, → links |
60
+ | `ls --raw` | Plain `ls` output |
61
+ | `df` | Drives with usage bars. Bars turn red above 85% |
62
+ | `du`, `du ~` | Biggest folders first, with a share bar |
63
+ | `ps` | Top 25 processes by CPU, with bars |
64
+ | `free` | RAM and swap bars |
65
+ | `ip` | Network interfaces with state and addresses |
66
+ | `ss` | Listening ports with the program that owns each one |
67
+ | `git status` | Branch, sync state, and a table of changes |
68
+ | `git log` | Last 20 commits as a table |
69
+ | `grep pattern file` | Matches as a table with file and line |
70
+ | `find ...` | Results as a table, folders highlighted |
71
+ | `apt list --upgradable` | Packages with new versions |
72
+ | `systemctl --failed` | Failed services in red |
73
+ | `cat file` | Numbered lines |
74
+
75
+ Everything else runs exactly as typed, with its output in a card. Cards work for every command: fold, pin, copy, and exit codes.
76
+
77
+ ## Built-in features
78
+
79
+ - **Trash and undo.** `rm` moves files into the mintterm trash instead of deleting them. `undo` brings them back. `mv` is recorded too. `rm --really` deletes permanently.
80
+ - **Safety preview.** `rm -rf`, `sudo rm`, `dd`, `mkfs`, and `chmod -R` list what would change and wait for `y`.
81
+ - **`?` helper.** `? find big files`, `? update my system`, or `? explain tar`. It suggests commands but never runs them.
82
+ - **Tab completion.** Completes file and folder names, and lists options when several match.
83
+ - **History search.** Ctrl+R, type part of an old command, press Enter.
84
+ - **Cards.** Click a prompt line to fold a card. Ctrl+P pins a card to the top. Ctrl+Shift+C copies its output (needs `xclip` or `wl-copy`).
85
+ - **Background commands.** The window stays responsive while a command runs. Ctrl+C stops it.
86
+ - **Notifications.** If a command takes longer than 10 seconds and the window is in the background, you get a desktop notification (uses `notify-send`, included in Mint).
87
+ - **Prompt segments and profiles.** Show or hide time, user, host, folder, git branch, Python venv, and exit code. Server profile shows a red prompt so production never looks like your sandbox.
88
+
89
+ ## Keys
90
+
91
+ | Key | Action |
92
+ | --- | --- |
93
+ | Enter | Run the command |
94
+ | Up / Down | Command history, or move through search results |
95
+ | Tab | Complete a file or folder name |
96
+ | Ctrl+R | Search history |
97
+ | Ctrl+P | Pin or unpin the selected card |
98
+ | Ctrl+Shift+C | Copy the selected card's output |
99
+ | Ctrl+L or `clear` | Clear the screen |
100
+ | Ctrl+U | Clear the input line |
101
+ | Ctrl+T | Switch to the next theme |
102
+ | Ctrl+C | Stop a running command, or cancel a confirmation |
103
+ | Mouse wheel | Scroll |
104
+ | Esc | Quit (or leave search) |
105
+
106
+ ## Settings
107
+
108
+ Type these inside mintterm. Settings save to `~/.config/mintterm/config.json`.
109
+
110
+ ```text
111
+ set theme sunset mint-dark, mint-light, sunset
112
+ set profile Server Dev, Server, Minimal
113
+ set font 18 10 to 28
114
+ set segments user,host,path time, user, host, path, git, venv, exit
115
+ set notify 10 seconds before a desktop alert (0 = always)
116
+ set show current settings
117
+ ```
118
+
119
+ Command-line options: `mintterm --theme mint-light` (for this run only), `mintterm --version`, `mintterm --help`.
120
+
121
+ ## Limitations in v0.2
122
+
123
+ - Full-screen programs (`vim`, `nano`, `top`, `htop`) do not run inside mintterm. Use `ps` and `free` for the same information.
124
+ - `sudo` asks for a password in the terminal that launched mintterm, not in the window. Run `sudo -v` in your normal terminal first, then `sudo` commands in mintterm work for about 15 minutes.
125
+ - Output appears when a command finishes, not line by line.
126
+ - Only the commands listed above get tables. Others are shown as plain output in cards.
127
+ - Plugins, an SSH manager, widgets and session sharing are planned for later versions.
128
+
129
+ ## Development
130
+
131
+ ```bash
132
+ python3 -m venv .venv
133
+ source .venv/bin/activate
134
+ pip install -e ".[dev]"
135
+ pytest
136
+ ```
137
+
138
+ The parsers, safety checks, trash, and helper have no pygame dependency and are fully tested. The window code is tested by running it against a display.
139
+
140
+ ## Publishing to PyPI
141
+
142
+ 1. Create an account at pypi.org and an API token under Account settings.
143
+ 2. Update `authors` and the URLs in `pyproject.toml`, and bump `version` for each release.
144
+ 3. Build and check:
145
+
146
+ ```bash
147
+ python -m build
148
+ twine check dist/*
149
+ ```
150
+
151
+ 4. Test on TestPyPI first:
152
+
153
+ ```bash
154
+ twine upload --repository testpypi dist/*
155
+ pip install -i https://test.pypi.org/simple/ mintterm
156
+ ```
157
+
158
+ 5. Upload to the real index:
159
+
160
+ ```bash
161
+ twine upload dist/*
162
+ ```
163
+
164
+ Username: `__token__`. Password: your `pypi-...` token.
165
+
166
+ ## License
167
+
168
+ MIT. See LICENSE.
@@ -0,0 +1,141 @@
1
+ <p align="center">
2
+ <img src="src/mintterm/assets/logo.svg" alt="mintterm" width="420">
3
+ </p>
4
+
5
+ # mintterm
6
+
7
+ A block-based terminal for Linux, built with pygame. It runs real bash underneath, so every command you know keeps working. Each command and its output become a card, common commands show tables and bars instead of walls of text, and risky commands ask before they touch your files.
8
+
9
+ ## Install
10
+
11
+ Linux Mint and Ubuntu:
12
+
13
+ ```bash
14
+ pip install mintterm
15
+ mintterm
16
+ ```
17
+
18
+ Windows 11, through WSL:
19
+
20
+ ```powershell
21
+ wsl --install
22
+ ```
23
+
24
+ Open Ubuntu from the Start menu, then run `pip install mintterm` and `mintterm`. Windows 11 shows the window through WSLg with no extra setup. Windows 10 needs an X server such as VcXsrv and is not supported in v0.2.
25
+
26
+ ## Commands that look different
27
+
28
+ These run as real commands. mintterm adds flags behind the scenes so the output can be parsed, and you see the output as a table or bars.
29
+
30
+ | You type | You get |
31
+ | --- | --- |
32
+ | `ls`, `ls ~/Downloads` | Table with size, date, permissions, owner. ▸ folders, * programs, → links |
33
+ | `ls --raw` | Plain `ls` output |
34
+ | `df` | Drives with usage bars. Bars turn red above 85% |
35
+ | `du`, `du ~` | Biggest folders first, with a share bar |
36
+ | `ps` | Top 25 processes by CPU, with bars |
37
+ | `free` | RAM and swap bars |
38
+ | `ip` | Network interfaces with state and addresses |
39
+ | `ss` | Listening ports with the program that owns each one |
40
+ | `git status` | Branch, sync state, and a table of changes |
41
+ | `git log` | Last 20 commits as a table |
42
+ | `grep pattern file` | Matches as a table with file and line |
43
+ | `find ...` | Results as a table, folders highlighted |
44
+ | `apt list --upgradable` | Packages with new versions |
45
+ | `systemctl --failed` | Failed services in red |
46
+ | `cat file` | Numbered lines |
47
+
48
+ Everything else runs exactly as typed, with its output in a card. Cards work for every command: fold, pin, copy, and exit codes.
49
+
50
+ ## Built-in features
51
+
52
+ - **Trash and undo.** `rm` moves files into the mintterm trash instead of deleting them. `undo` brings them back. `mv` is recorded too. `rm --really` deletes permanently.
53
+ - **Safety preview.** `rm -rf`, `sudo rm`, `dd`, `mkfs`, and `chmod -R` list what would change and wait for `y`.
54
+ - **`?` helper.** `? find big files`, `? update my system`, or `? explain tar`. It suggests commands but never runs them.
55
+ - **Tab completion.** Completes file and folder names, and lists options when several match.
56
+ - **History search.** Ctrl+R, type part of an old command, press Enter.
57
+ - **Cards.** Click a prompt line to fold a card. Ctrl+P pins a card to the top. Ctrl+Shift+C copies its output (needs `xclip` or `wl-copy`).
58
+ - **Background commands.** The window stays responsive while a command runs. Ctrl+C stops it.
59
+ - **Notifications.** If a command takes longer than 10 seconds and the window is in the background, you get a desktop notification (uses `notify-send`, included in Mint).
60
+ - **Prompt segments and profiles.** Show or hide time, user, host, folder, git branch, Python venv, and exit code. Server profile shows a red prompt so production never looks like your sandbox.
61
+
62
+ ## Keys
63
+
64
+ | Key | Action |
65
+ | --- | --- |
66
+ | Enter | Run the command |
67
+ | Up / Down | Command history, or move through search results |
68
+ | Tab | Complete a file or folder name |
69
+ | Ctrl+R | Search history |
70
+ | Ctrl+P | Pin or unpin the selected card |
71
+ | Ctrl+Shift+C | Copy the selected card's output |
72
+ | Ctrl+L or `clear` | Clear the screen |
73
+ | Ctrl+U | Clear the input line |
74
+ | Ctrl+T | Switch to the next theme |
75
+ | Ctrl+C | Stop a running command, or cancel a confirmation |
76
+ | Mouse wheel | Scroll |
77
+ | Esc | Quit (or leave search) |
78
+
79
+ ## Settings
80
+
81
+ Type these inside mintterm. Settings save to `~/.config/mintterm/config.json`.
82
+
83
+ ```text
84
+ set theme sunset mint-dark, mint-light, sunset
85
+ set profile Server Dev, Server, Minimal
86
+ set font 18 10 to 28
87
+ set segments user,host,path time, user, host, path, git, venv, exit
88
+ set notify 10 seconds before a desktop alert (0 = always)
89
+ set show current settings
90
+ ```
91
+
92
+ Command-line options: `mintterm --theme mint-light` (for this run only), `mintterm --version`, `mintterm --help`.
93
+
94
+ ## Limitations in v0.2
95
+
96
+ - Full-screen programs (`vim`, `nano`, `top`, `htop`) do not run inside mintterm. Use `ps` and `free` for the same information.
97
+ - `sudo` asks for a password in the terminal that launched mintterm, not in the window. Run `sudo -v` in your normal terminal first, then `sudo` commands in mintterm work for about 15 minutes.
98
+ - Output appears when a command finishes, not line by line.
99
+ - Only the commands listed above get tables. Others are shown as plain output in cards.
100
+ - Plugins, an SSH manager, widgets and session sharing are planned for later versions.
101
+
102
+ ## Development
103
+
104
+ ```bash
105
+ python3 -m venv .venv
106
+ source .venv/bin/activate
107
+ pip install -e ".[dev]"
108
+ pytest
109
+ ```
110
+
111
+ The parsers, safety checks, trash, and helper have no pygame dependency and are fully tested. The window code is tested by running it against a display.
112
+
113
+ ## Publishing to PyPI
114
+
115
+ 1. Create an account at pypi.org and an API token under Account settings.
116
+ 2. Update `authors` and the URLs in `pyproject.toml`, and bump `version` for each release.
117
+ 3. Build and check:
118
+
119
+ ```bash
120
+ python -m build
121
+ twine check dist/*
122
+ ```
123
+
124
+ 4. Test on TestPyPI first:
125
+
126
+ ```bash
127
+ twine upload --repository testpypi dist/*
128
+ pip install -i https://test.pypi.org/simple/ mintterm
129
+ ```
130
+
131
+ 5. Upload to the real index:
132
+
133
+ ```bash
134
+ twine upload dist/*
135
+ ```
136
+
137
+ Username: `__token__`. Password: your `pypi-...` token.
138
+
139
+ ## License
140
+
141
+ MIT. See LICENSE.
@@ -0,0 +1,51 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "mintterm"
7
+ version = "0.2.0"
8
+ description = "A block-based terminal for Linux, built with pygame. Real bash, with safer and clearer output."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = {text = "MIT"}
12
+ authors = [{name = "Your Name"}]
13
+ keywords = ["terminal", "linux", "ubuntu", "linux-mint", "pygame", "shell"]
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.10",
17
+ "Programming Language :: Python :: 3.11",
18
+ "Programming Language :: Python :: 3.12",
19
+ "Operating System :: POSIX :: Linux",
20
+ "Environment :: X11 Applications",
21
+ "License :: OSI Approved :: MIT License",
22
+ "Topic :: System :: Shells",
23
+ ]
24
+ dependencies = [
25
+ "pygame>=2.5",
26
+ ]
27
+
28
+ [project.optional-dependencies]
29
+ dev = [
30
+ "pytest>=7",
31
+ "build>=1",
32
+ "twine>=5",
33
+ ]
34
+
35
+ [project.scripts]
36
+ mintterm = "mintterm.__main__:main"
37
+
38
+ [project.urls]
39
+ Homepage = "https://github.com/YOUR-USER/mintterm"
40
+ Issues = "https://github.com/YOUR-USER/mintterm/issues"
41
+
42
+ [tool.setuptools.packages.find]
43
+ where = ["src"]
44
+
45
+ [tool.setuptools.package-data]
46
+ mintterm = ["assets/*.svg"]
47
+
48
+
49
+ [tool.pytest.ini_options]
50
+ pythonpath = ["src"]
51
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """mintterm: a block-based terminal for Linux."""
2
+
3
+ __version__ = "0.2.0"
@@ -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())