par_term/menu/actions.rs
1//! Menu action definitions for par-term
2//!
3//! This module defines the `MenuAction` enum that represents all possible
4//! menu actions that can be triggered from the native menu system.
5
6use crate::profile::ProfileId;
7
8/// Actions that can be triggered from the menu system
9#[derive(Debug, Clone, Copy, PartialEq, Eq)]
10pub enum MenuAction {
11 // File menu
12 /// Create a new terminal window
13 NewWindow,
14 /// Close the current window
15 CloseWindow,
16 /// Quit the application (only used on Windows/Linux - macOS handles quit via system menu)
17 Quit,
18
19 // Profiles menu
20 /// Open the profile management modal
21 ManageProfiles,
22 /// Toggle the profile drawer visibility
23 ToggleProfileDrawer,
24 /// Open a specific profile (static menu entries for common profiles)
25 OpenProfile(ProfileId),
26
27 // Tab menu
28 /// Create a new tab
29 NewTab,
30 /// Close the current tab
31 CloseTab,
32 /// Switch to next tab
33 NextTab,
34 /// Switch to previous tab
35 PreviousTab,
36 /// Switch to tab by index (1-9)
37 SwitchToTab(usize),
38 /// Move the current tab one position to the left
39 MoveTabLeft,
40 /// Move the current tab one position to the right
41 MoveTabRight,
42 /// Duplicate the current tab
43 DuplicateTab,
44
45 // Edit menu
46 /// Copy selected text to clipboard
47 Copy,
48 /// Paste from clipboard
49 Paste,
50 /// Select all text (not typically used in terminals)
51 SelectAll,
52 /// Clear the scrollback buffer
53 ClearScrollback,
54 /// Show clipboard history panel
55 ClipboardHistory,
56
57 // View menu
58 /// Toggle fullscreen mode
59 ToggleFullscreen,
60 /// Maximize window vertically only (span full screen height)
61 MaximizeVertically,
62 /// Increase font size
63 IncreaseFontSize,
64 /// Decrease font size
65 DecreaseFontSize,
66 /// Reset font size to default
67 ResetFontSize,
68 /// Toggle FPS overlay
69 ToggleFpsOverlay,
70 /// Open settings panel
71 OpenSettings,
72
73 // Window menu (macOS)
74 /// Minimize the window
75 Minimize,
76 /// Zoom/maximize the window
77 Zoom,
78
79 // Help menu
80 /// Show keyboard shortcuts help
81 ShowHelp,
82 /// Show about dialog
83 About,
84
85 // Window Arrangements
86 /// Save the current window layout as an arrangement
87 SaveArrangement,
88
89 // Shell menu
90 /// Install shell integration on a remote host via curl
91 InstallShellIntegrationRemote,
92
93 // Keybinding actions (triggered by user-defined keybindings or menu)
94 /// Toggle background/custom shader on/off
95 ToggleBackgroundShader,
96 /// Toggle cursor shader on/off
97 ToggleCursorShader,
98 /// Reload configuration from disk (same as F5)
99 ReloadConfig,
100}