-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocs.html
More file actions
593 lines (527 loc) · 23.2 KB
/
docs.html
File metadata and controls
593 lines (527 loc) · 23.2 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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Documentation — DockMaster Pro</title>
<meta name="description" content="Documentation for DockMaster Pro — installation, usage, and configuration.">
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>⚓</text></svg>">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<nav id="nav">
<div class="nav-inner">
<a href="index.html" class="nav-logo">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 2L2 7l10 5 10-5-10-5z"/>
<path d="M2 17l10 5 10-5"/>
<path d="M2 12l10 5 10-5"/>
</svg>
DockMaster Pro
</a>
<button class="nav-toggle" onclick="document.querySelector('.nav-links').classList.toggle('open')" aria-label="Menu">
<span></span><span></span><span></span>
</button>
<div class="nav-links">
<a href="index.html">Home</a>
<a href="releases.html">Releases</a>
<a href="docs.html" class="active">Docs</a>
<a href="#download" class="nav-cta">Download</a>
</div>
</div>
</nav>
<div class="docs-layout">
<aside class="docs-sidebar">
<h3>Getting Started</h3>
<ul class="docs-nav">
<li><a href="#introduction" class="active">Introduction</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#permissions">Permissions</a></li>
<li><a href="#quick-start">Quick Start</a></li>
</ul>
<h3 style="margin-top: 24px;">Features</h3>
<ul class="docs-nav">
<li><a href="#dock-layout">Dock Layout</a></li>
<li><a href="#sections">Sections</a></li>
<li><a href="#workspaces">Workspaces</a></li>
<li><a href="#themes">Themes</a></li>
<li><a href="#search">Quick Search</a></li>
<li><a href="#animations">Animations</a></li>
</ul>
<h3 style="margin-top: 24px;">Advanced</h3>
<ul class="docs-nav">
<li><a href="#plugin-development">Plugin Development</a></li>
<li><a href="#troubleshooting">Troubleshooting</a></li>
</ul>
</aside>
<main class="docs-content">
<h1 id="introduction">Introduction</h1>
<p>DockMaster Pro is a powerful, customizable multi-row Dock replacement for macOS. It replaces the native macOS Dock with a feature-rich overlay that supports multiple rows, sections, workspaces, themes, and much more.</p>
<p>Built with Swift and SwiftUI, DockMaster Pro is designed to be fast, lightweight, and beautiful.</p>
<h2 id="installation">Installation</h2>
<ol>
<li>Download the latest version from the <a href="releases.html" style="color: var(--accent-light);">Releases</a> page.</li>
<li>Choose the appropriate architecture: <strong>Universal</strong> (recommended), <strong>Apple Silicon</strong>, or <strong>Intel</strong>.</li>
<li>Unzip the downloaded file.</li>
<li>Drag <code>DockMaster Pro.app</code> to your Applications folder.</li>
<li>Open the app from Applications. If Gatekeeper blocks it, right-click and select Open.</li>
</ol>
<h3>System Requirements</h3>
<ul>
<li>macOS 13.0 (Ventura) or later</li>
<li>Apple Silicon (arm64) or Intel (x86_64)</li>
</ul>
<h2 id="permissions">Permissions</h2>
<p>DockMaster Pro requires the following permissions to function properly:</p>
<ul>
<li><strong>Accessibility</strong> — Required to control the Dock process and manage other applications.</li>
<li><strong>Apple Events</strong> — Required to launch and interact with other applications.</li>
</ul>
<p>Grant these permissions in <strong>System Settings > Privacy & Security > Accessibility</strong>.</p>
<h2 id="quick-start">Quick Start</h2>
<ol>
<li>Launch DockMaster Pro from Applications.</li>
<li>Grant Accessibility permission when prompted.</li>
<li>The app will automatically replace your native Dock with the DockMaster overlay.</li>
<li>Click the menu bar icon to access settings and workspace switcher.</li>
<li>Right-click on any dock icon to access context menu options.</li>
</ol>
<h2 id="dock-layout">Dock Layout</h2>
<p>Customize the dock appearance from Settings:</p>
<ul>
<li><strong>Position</strong> — Bottom, Left, or Right edge of the screen.</li>
<li><strong>Icon Size</strong> — 32px to 128px.</li>
<li><strong>Max Rows / Columns</strong> — Control the grid layout.</li>
<li><strong>Margin</strong> — Distance from the screen edge.</li>
<li><strong>Auto-hide</strong> — Hide when not in use, show on mouse proximity.</li>
</ul>
<h2 id="sections">Sections</h2>
<p>Organize your apps into logical groups:</p>
<ul>
<li>Click the <strong>+</strong> button in Settings to add a new section.</li>
<li>Drag apps from Finder or Launchpad into any section.</li>
<li>Right-click a section header to rename or delete it.</li>
<li>Drag section headers to reorder them.</li>
</ul>
<h2 id="workspaces">Workspaces</h2>
<p>Create multiple workspaces, each with its own dock layout:</p>
<ul>
<li>Open the menu bar extra and select <strong>Workspace Switcher</strong>.</li>
<li>Create new workspaces and assign unique dock layouts.</li>
<li>Bind workspaces to macOS Spaces for automatic switching.</li>
<li>Assign keyboard shortcuts for instant workspace switching.</li>
</ul>
<h2 id="themes">Themes</h2>
<p>Customize the dock appearance with themes:</p>
<ul>
<li>Choose from 3 built-in themes: <strong>Dark</strong>, <strong>Light</strong>, and <strong>Minimal</strong>.</li>
<li>Edit colors, corner radius, blur intensity, shadows, and icon padding.</li>
<li>Export themes as <code>.dmtheme</code> files to share with others.</li>
<li>Import themes by dragging <code>.dmtheme</code> files onto the app.</li>
</ul>
<h2 id="search">Quick Search</h2>
<p>Press <code>Option + Space</code> to open the search panel:</p>
<ul>
<li>Search for installed applications.</li>
<li>Search for files, documents, and bookmarks.</li>
<li>View recent items when the search field is empty.</li>
<li>Use arrow keys to navigate, Enter to open.</li>
</ul>
<h2 id="animations">Animations</h2>
<p>Choose from a rich set of animations:</p>
<ul>
<li><strong>20 hover styles</strong> — Bounce, Shake, Pulse, Flip 3D, Glitch, Tada, Heartbeat, and more.</li>
<li><strong>8 launch animations</strong> — Scale, Fade, Slide, Pop, and more.</li>
<li><strong>7 quit animations</strong> — Shrink, Fade, Dissolve, and more.</li>
</ul>
<p>Animations respect the macOS <strong>Reduce Motion</strong> accessibility setting.</p>
<h2 id="plugin-development">Plugin Development</h2>
<p>DockMaster Pro supports a powerful plugin system that allows developers to extend the application's functionality. Plugins can add new widgets, search providers, menu items, themes, and more.</p>
<h3 id="plugin-overview">Overview</h3>
<p>The plugin system is designed with the following principles:</p>
<ul>
<li><strong>Self-contained</strong> — Each plugin manages its own localization, configuration, and resources.</li>
<li><strong>Type-safe</strong> — Plugins implement specific protocols based on their functionality type.</li>
<li><strong>Internationalized</strong> — Full support for multi-language plugins using the <code>PluginLocalizable</code> protocol.</li>
<li><strong>Hot-swappable</strong> — Plugins can be enabled/disabled at runtime without restarting the app.</li>
</ul>
<h3 id="plugin-types">Plugin Types</h3>
<p>DockMaster Pro supports the following plugin types:</p>
<table class="docs-table">
<thead>
<tr>
<th>Type</th>
<th>Protocol</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Widget</strong></td>
<td><code>WidgetPlugin</code></td>
<td>Add custom metrics to the status widget (weather, CPU stats, etc.)</td>
</tr>
<tr>
<td><strong>Search</strong></td>
<td><code>SearchPlugin</code></td>
<td>Extend Quick Search with custom search providers</td>
</tr>
<tr>
<td><strong>Menu</strong></td>
<td><code>MenuPlugin</code></td>
<td>Add custom items to dock icon context menus</td>
</tr>
<tr>
<td><strong>Theme</strong></td>
<td><code>ThemePlugin</code></td>
<td>Provide custom themes and icon packs</td>
</tr>
<tr>
<td><strong>Shortcut</strong></td>
<td><code>ShortcutPlugin</code></td>
<td>Register custom keyboard shortcuts</td>
</tr>
<tr>
<td><strong>Notification</strong></td>
<td><code>NotificationPlugin</code></td>
<td>Create custom notification rules</td>
</tr>
<tr>
<td><strong>DataSource</strong></td>
<td><code>DataSourcePlugin</code></td>
<td>Provide external data feeds</td>
</tr>
<tr>
<td><strong>Layout</strong></td>
<td><code>LayoutPlugin</code></td>
<td>Implement custom dock layout algorithms</td>
</tr>
</tbody>
</table>
<h3 id="plugin-structure">Plugin Structure</h3>
<p>Every plugin must implement the base <code>DockMasterPlugin</code> protocol and one or more type-specific protocols:</p>
<pre><code>import SwiftUI
class MyPlugin: WidgetPlugin, PluginLocalizable {
// Required: Plugin metadata
let metadata = PluginMetadata(
id: "com.example.myplugin",
name: "My Plugin",
nameLocalized: [
"en": "My Plugin",
"zh-Hans": "我的插件",
"zh-Hant": "我的外掛",
"ja": "マイプラグイン"
],
version: "1.0.0",
buildNumber: "1",
author: "Your Name",
description: "A sample plugin",
descriptionLocalized: [
"en": "A sample plugin",
"zh-Hans": "一个示例插件",
"zh-Hant": "一個範例外掛",
"ja": "サンプルプラグイン"
],
type: .widget,
icon: "star"
)
// Required: Plugin context (injected by system)
var context: PluginContext?
// Required: Plugin state
private(set) var state: PluginState = .installed
// MARK: - PluginLocalizable
let localizedStrings: [String: [String: String]] = [
"my.label": [
"en": "Label",
"zh-Hans": "标签",
"zh-Hant": "標籤",
"ja": "ラベル"
],
"my.description": [
"en": "Description",
"zh-Hans": "描述",
"zh-Hant": "描述",
"ja": "説明"
]
]
// MARK: - Lifecycle
func activate() async throws {
state = .active
// Initialize your plugin here
}
func deactivate() async {
state = .installed
// Clean up resources here
}
// MARK: - WidgetPlugin
var widgetItems: [PluginWidgetItem] {
[
PluginWidgetItem(
id: "my-item",
name: localized("my.label"),
icon: "star.fill",
value: "42",
detail: localized("my.description")
)
]
}
func updateData() async {
// Refresh your data here
}
// Optional: Configuration view
var configurationView: AnyView? {
AnyView(MyPluginConfigView(plugin: self))
}
}</code></pre>
<h3 id="plugin-internationalization">Internationalization</h3>
<p>Plugins should support multiple languages using the <code>PluginLocalizable</code> protocol. This allows your plugin to be used by users worldwide.</p>
<h4>Metadata Localization</h4>
<p>Provide localized names and descriptions in the <code>PluginMetadata</code>:</p>
<pre><code>let metadata = PluginMetadata(
id: "com.example.plugin",
name: "Default Name", // Fallback language
nameLocalized: [
"en": "Weather",
"zh-Hans": "天气",
"zh-Hant": "天氣",
"ja": "天気"
],
description: "Default description",
descriptionLocalized: [
"en": "Display weather in Dock",
"zh-Hans": "在 Dock 显示天气",
"zh-Hant": "在 Dock 顯示天氣",
"ja": "Dockに天気を表示"
],
// ...
)</code></pre>
<h4>UI String Localization</h4>
<p>Implement <code>PluginLocalizable</code> for UI strings:</p>
<pre><code>class MyPlugin: WidgetPlugin, PluginLocalizable {
let localizedStrings: [String: [String: String]] = [
"settings.city": [
"en": "City",
"zh-Hans": "城市",
"zh-Hant": "城市",
"ja": "都市"
],
"settings.placeholder": [
"en": "Enter city name",
"zh-Hans": "输入城市名称",
"zh-Hant": "輸入城市名稱",
"ja": "都市名を入力"
]
]
// Use localized strings
var widgetItems: [PluginWidgetItem] {
[PluginWidgetItem(
id: "weather",
name: localized("settings.city"),
icon: "cloud.sun",
value: "22°C"
)]
}
}</code></pre>
<h4>Supported Languages</h4>
<ul>
<li><strong>en</strong> — English</li>
<li><strong>zh-Hans</strong> — 简体中文 (Simplified Chinese)</li>
<li><strong>zh-Hant</strong> — 繁體中文 (Traditional Chinese)</li>
<li><strong>ja</strong> — 日本語 (Japanese)</li>
</ul>
<h3 id="plugin-permissions">Plugin Permissions</h3>
<p>Declare required permissions in your plugin metadata:</p>
<pre><code>let metadata = PluginMetadata(
id: "com.example.plugin",
name: "My Plugin",
version: "1.0.0",
buildNumber: "1",
author: "Your Name",
description: "Description",
type: .widget,
permissions: [.network, .filesystem]
)</code></pre>
<p>Available permissions:</p>
<ul>
<li><code>.filesystem</code> — Access to file system</li>
<li><code>.network</code> — Network access for API calls</li>
<li><code>.accessibility</code> — Accessibility features</li>
<li><code>.notifications</code> — Send notifications</li>
<li><code>.workspace</code> — Access workspace data</li>
<li><code>.theme</code> — Access theme data</li>
<li><code>.settings</code> — Access app settings</li>
<li><code>.runningApps</code> — Access running app information</li>
</ul>
<h3 id="plugin-api">Plugin API Reference</h3>
<h4>PluginContext</h4>
<p>The <code>PluginContext</code> provides access to app functionality:</p>
<pre><code>protocol PluginContext {
// App info
var appVersion: String { get }
var appName: String { get }
// Localization
var currentLanguage: String { get }
func localizedString(_ key: String, _ args: CVarArg...) -> String
// Data access
func getSections() -> [DockSection]
func getPinnedItems() -> [DockPinnedItem]
func getRecentItems() -> [DockItem]
func getWorkspaces() -> [Workspace]
func getCurrentWorkspace() -> Workspace?
func getActiveTheme() -> Theme
// System metrics
func getSystemMetrics() async -> SystemMetricsSnapshot
// Actions
func launchApp(bundleIdentifier: String)
func showNotification(title: String, message: String)
func openSettings()
}</code></pre>
<h4>PluginWidgetItem</h4>
<p>Represents a widget item displayed in the status widget:</p>
<pre><code>struct PluginWidgetItem {
let id: String // Unique identifier
let name: String // Display name (should be localized)
let icon: String // SF Symbol name
let value: String // Primary value to display
let detail: String? // Optional detail text
}</code></pre>
<h3 id="plugin-example">Complete Example: Weather Plugin</h3>
<p>Here's a complete example of a weather plugin:</p>
<pre><code>import SwiftUI
import Foundation
class WeatherPlugin: WidgetPlugin, PluginLocalizable {
let metadata: PluginMetadata
var context: PluginContext?
private(set) var state: PluginState = .installed
// MARK: - Localization
let localizedStrings: [String: [String: String]] = [
"weather.temp": [
"en": "Temperature",
"zh-Hans": "温度",
"zh-Hant": "溫度",
"ja": "温度"
],
"weather.humidity": [
"en": "Humidity",
"zh-Hans": "湿度",
"zh-Hant": "濕度",
"ja": "湿度"
],
"settings.city": [
"en": "City",
"zh-Hans": "城市",
"zh-Hant": "城市",
"ja": "都市"
]
]
// MARK: - Init
init() {
self.metadata = PluginMetadata(
id: "com.example.weather",
name: "Weather",
nameLocalized: [
"en": "Weather",
"zh-Hans": "天气",
"zh-Hant": "天氣",
"ja": "天気"
],
version: "1.0.0",
buildNumber: "1",
author: "Example",
description: "Display weather in Dock",
descriptionLocalized: [
"en": "Display weather in Dock",
"zh-Hans": "在 Dock 显示天气",
"zh-Hant": "在 Dock 顯示天氣",
"ja": "Dockに天気を表示"
],
type: .widget,
icon: "cloud.sun",
permissions: [.network]
)
}
// MARK: - Lifecycle
func activate() async throws {
state = .active
await fetchWeather()
}
func deactivate() async {
state = .installed
}
// MARK: - WidgetPlugin
var widgetItems: [PluginWidgetItem] {
[
PluginWidgetItem(
id: "weather-temp",
name: localized("weather.temp"),
icon: "thermometer",
value: "22°C",
detail: "Sunny"
),
PluginWidgetItem(
id: "weather-humidity",
name: localized("weather.humidity"),
icon: "humidity",
value: "65%"
)
]
}
func updateData() async {
await fetchWeather()
}
// MARK: - Private
private func fetchWeather() async {
// Fetch weather data from API
}
}</code></pre>
<h3 id="plugin-best-practices">Best Practices</h3>
<ul>
<li><strong>Always localize</strong> — Use <code>PluginLocalizable</code> for all user-facing strings.</li>
<li><strong>Handle errors gracefully</strong> — Don't crash the host app if your plugin fails.</li>
<li><strong>Clean up resources</strong> — Release timers, observers, and network connections in <code>deactivate()</code>.</li>
<li><strong>Use unique IDs</strong> — Ensure your plugin ID and item IDs are globally unique.</li>
<li><strong>Declare permissions</strong> — Only request permissions your plugin actually needs.</li>
<li><strong>Test thoroughly</strong> — Test with all supported languages and macOS versions.</li>
</ul>
<h2 id="troubleshooting">Troubleshooting</h2>
<h3>App doesn't open</h3>
<p>DockMaster Pro is a menu bar app (LSUIElement). It won't show a window on launch. Look for the icon in the menu bar at the top of your screen.</p>
<h3>Gatekeeper blocks the app</h3>
<p>Right-click the app and select <strong>Open</strong> from the context menu. Alternatively, go to <strong>System Settings > Privacy & Security</strong> and click <strong>Open Anyway</strong>.</p>
<h3>Dock doesn't appear</h3>
<p>Make sure you've granted Accessibility permission. Go to <strong>System Settings > Privacy & Security > Accessibility</strong> and ensure DockMaster Pro is enabled.</p>
<h3>App crashes on launch</h3>
<p>Check the Console app for crash logs. Search for "DockMasterPro" to find relevant entries. Common causes include corrupted preferences — try deleting <code>~/Library/Application Support/DockMasterPro/</code> and restarting.</p>
</main>
</div>
<section class="section" id="download" style="padding-top: 0;">
<div class="download-card fade-in">
<h2>Download DockMaster Pro</h2>
<p>Choose your architecture and get started.</p>
<div class="download-options">
<a href="https://github.com/devlive-community/DockMaster-Pro/releases/download/v1.1.0/DockMasterPro_v1.1.0_universal.zip" class="download-btn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
Universal <span class="arch">(Recommended)</span>
</a>
<a href="https://github.com/devlive-community/DockMaster-Pro/releases/download/v1.1.0/DockMasterPro_v1.1.0_arm64.zip" class="download-btn">
Apple Silicon <span class="arch">(arm64)</span>
</a>
<a href="https://github.com/devlive-community/DockMaster-Pro/releases/download/v1.1.0/DockMasterPro_v1.1.0_x86_64.zip" class="download-btn">
Intel <span class="arch">(x86_64)</span>
</a>
</div>
</div>
</section>
<footer>
<div class="footer-inner">
<p>© 2026 DockMaster Pro. All rights reserved.</p>
<div class="footer-links">
<a href="releases.html">Releases</a>
<a href="docs.html">Docs</a>
<a href="mailto:support@dockmaster.app">Support</a>
</div>
</div>
</footer>
<script src="js/main.js"></script>
</body>
</html>