statusbar-quick-actions 0.0.10

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.
package/README.md ADDED
@@ -0,0 +1,529 @@
1
+ # StatusBar Quick Actions
2
+
3
+ A comprehensive VSCode extension that provides highly customizable statusbar buttons for executing user-defined scripts and commands.
4
+
5
+ ## Features
6
+
7
+ ### 🚀 **Universal Command Execution**
8
+
9
+ - **Package Manager Scripts**: Support for npm, yarn, pnpm, and bun
10
+ - **GitHub CLI Integration**: Execute GitHub commands directly from statusbar
11
+ - **Custom Shell Scripts**: Run any shell command with environment variables
12
+ - **VSCode Commands**: Execute built-in VSCode commands
13
+ - **Auto-Detection**: Automatically detect package managers from lock files
14
+
15
+ ### 🎨 **Modern Theme System**
16
+
17
+ - **Dark/Light Mode**: Automatic theme detection from VSCode
18
+ - **High Contrast Support**: Accessibility-first design
19
+ - **Custom Color Palettes**: Configurable colors for different button states
20
+ - **StatusBar Integration**: Seamless integration with VSCode themes
21
+
22
+ ### 👁️ **Smart Visibility Conditions**
23
+
24
+ - **File Type Patterns**: Show buttons based on current file type
25
+ - **Git Repository Status**: Conditional display based on repository state
26
+ - **Workspace Folder Detection**: Context-aware button visibility
27
+ - **File/Directory Existence**: Dynamic button configuration
28
+
29
+ ### ⚡ **Enterprise-Grade Features**
30
+
31
+ - **Real-time Progress**: Visual feedback during command execution
32
+ - **Error Handling**: Comprehensive error management with user-friendly messages
33
+ - **Command History**: Track and analyze command execution patterns
34
+ - **Timeout Management**: Configurable execution timeouts
35
+ - **Background Execution**: Run commands in background with progress indicators
36
+
37
+ ### ♿ **Accessibility Support**
38
+
39
+ - **Keyboard Navigation**: Full keyboard accessibility
40
+ - **Screen Reader Compatibility**: ARIA labels and descriptions
41
+ - **High Contrast Mode**: Optimized for accessibility needs
42
+ - **Focus Management**: Proper focus order and indicators
43
+
44
+ ## Installation
45
+
46
+ 1. **From VS Code**: Search for "StatusBar Quick Actions" in the Extensions view
47
+
48
+ ```url
49
+ https://marketplace.visualstudio.com/items?itemName=involvex.statusbar-quick-actions
50
+ ```
51
+
52
+ 2. **From VSIX**: Download the extension package and install via `code --install-extension`
53
+ 3. **Development**: Clone the repository and install locally
54
+
55
+ ## Quick Start
56
+
57
+ ### Basic Configuration
58
+
59
+ 1. Open VS Code Settings (`Ctrl+,` or `Cmd+,`)
60
+ 2. Search for "StatusBar Quick Actions"
61
+ 3. Configure your first button:
62
+
63
+ ```json
64
+ {
65
+ "statusbarQuickActions": {
66
+ "buttons": [
67
+ {
68
+ "id": "npm-dev",
69
+ "text": "$(play) Dev",
70
+ "tooltip": "Start development server",
71
+ "command": {
72
+ "type": "npm",
73
+ "script": "dev"
74
+ },
75
+ "enabled": true,
76
+ "alignment": "left",
77
+ "priority": 100
78
+ }
79
+ ]
80
+ }
81
+ }
82
+ ```
83
+
84
+ ### Sample Configurations
85
+
86
+ The extension includes comprehensive sample configurations for various project types:
87
+
88
+ - **JavaScript/Node.js**: npm scripts, testing, building
89
+ - **React/TypeScript**: Development server, builds, testing
90
+ - **Python Development**: Virtual environments, testing, formatting
91
+ - **Git Operations**: Status, commit, push, pull workflows
92
+ - **Docker Workflows**: Container management and deployment
93
+
94
+ See `SAMPLE-CONFIGURATIONS.md` for detailed examples.
95
+
96
+ ## Configuration Options
97
+
98
+ ### Button Configuration
99
+
100
+ ```json
101
+ {
102
+ "id": "unique-button-id",
103
+ "text": "$(icon) Button Text",
104
+ "tooltip": "Tooltip description",
105
+ "command": {
106
+ "type": "npm|yarn|pnpm|bun|shell|github|vscode|detect",
107
+ "script": "package-script-name",
108
+ "command": "shell-command",
109
+ "args": ["arg1", "arg2"]
110
+ },
111
+ "enabled": true,
112
+ "alignment": "left|right",
113
+ "priority": 100,
114
+ "colors": {
115
+ "foreground": "#ffffff",
116
+ "background": "#6c757d"
117
+ },
118
+ "execution": {
119
+ "foreground": true,
120
+ "showProgress": true,
121
+ "timeout": 300000,
122
+ "notifications": {
123
+ "showSuccess": true,
124
+ "showError": true,
125
+ "showOutput": false
126
+ }
127
+ },
128
+ "visibility": {
129
+ "conditions": [
130
+ {
131
+ "type": "fileType|fileExists|gitStatus|workspaceFolder",
132
+ "patterns": ["*.js", "*.ts"],
133
+ "status": "clean|dirty|ahead|behind",
134
+ "folders": ["src", "test"],
135
+ "invert": false
136
+ }
137
+ ]
138
+ },
139
+ "workingDirectory": "${workspaceFolder}",
140
+ "environment": {
141
+ "NODE_ENV": "development",
142
+ "API_URL": "http://localhost:3000"
143
+ }
144
+ }
145
+ ```
146
+
147
+ ### Theme Configuration
148
+
149
+ ```json
150
+ {
151
+ "statusbarQuickActions": {
152
+ "theme": {
153
+ "mode": "auto|dark|light|highContrast",
154
+ "dark": {
155
+ "button": { "foreground": "#ffffff", "background": "#6c757d" },
156
+ "executing": { "foreground": "#ffffff", "background": "#007acc" },
157
+ "error": { "foreground": "#ffffff", "background": "#dc3545" }
158
+ },
159
+ "light": {
160
+ /* same structure */
161
+ },
162
+ "highContrast": {
163
+ /* same structure */
164
+ }
165
+ }
166
+ }
167
+ }
168
+ ```
169
+
170
+ ### Notification Configuration
171
+
172
+ ```json
173
+ {
174
+ "statusbarQuickActions": {
175
+ "notifications": {
176
+ "showSuccess": true,
177
+ "showError": true,
178
+ "showProgress": true,
179
+ "position": "top-left|top-right|bottom-left|bottom-right",
180
+ "duration": 5000,
181
+ "includeOutput": false
182
+ }
183
+ }
184
+ }
185
+ ```
186
+
187
+ ## Command Types
188
+
189
+ ### Package Manager Scripts
190
+
191
+ ```json
192
+ {
193
+ "command": {
194
+ "type": "npm",
195
+ "script": "dev"
196
+ }
197
+ }
198
+ ```
199
+
200
+ ### Shell Commands
201
+
202
+ ```json
203
+ {
204
+ "command": {
205
+ "type": "shell",
206
+ "command": "echo",
207
+ "args": ["Hello", "World"]
208
+ }
209
+ }
210
+ ```
211
+
212
+ ### GitHub CLI
213
+
214
+ ```json
215
+ {
216
+ "command": {
217
+ "type": "github",
218
+ "command": "pr",
219
+ "args": ["create", "--fill"]
220
+ }
221
+ }
222
+ ```
223
+
224
+ ### VSCode Commands
225
+
226
+ ```json
227
+ {
228
+ "command": {
229
+ "type": "vscode",
230
+ "command": "editor.action.formatDocument"
231
+ }
232
+ }
233
+ ```
234
+
235
+ ### Auto-Detection
236
+
237
+ ```json
238
+ {
239
+ "command": {
240
+ "type": "detect",
241
+ "script": "dev"
242
+ }
243
+ }
244
+ ```
245
+
246
+ ## Visibility Conditions
247
+
248
+ ### File Type Patterns
249
+
250
+ ```json
251
+ {
252
+ "conditions": [
253
+ {
254
+ "type": "fileType",
255
+ "patterns": ["*.js", "*.ts", "*.jsx", "*.tsx"]
256
+ }
257
+ ]
258
+ }
259
+ ```
260
+
261
+ ### Git Repository Status
262
+
263
+ ```json
264
+ {
265
+ "conditions": [
266
+ {
267
+ "type": "gitStatus",
268
+ "status": "dirty"
269
+ }
270
+ ]
271
+ }
272
+ ```
273
+
274
+ ### Workspace Folders
275
+
276
+ ```json
277
+ {
278
+ "conditions": [
279
+ {
280
+ "type": "workspaceFolder",
281
+ "folders": ["api", "frontend"]
282
+ }
283
+ ]
284
+ }
285
+ ```
286
+
287
+ ### File Existence
288
+
289
+ ```json
290
+ {
291
+ "conditions": [
292
+ {
293
+ "type": "fileExists",
294
+ "path": "Dockerfile"
295
+ }
296
+ ]
297
+ }
298
+ ```
299
+
300
+ ## Commands
301
+
302
+ The extension provides several commands:
303
+
304
+ - `statusbarQuickActions.editButton`: Edit button configuration
305
+ - `statusbarQuickActions.viewHistory`: View command execution history
306
+ - `statusbarQuickActions.clearHistory`: Clear command history
307
+
308
+ ## Keyboard Shortcuts
309
+
310
+ - **Alt+1-9**: Execute buttons 1-9 (configurable)
311
+ - **F1**: Show command palette with extension commands
312
+
313
+ ## Development Workflows
314
+
315
+ ### JavaScript/Node.js
316
+
317
+ ```json
318
+ {
319
+ "buttons": [
320
+ {
321
+ "id": "npm-install",
322
+ "text": "$(cloud-download) Install",
323
+ "command": { "type": "npm", "script": "install" }
324
+ },
325
+ {
326
+ "id": "npm-test",
327
+ "text": "$(beaker) Test",
328
+ "command": { "type": "npm", "script": "test" }
329
+ }
330
+ ]
331
+ }
332
+ ```
333
+
334
+ ### React Development
335
+
336
+ ```json
337
+ {
338
+ "buttons": [
339
+ {
340
+ "id": "react-dev",
341
+ "text": "$(triangle-right) Start",
342
+ "command": { "type": "npm", "script": "dev" },
343
+ "visibility": {
344
+ "conditions": [{ "type": "fileType", "patterns": ["*.tsx", "*.ts"] }]
345
+ }
346
+ }
347
+ ]
348
+ }
349
+ ```
350
+
351
+ ### Git Workflow
352
+
353
+ ```json
354
+ {
355
+ "buttons": [
356
+ {
357
+ "id": "git-status",
358
+ "text": "$(git-branch) Status",
359
+ "command": { "type": "shell", "command": "git", "args": ["status"] }
360
+ },
361
+ {
362
+ "id": "git-commit",
363
+ "text": "$(git-commit) Commit",
364
+ "command": {
365
+ "type": "shell",
366
+ "command": "git",
367
+ "args": ["commit", "-m", "${input:commitMessage}"]
368
+ }
369
+ }
370
+ ]
371
+ }
372
+ ```
373
+
374
+ ## Advanced Features
375
+
376
+ ### Environment Variables
377
+
378
+ ```json
379
+ {
380
+ "environment": {
381
+ "NODE_ENV": "development",
382
+ "API_URL": "http://localhost:3000",
383
+ "DEBUG": "app:*"
384
+ }
385
+ }
386
+ ```
387
+
388
+ ### Working Directory
389
+
390
+ ```json
391
+ {
392
+ "workingDirectory": "${workspaceFolder}/src"
393
+ }
394
+ ```
395
+
396
+ ### Timeout Configuration
397
+
398
+ ```json
399
+ {
400
+ "execution": {
401
+ "timeout": 300000,
402
+ "showProgress": true
403
+ }
404
+ }
405
+ ```
406
+
407
+ ## Troubleshooting
408
+
409
+ ### Common Issues
410
+
411
+ 1. **Button not showing**
412
+ - Check visibility conditions
413
+ - Verify file associations
414
+ - Enable debug mode in settings
415
+
416
+ 2. **Command not found**
417
+ - Verify package manager installation
418
+ - Check PATH environment variable
419
+ - Ensure script exists in package.json
420
+
421
+ 3. **Permission errors**
422
+ - Check file permissions
423
+ - Verify working directory access
424
+ - Run VS Code as administrator (Windows)
425
+
426
+ ### Debug Mode
427
+
428
+ Enable debug mode for detailed logging:
429
+
430
+ ```json
431
+ {
432
+ "statusbarQuickActions": {
433
+ "settings": {
434
+ "debug": true
435
+ }
436
+ }
437
+ }
438
+ ```
439
+
440
+ ### Output Panel
441
+
442
+ Check the "StatusBar Quick Actions" output channel for:
443
+
444
+ - Command execution logs
445
+ - Error messages
446
+ - Configuration validation results
447
+
448
+ ## API Integration
449
+
450
+ ### VSCode Tasks Integration
451
+
452
+ The extension can integrate with VSCode's task system:
453
+
454
+ ```json
455
+ {
456
+ "command": {
457
+ "type": "shell",
458
+ "command": "code",
459
+ "args": ["--task", "build"]
460
+ }
461
+ }
462
+ ```
463
+
464
+ ### Custom Extensions
465
+
466
+ Developers can extend the extension by:
467
+
468
+ - Adding new command types
469
+ - Implementing custom visibility conditions
470
+ - Creating theme variants
471
+ - Adding notification providers
472
+
473
+ ## Contributing
474
+
475
+ 1. Fork the repository
476
+ 2. Create a feature branch
477
+ 3. Make your changes
478
+ 4. Add tests
479
+ 5. Submit a pull request
480
+
481
+ ### Development Setup
482
+
483
+ ```bash
484
+ # Clone the repository
485
+ git clone https://github.com/yourusername/vscode-statusbar-quick-actions.git
486
+
487
+ # Install dependencies
488
+ cd vscode-statusbar-quick-actions
489
+ npm install
490
+
491
+ # Build the extension
492
+ npm run compile
493
+
494
+ # Run in development mode
495
+ npm run watch
496
+ ```
497
+
498
+ ### Code Style
499
+
500
+ - Use TypeScript with strict mode
501
+ - Follow ESLint configuration
502
+ - Write comprehensive tests
503
+ - Document public APIs
504
+
505
+ ## License
506
+
507
+ MIT License - see LICENSE file for details.
508
+
509
+ ## Changelog
510
+
511
+ ### v1.0.0
512
+
513
+ - Initial release
514
+ - Universal command execution
515
+ - Modern theme system
516
+ - Smart visibility conditions
517
+ - Comprehensive sample configurations
518
+ - Accessibility support
519
+ - Enterprise-grade error handling
520
+
521
+ ## Support
522
+
523
+ - **Issues**: Report bugs and feature requests on GitHub
524
+ - **Documentation**: Comprehensive guides and samples
525
+ - **Community**: Join discussions and share configurations
526
+
527
+ ---
528
+
529
+ _Streamline your development workflow with intelligent statusbar actions._
Binary file