Skip to content

add: first version for load command and workspace filtering#4

Open
lethalSopaper wants to merge 6 commits intoLIDSOL:mainfrom
lethalSopaper:feat/load-layout
Open

add: first version for load command and workspace filtering#4
lethalSopaper wants to merge 6 commits intoLIDSOL:mainfrom
lethalSopaper:feat/load-layout

Conversation

@lethalSopaper
Copy link
Copy Markdown
Collaborator

Overview

This PR implements the core layout restoration functionality (load command) and the functionality of workspace filtering for both save and load operations.

Features

Layout Restoration (load command)

  • Direct restoration approach: Applications are launched sequentially into target workspaces with Sway's automatic tiling handling positioning
  • Container hierarchy reconstruction: Supports split containers (horizontal/vertical), tabbed containers, and stacked containers
  • Synchronization delays: Brief pauses between operations, this ensures proper window initialization
  • Restoration reporting: Detailed results including workspaces restored, applications launched/failed, and error list
  • Workspace focus preservation: Returns to originally focused workspace after restoration

Workspace Filtering (--skip-workspace flag)

  • Skip specific workspaces during save/load operations
  • Flexible identifier formats:
    • By number: --skip-workspace=1,2,3
    • By name: --skip-workspace=mail,dev,AUDIO
    • Mixed: --skip-workspace=1,dev,3
  • Shell quoting support: Workspace names with spaces require quotes: --skip-workspace="my workspace"
  • Validation: Pre-flight checks reject non-existent workspaces with clear error messages

Enhanced Flag System

  • Proper flag handling: --help / -h and --version / -v now work as real flags (not commands)
  • Flexible positioning: Flags can appear before or after commands

Testing

No testing file are implemented yet for this base functionality

Note: still has issues with container layouts
- The Open in Background functionality was remove since the layout arranging was not working without focusing the workspace
- Comma-separated syntax: --skip-workspace=1,2,dev
- Requires shell quoting for names with spaces
- Add load command implementation details
- Specify --skip-workspace flag
- List planned future flags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant