How dayuanjiang/pecofence works
PecoFence is a native Windows desktop organizer that groups desktop files in glass panels (fences), with tabs, automatic sorting rules, and file-management interactions. The main workflow is user or CLI request → app command handling → persistent layout/configuration and fence windows → rendered desktop panels; file-system changes can then be sorted into groups by rules. The README documents CLI and feature behavior, while sampled sources confirm app startup, command queuing, rendering, and named-pipe transport. Some feature internals were not sampled, so those documented connections are marked dashed.
Main entry points: app/mod.rs App runtime · run.rs CLI commands · fence_window/mod.rs Fence windows · ipc_server.rs App IPC server
Components 21
Desktop interaction
- App runtime
crates/app/src/app/mod.rs - Fence windows
crates/app/src/fence_window/mod.rs - File interactions
crates/app/src/app/fileops.rs - Tabs and portals
crates/app/src/app/tabs.rs - Peek desktop
crates/app/src/peek.rs - Settings panel
crates/app/src/settings_host.rs
Organization state
- Layout state
crates/core/src/model.rs - Auto-sort rules
crates/core/src/rules.rs - Config storage
crates/core/src/config_store.rs
Native presentation
- Fence rendering
crates/render/src/fence_chrome.rs - Glass effects
crates/render/src/liquid_glass.rs
System integration
- Desktop anchoring
crates/app/src/anchor.rs - Windows services
crates/platform/src/shell.rs
CLI automation
- IPC protocol
crates/ipc/src/dto.rs - App IPC server
crates/app/src/ipc_server.rs - CLI commands
crates/cli/src/run.rs - Named-pipe client
crates/cli/src/client.rs - Snapshots and config transfer
crates/app/src/app/ipc.rs
Other components
- Desktop user
- AI agent
- Windows Explorer
Connections 25
- Desktop user → App runtime: organizes desktop
- AI agent → CLI commands: issues commands
- App runtime → Fence windows: manages windows
crates/app/src/app/mod.rs - Fence windows → Layout state: reads layout
- Fence windows → Fence rendering: renders panels
- Fence rendering → Glass effects: uses glass effects
crates/render/src/fence_chrome.rs - Fence windows → File interactions: handles file actions
- App runtime → Auto-sort rules: sorts new files
- Auto-sort rules → Layout state: assigns files
crates/core/src/rules.rs - App runtime → Tabs and portals: manages workspaces
crates/app/src/app/mod.rs - App runtime → Peek desktop: handles peek
crates/app/src/main.rs - App runtime → Desktop anchoring: anchors fences
crates/app/src/main.rs - Desktop anchoring → Windows services: uses desktop APIs
crates/app/src/anchor.rs - Windows services → Windows Explorer: invokes Explorer
- App runtime → Settings panel: hosts settings
crates/app/src/main.rs - Settings panel → Config storage: persists settings
- App runtime → App IPC server: serves requests
crates/app/src/main.rs - AI agent → CLI commands: requests changes
- CLI commands → Named-pipe client: sends request
crates/cli/src/main.rs - Named-pipe client → App IPC server: exchanges pipe data
- CLI commands → IPC protocol: uses request schema
- App IPC server → IPC protocol: uses IPC types
crates/app/src/ipc_server.rs - App IPC server → App runtime: dispatches commands
crates/app/src/ipc_server.rs - CLI commands → Snapshots and config transfer: exports or restores
- Snapshots and config transfer → Config storage: transfers configuration