Add comprehensive settings panel with layout management
New Features: - Created settings-schema.json with customizable options: * Zone appearance (border width, colors, opacity) * Show/hide zone numbers * Enable/disable Shift+Drag snapping * Enable/disable keyboard snapping (Super+Ctrl+1-9) * Notification on window snap - Created settings.js with custom UI: * View all saved custom layouts * Delete custom layouts with confirmation dialog * Export layouts to JSON files * Visual list with layout info (name, zone count, ID) * Empty state when no custom layouts exist Extension Integration: - Integrated Settings API into extension.js - Zone overlay now respects user-configured colors and opacity - Border width is customizable - Zone numbers can be toggled on/off - Shift-drag and keyboard snap can be disabled via settings - Optional notifications when windows snap to zones - Settings properly cleaned up on extension destroy UI/UX Improvements: - Professional settings panel accessible from System Settings → Extensions - Layout management without editing JSON files manually - Real-time application of visual settings - Destructive actions (delete) require confirmation - Export functionality for sharing layouts Fixes TODO item #12 - Settings Panel Fixes TODO item #13 - Update Metadata (already done) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
57
settings-schema.json
Normal file
57
settings-schema.json
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"show-zone-numbers": {
|
||||
"type": "checkbox",
|
||||
"default": true,
|
||||
"description": "Show zone numbers in overlay",
|
||||
"tooltip": "Display zone numbers when the overlay is visible"
|
||||
},
|
||||
"zone-border-width": {
|
||||
"type": "spinbutton",
|
||||
"default": 2,
|
||||
"min": 1,
|
||||
"max": 10,
|
||||
"step": 1,
|
||||
"units": "pixels",
|
||||
"description": "Zone border width",
|
||||
"tooltip": "Width of the zone border in the overlay"
|
||||
},
|
||||
"zone-opacity": {
|
||||
"type": "scale",
|
||||
"default": 20,
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"step": 5,
|
||||
"description": "Zone overlay opacity",
|
||||
"tooltip": "Opacity of zone fill color (percentage)"
|
||||
},
|
||||
"enable-shift-drag": {
|
||||
"type": "checkbox",
|
||||
"default": true,
|
||||
"description": "Enable Shift+Drag snapping",
|
||||
"tooltip": "Show zones and snap windows when dragging with Shift held"
|
||||
},
|
||||
"enable-keyboard-snap": {
|
||||
"type": "checkbox",
|
||||
"default": true,
|
||||
"description": "Enable keyboard snapping (Super+Ctrl+1-9)",
|
||||
"tooltip": "Allow snapping windows to zones using keyboard shortcuts"
|
||||
},
|
||||
"notification-on-snap": {
|
||||
"type": "checkbox",
|
||||
"default": false,
|
||||
"description": "Show notification when window snaps",
|
||||
"tooltip": "Display a notification when a window is snapped to a zone"
|
||||
},
|
||||
"zone-border-color": {
|
||||
"type": "colorchooser",
|
||||
"default": "rgba(100, 149, 237, 0.8)",
|
||||
"description": "Zone border color",
|
||||
"tooltip": "Color of the zone borders"
|
||||
},
|
||||
"zone-fill-color": {
|
||||
"type": "colorchooser",
|
||||
"default": "rgba(100, 149, 237, 0.2)",
|
||||
"description": "Zone fill color",
|
||||
"tooltip": "Color of the zone fill"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user