docs.rs failed to build tauri-winutils-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
tauri-winutils-0.1.6
Tauri Window Manager Crate
A cross-platform window manager crate for Tauri applications that provides workspace management, window tiling, and layout control.
Links
Features
- 🖥️ Real System Window Control: Actually move, resize, minimize, maximize, and close system windows
- 🌍 Cross-platform: Works on Windows, macOS, and Linux
- 🏢 Workspace Management: Multiple workspaces with different layouts
- 📐 Layout Modes: Tiling, Floating, and Monocle layouts
- ⚙️ Configurable: Customizable gaps, borders, and behavior
- 🎯 Easy Integration: Simple plugin system for Tauri apps
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Quick Start
1. Add to your Tauri app
use tauri_winutils_crate;
2. Use the convenience macro (alternative)
use setup_window_manager;
3. Frontend Integration
import { invoke } from '@tauri-apps/api/tauri';
// Get all system windows
const systemWindows = await invoke('get_system_windows');
// Move a window
await invoke('move_system_window', { handle: windowHandle, x: 100, y: 100 });
// Resize a window
await invoke('resize_system_window', { handle: windowHandle, width: 800, height: 600 });
// Minimize/maximize/restore
await invoke('minimize_system_window', { handle: windowHandle });
await invoke('maximize_system_window', { handle: windowHandle });
await invoke('restore_system_window', { handle: windowHandle });
// Close a window
await invoke('close_system_window', { handle: windowHandle });
// Focus a window
await invoke('focus_system_window', { handle: windowHandle });
// Arrange multiple windows in a tiling layout
await invoke('arrange_system_windows', { windowHandles: [handle1, handle2, handle3] });
// Create a new workspace
const workspaceId = await invoke('create_workspace', {
name: 'Development',
layout: 'tiling'
});
// Switch to a workspace
await invoke('switch_workspace', { workspaceId });
// Add a window to management
const windowId = await invoke('add_window_to_manager', {
title: 'My App',
app_name: 'my-app'
});
// Arrange windows in current workspace
await invoke('arrange_windows', { workspaceId });
Available Commands
Window Management
get_system_windows()- Get all system windowsmove_system_window(handle, x, y)- Move a windowresize_system_window(handle, width, height)- Resize a windowset_system_window_bounds(handle, x, y, width, height)- Set position and sizeminimize_system_window(handle)- Minimize a windowmaximize_system_window(handle)- Maximize a windowrestore_system_window(handle)- Restore a windowclose_system_window(handle)- Close a windowfocus_system_window(handle)- Focus a windowhide_system_window(handle)- Hide a windowshow_system_window(handle)- Show a windowarrange_system_windows(handles)- Arrange multiple windows in a tiling layout
Virtual Window Management (for internal app windows)
add_window_to_manager(title, app_name)- Add a window to managementremove_window_from_manager(window_id)- Remove a windowclose_window(window_id)- Close a windowminimize_window(window_id)- Minimize a windowmaximize_window(window_id)- Maximize a windowfocus_window(window_id)- Focus a window
Workspace Management
get_workspaces()- Get all workspacescreate_workspace(name, layout)- Create a new workspaceswitch_workspace(workspace_id)- Switch to a workspacearrange_windows(workspace_id)- Arrange windows in a workspace
Configuration
get_config()- Get current configurationupdate_config(config)- Update configuration
Layout Types
- Tiling: Automatically arranges system windows in a grid layout
- Floating: Windows maintain their positions
- Monocle: Full-screen window mode
Configuration Options
use Config;
let config = Config ;
Advanced Usage
Access Window Manager State
use ;
Custom Window Operations
use ;
// In your Tauri command
Examples
See the examples/ directory for complete example applications that demonstrate:
- Real system window control
- Automatic window tiling
- Window management UI
- Cross-platform compatibility
License
MIT License - see LICENSE file for details.