-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeckhelp
More file actions
executable file
·238 lines (204 loc) · 5.74 KB
/
Copy pathdeckhelp
File metadata and controls
executable file
·238 lines (204 loc) · 5.74 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#!/usr/bin/env python3
"""deckhelp — Help system for DeckDroid"""
import sys
import pathlib
HOME = pathlib.Path.home()
DDROID = HOME / ".deckdroid"
BOLD = "\033[1m"
GREEN = "\033[0;32m"
CYAN = "\033[0;36m"
YELLOW = "\033[1;33m"
DIM = "\033[2m"
RESET = "\033[0m"
def show_general_help():
print(f"{BOLD}DeckDroid — Help System{RESET}\n")
print(f"{BOLD}Quick Commands:{RESET}")
print(f" {CYAN}decksetup{RESET} Run first-time setup")
print(f" {CYAN}decktheme{RESET} Change visual theme")
print(f" {CYAN}ddeckprof{RESET} Manage profiles")
print(f" {CYAN}deckupdate{RESET} Check for updates")
print(f"\n{BOLD}Tool Categories:{RESET}")
print(f" {YELLOW}System:{RESET} deckbat, deckping, deckid, deckclock")
print(f" {YELLOW}Network:{RESET} deckwifi, decklocate, decksniff")
print(f" {YELLOW}Tools:{RESET} decknote, deckdisk, decklog, deckclean")
print(f" {YELLOW}UI:{RESET} deckbrowse, deckmenu, decktheme, deckhelp")
print(f"\n{DIM}Run 'deckhelp <tool>' for tool-specific help{RESET}\n")
def show_tool_help(tool):
help_texts = {
"deckbat": """
deckbat — Battery metrics
Usage: deckbat [--json] [--log] [--alert <pct>]
Examples:
deckbat Show battery info
deckbat --json JSON output
deckbat --alert 20 Alert when below 20%
""",
"deckping": """
deckping — Connectivity check
Usage: deckping [--host <ip>]
Examples:
deckping Check internet
deckping --host 8.8.8.8
""",
"deckid": """
deckid — Device identity
Usage: deckid [--json] [--log]
Examples:
deckid Show device info
deckid --json JSON output
""",
"deckclock": """
deckclock — World clock
Usage: deckclock [--zone <tz>] [--ntp]
Examples:
deckclock Show local time
deckclock --zone UTC Show UTC time
""",
"deckwifi": """
deckwifi — WiFi scanner
Usage: deckwifi [--json] [--log]
Examples:
deckwifi Scan WiFi networks
deckwifi --json JSON output
""",
"decklocate": """
decklocate — Location services
Usage: decklocate <command>
Commands:
get Get current location
track N Track for N seconds
Examples:
decklocate get
decklocate track 10
""",
"decksniff": """
decksniff — Packet capture
Usage: decksniff [--preset <name>] [--interface <if>]
Presets: dns, http, ssh, tls, default
Examples:
decksniff --preset dns
decksniff --interface wlan0
""",
"decknote": """
decknote — Notes system
Usage: decknote [--list] [--new <title>] [--search <query>]
Examples:
decknote List notes
decknote --new "Idea" Create new note
decknote --search foo Search notes
""",
"deckbrowse": """
deckbrowse — Terminal browser
Usage: deckbrowse [URL|query]
Examples:
deckbrowse github
deckbrowse https://example.com
deckbrowse search termux
""",
"deckdisk": """
deckdisk — Disk management
Usage: deckdisk <command>
Commands:
list List disks
mount Mount disk
unmount Unmount disk
Examples:
deckdisk list
""",
"decklog": """
decklog — Log viewer
Usage: decklog <command>
Commands:
view <tool> View log for tool
clear Clear all logs
Examples:
decklog view deckbat
""",
"deckclean": """
deckclean — Cleanup utility
Usage: deckclean [check|run]
Examples:
deckclean check Check cleanup candidates
deckclean run Perform cleanup
""",
"deckupdate": """
deckupdate — Update manager
Usage: deckupdate <command>
Commands:
check Check for updates
upgrade Upgrade to latest
auto Toggle auto-update
status Show update status
info Show version info
Examples:
deckupdate check
deckupdate upgrade
""",
"decktheme": """
decktheme — Theme manager
Usage: decktheme <command>
Commands:
list List all themes
set <name> Set theme
Visual Themes: cyberpunk, ghost, blood, matrix, nord, dracula, monokai, ocean
Profile Themes: hacker, developer, writer, crypto, radio, hamradio, iot
Examples:
decktheme list
decktheme set nord
""",
"deckmenu": """
deckmenu — Interactive launcher
Usage: deckmenu
Navigate with number keys, 'q' to quit.
""",
"decksetup": """
decksetup — First-run wizard
Usage: decksetup
Guides you through:
- Hostname setup
- Profile selection
- Theme selection
- Auto-update configuration
""",
"deckai": """
deckai — AI launcher
Usage: deckai
Interactive menu to launch:
- opencode
- gemini-cli
""",
"tetris": """
tetris — Tetris game
Usage: tetris
Controls: Arrow keys to move, Space to rotate, Backspace to exit
""",
}
if tool in help_texts:
print(help_texts[tool])
else:
print(f"{YELLOW}No help available for '{tool}'{RESET}")
print(f"Available tools: {', '.join(help_texts.keys())}\n")
def show_all_tools():
print(f"{BOLD}All DeckDroid Tools:{RESET}\n")
categories = {
"System": ["deckbat", "deckping", "deckid", "deckclock"],
"Network": ["deckwifi", "decklocate", "decksniff"],
"Productivity": ["decknote", "deckdisk", "decklog", "deckclean"],
"UI/Themes": ["deckbrowse", "deckmenu", "decktheme", "deckhelp"],
"Management": ["decksetup", "deckupdate", "ddeckconf", "ddeckprof"],
"AI/Games": ["deckai", "tetris"],
"Repo Tools": ["deckdroid-doctor", "deckdroid-sync", "deckdroid-web", "deckdroid-plugin", "deckdroid-vault", "deckremove"],
}
for cat, tools in categories.items():
print(f"{YELLOW}{cat}:{RESET}")
for t in tools:
print(f" {CYAN}{t}{RESET}")
print()
if __name__ == "__main__":
args = sys.argv[1:]
if not args:
show_general_help()
elif args[0] == "all":
show_all_tools()
else:
show_tool_help(args[0])