refactor(clap): fix deprecations

This commit is contained in:
LGUG2Z
2022-03-03 16:14:48 -08:00
committed by جاد
parent a9534fa49c
commit ed01bb674f
+49 -49
View File
@@ -396,13 +396,13 @@ enum SubCommand {
/// Show a JSON representation of the current window manager state /// Show a JSON representation of the current window manager state
State, State,
/// Query the current window manager state /// Query the current window manager state
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
Query(Query), Query(Query),
/// Subscribe to komorebi events /// Subscribe to komorebi events
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
Subscribe(Subscribe), Subscribe(Subscribe),
/// Unsubscribe from komorebi events /// Unsubscribe from komorebi events
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
Unsubscribe(Unsubscribe), Unsubscribe(Unsubscribe),
/// Tail komorebi.exe's process logs (cancel with Ctrl-C) /// Tail komorebi.exe's process logs (cancel with Ctrl-C)
Log, Log,
@@ -413,123 +413,123 @@ enum SubCommand {
#[clap(alias = "quick-load")] #[clap(alias = "quick-load")]
QuickLoadResize, QuickLoadResize,
/// Save the current resize layout dimensions to a file /// Save the current resize layout dimensions to a file
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
#[clap(alias = "save")] #[clap(alias = "save")]
SaveResize(SaveResize), SaveResize(SaveResize),
/// Load the resize layout dimensions from a file /// Load the resize layout dimensions from a file
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
#[clap(alias = "load")] #[clap(alias = "load")]
LoadResize(LoadResize), LoadResize(LoadResize),
/// Change focus to the window in the specified direction /// Change focus to the window in the specified direction
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
Focus(Focus), Focus(Focus),
/// Move the focused window in the specified direction /// Move the focused window in the specified direction
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
Move(Move), Move(Move),
/// Change focus to the window in the specified cycle direction /// Change focus to the window in the specified cycle direction
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
CycleFocus(CycleFocus), CycleFocus(CycleFocus),
/// Move the focused window in the specified cycle direction /// Move the focused window in the specified cycle direction
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
CycleMove(CycleMove), CycleMove(CycleMove),
/// Stack the focused window in the specified direction /// Stack the focused window in the specified direction
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
Stack(Stack), Stack(Stack),
/// Resize the focused window in the specified direction /// Resize the focused window in the specified direction
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
#[clap(alias = "resize")] #[clap(alias = "resize")]
ResizeEdge(Resize), ResizeEdge(Resize),
/// Resize the focused window or primary column along the specified axis /// Resize the focused window or primary column along the specified axis
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
ResizeAxis(ResizeAxis), ResizeAxis(ResizeAxis),
/// Unstack the focused window /// Unstack the focused window
Unstack, Unstack,
/// Cycle the focused stack in the specified cycle direction /// Cycle the focused stack in the specified cycle direction
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
CycleStack(CycleStack), CycleStack(CycleStack),
/// Move the focused window to the specified monitor /// Move the focused window to the specified monitor
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
MoveToMonitor(MoveToMonitor), MoveToMonitor(MoveToMonitor),
/// Move the focused window to the specified workspace /// Move the focused window to the specified workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
MoveToWorkspace(MoveToWorkspace), MoveToWorkspace(MoveToWorkspace),
/// Send the focused window to the specified monitor /// Send the focused window to the specified monitor
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
SendToMonitor(SendToMonitor), SendToMonitor(SendToMonitor),
/// Send the focused window to the specified workspace /// Send the focused window to the specified workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
SendToWorkspace(SendToWorkspace), SendToWorkspace(SendToWorkspace),
/// Send the focused window to the specified monitor workspace /// Send the focused window to the specified monitor workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
SendToMonitorWorkspace(SendToMonitorWorkspace), SendToMonitorWorkspace(SendToMonitorWorkspace),
/// Focus the specified monitor /// Focus the specified monitor
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
FocusMonitor(FocusMonitor), FocusMonitor(FocusMonitor),
/// Focus the specified workspace on the focused monitor /// Focus the specified workspace on the focused monitor
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
FocusWorkspace(FocusWorkspace), FocusWorkspace(FocusWorkspace),
/// Focus the specified workspace on the target monitor /// Focus the specified workspace on the target monitor
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
FocusMonitorWorkspace(FocusMonitorWorkspace), FocusMonitorWorkspace(FocusMonitorWorkspace),
/// Focus the monitor in the given cycle direction /// Focus the monitor in the given cycle direction
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
CycleMonitor(CycleMonitor), CycleMonitor(CycleMonitor),
/// Focus the workspace in the given cycle direction /// Focus the workspace in the given cycle direction
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
CycleWorkspace(CycleWorkspace), CycleWorkspace(CycleWorkspace),
/// Move the focused workspace to the specified monitor /// Move the focused workspace to the specified monitor
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
MoveWorkspaceToMonitor(MoveWorkspaceToMonitor), MoveWorkspaceToMonitor(MoveWorkspaceToMonitor),
/// Create and append a new workspace on the focused monitor /// Create and append a new workspace on the focused monitor
NewWorkspace, NewWorkspace,
/// Set the resize delta (used by resize-edge and resize-axis) /// Set the resize delta (used by resize-edge and resize-axis)
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
ResizeDelta(ResizeDelta), ResizeDelta(ResizeDelta),
/// Set the invisible border dimensions around each window /// Set the invisible border dimensions around each window
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
InvisibleBorders(InvisibleBorders), InvisibleBorders(InvisibleBorders),
/// Set offsets to exclude parts of the work area from tiling /// Set offsets to exclude parts of the work area from tiling
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
WorkAreaOffset(WorkAreaOffset), WorkAreaOffset(WorkAreaOffset),
/// Adjust container padding on the focused workspace /// Adjust container padding on the focused workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
AdjustContainerPadding(AdjustContainerPadding), AdjustContainerPadding(AdjustContainerPadding),
/// Adjust workspace padding on the focused workspace /// Adjust workspace padding on the focused workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
AdjustWorkspacePadding(AdjustWorkspacePadding), AdjustWorkspacePadding(AdjustWorkspacePadding),
/// Set the layout on the focused workspace /// Set the layout on the focused workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
ChangeLayout(ChangeLayout), ChangeLayout(ChangeLayout),
/// Load a custom layout from file for the focused workspace /// Load a custom layout from file for the focused workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
LoadCustomLayout(LoadCustomLayout), LoadCustomLayout(LoadCustomLayout),
/// Flip the layout on the focused workspace (BSP only) /// Flip the layout on the focused workspace (BSP only)
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
FlipLayout(FlipLayout), FlipLayout(FlipLayout),
/// Promote the focused window to the top of the tree /// Promote the focused window to the top of the tree
Promote, Promote,
/// Force the retiling of all managed windows /// Force the retiling of all managed windows
Retile, Retile,
/// Create at least this many workspaces for the specified monitor /// Create at least this many workspaces for the specified monitor
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
EnsureWorkspaces(EnsureWorkspaces), EnsureWorkspaces(EnsureWorkspaces),
/// Set the container padding for the specified workspace /// Set the container padding for the specified workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
ContainerPadding(ContainerPadding), ContainerPadding(ContainerPadding),
/// Set the workspace padding for the specified workspace /// Set the workspace padding for the specified workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
WorkspacePadding(WorkspacePadding), WorkspacePadding(WorkspacePadding),
/// Set the layout for the specified workspace /// Set the layout for the specified workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
WorkspaceLayout(WorkspaceLayout), WorkspaceLayout(WorkspaceLayout),
/// Set a custom layout for the specified workspace /// Set a custom layout for the specified workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
WorkspaceCustomLayout(WorkspaceCustomLayout), WorkspaceCustomLayout(WorkspaceCustomLayout),
/// Enable or disable window tiling for the specified workspace /// Enable or disable window tiling for the specified workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
WorkspaceTiling(WorkspaceTiling), WorkspaceTiling(WorkspaceTiling),
/// Set the workspace name for the specified workspace /// Set the workspace name for the specified workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
WorkspaceName(WorkspaceName), WorkspaceName(WorkspaceName),
/// Toggle the behaviour for new windows (stacking or dynamic tiling) /// Toggle the behaviour for new windows (stacking or dynamic tiling)
ToggleWindowContainerBehaviour, ToggleWindowContainerBehaviour,
@@ -552,34 +552,34 @@ enum SubCommand {
/// Reload ~/komorebi.ahk (if it exists) /// Reload ~/komorebi.ahk (if it exists)
ReloadConfiguration, ReloadConfiguration,
/// Enable or disable watching of ~/komorebi.ahk (if it exists) /// Enable or disable watching of ~/komorebi.ahk (if it exists)
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
WatchConfiguration(WatchConfiguration), WatchConfiguration(WatchConfiguration),
/// Set the window behaviour when switching workspaces / cycling stacks /// Set the window behaviour when switching workspaces / cycling stacks
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
WindowHidingBehaviour(WindowHidingBehaviour), WindowHidingBehaviour(WindowHidingBehaviour),
/// Add a rule to always float the specified application /// Add a rule to always float the specified application
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
FloatRule(FloatRule), FloatRule(FloatRule),
/// Add a rule to always manage the specified application /// Add a rule to always manage the specified application
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
ManageRule(ManageRule), ManageRule(ManageRule),
/// Add a rule to associate an application with a workspace /// Add a rule to associate an application with a workspace
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
WorkspaceRule(WorkspaceRule), WorkspaceRule(WorkspaceRule),
/// Identify an application that closes to the system tray /// Identify an application that closes to the system tray
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
IdentifyTrayApplication(IdentifyTrayApplication), IdentifyTrayApplication(IdentifyTrayApplication),
/// Identify an application that has overflowing borders /// Identify an application that has overflowing borders
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
IdentifyBorderOverflow(IdentifyBorderOverflow), IdentifyBorderOverflow(IdentifyBorderOverflow),
/// Enable or disable focus follows mouse for the operating system /// Enable or disable focus follows mouse for the operating system
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
FocusFollowsMouse(FocusFollowsMouse), FocusFollowsMouse(FocusFollowsMouse),
/// Toggle focus follows mouse for the operating system /// Toggle focus follows mouse for the operating system
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
ToggleFocusFollowsMouse(ToggleFocusFollowsMouse), ToggleFocusFollowsMouse(ToggleFocusFollowsMouse),
/// Enable or disable mouse follows focus on all workspaces /// Enable or disable mouse follows focus on all workspaces
#[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(arg_required_else_help = true)]
MouseFollowsFocus(MouseFollowsFocus), MouseFollowsFocus(MouseFollowsFocus),
/// Toggle mouse follows focus on all workspaces /// Toggle mouse follows focus on all workspaces
ToggleMouseFollowsFocus, ToggleMouseFollowsFocus,