-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Add FancyZones CLI for command-line layout management #44078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| } | ||
| else | ||
| { | ||
| // > 11 zones: fallback to grid layout |
Check failure
Code scanning / check-spelling
Forbidden Pattern
| "set-layout" or "set" or "s" => args.Length >= 2 ? SetLayout(args.Skip(1).ToArray()) : PrintErrorAndReturn("Error: set-layout requires a UUID parameter"), | ||
| "open-settings" or "settings" => OpenSettings(), | ||
| "get-hotkeys" or "hotkeys" or "hk" => GetHotkeys(), | ||
| "set-hotkey" or "shk" => args.Length >= 3 ? SetHotkey(int.Parse(args[1], CultureInfo.InvariantCulture), args[2]) : PrintErrorAndReturn("Error: set-hotkey requires <key> <uuid>"), |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
| "open-settings" or "settings" => OpenSettings(), | ||
| "get-hotkeys" or "hotkeys" or "hk" => GetHotkeys(), | ||
| "set-hotkey" or "shk" => args.Length >= 3 ? SetHotkey(int.Parse(args[1], CultureInfo.InvariantCulture), args[2]) : PrintErrorAndReturn("Error: set-hotkey requires <key> <uuid>"), | ||
| "remove-hotkey" or "rhk" => args.Length >= 2 ? RemoveHotkey(int.Parse(args[1], CultureInfo.InvariantCulture)) : PrintErrorAndReturn("Error: remove-hotkey requires <key>"), |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
| Console.WriteLine(" --all Apply to all monitors"); | ||
| Console.WriteLine(" open-settings (settings) Open FancyZones settings page"); | ||
| Console.WriteLine(" get-hotkeys (hotkeys, hk) List all layout hotkeys"); | ||
| Console.WriteLine(" set-hotkey (shk) <key> <uuid> Assign hotkey (0-9) to CUSTOM layout"); |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
| Console.WriteLine(" get-hotkeys (hotkeys, hk) List all layout hotkeys"); | ||
| Console.WriteLine(" set-hotkey (shk) <key> <uuid> Assign hotkey (0-9) to CUSTOM layout"); | ||
| Console.WriteLine(" Note: Only custom layouts work with hotkeys"); | ||
| Console.WriteLine(" remove-hotkey (rhk) <key> Remove hotkey assignment"); |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
Summary of the Pull Request
Adds a new command-line interface (CLI) tool for FancyZones, enabling users and automation scripts to manage window layouts without the GUI.
Commands:
open-editoreditor,eget-monitorsmonitors,mget-layoutslayouts,lsget-active-layoutactive,aset-layout <uuid>set,sopen-settingssettingsget-hotkeyshotkeys,hkset-hotkey <key> <uuid>shkremove-hotkey <key>rhkKey Capabilities:
--monitor Nor--all)Example Usage
output6.mp4
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed