Skip to content

Commit 37c9d2f

Browse files
committed
get all completions implemented. now to refine
1 parent 3287325 commit 37c9d2f

File tree

1 file changed

+117
-23
lines changed

1 file changed

+117
-23
lines changed

custom-completions/aerospace/aerospace-completions.nu

Lines changed: 117 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
2-
def "nu-complete aerospace" [] {
3-
^aerospace --help
4-
| lines
5-
| filter { str starts-with " " }
6-
| parse " {value} {description}"
7-
| str trim
8-
}
9-
101
export extern "aerospace" [
11-
command?: string@"nu-complete aerospace"
2+
command?:string
123
--help(-h) # Print help
134
--version(-v) # Print the current version
145
]
@@ -18,6 +9,7 @@ def "nu-complete aerospace-list-all-workspaces" [] {
189
| lines
1910
}
2011

12+
# Balance sizes of all windows in the current workspace
2113
export extern "aerospace balance-sizes" [
2214
--help(-h) # Print help
2315
--workspace:int@"nu-complete aerospace-list-all-workspaces" # Act on the specified workspace instead of the focused workspace
@@ -31,17 +23,20 @@ def "nu-complete aerospace-list-all-windows" [] {
3123
| str trim
3224
}
3325

26+
# Close the focused window.
3427
export extern "aerospace close" [
3528
--help(-h) # Print help
3629
--quit-if-last-window # Quit the app instead of closing if it's the last window of the app
3730
--window-id:int@"nu-complete aerospace-list-all-windows" # Act on the specified window instead of the focused window
3831
]
3932

33+
# On the focused workspace, close all windows but current
4034
export extern "aerospace close-all-windows-but-current" [
4135
--help(-h) # Print help
4236
--quit-if-last-window # Quit the apps instead of closing them if it's their last window
4337
]
4438

39+
# Query AeroSpace config options
4540
export extern "aerospace config" [
4641
--help(-h) # Print help
4742
--get:string # Get the value for a given key. You can inspect available keys with --major-keys or --all-keys
@@ -50,17 +45,17 @@ export extern "aerospace config" [
5045
--config-path # Print absolute path to the loaded config
5146
]
5247

53-
export extern "aerospace config --major-keys" [
54-
--help(-h) # Print help
55-
]
56-
57-
export extern "aerospace config --all-keys" [
58-
--help(-h) # Print help
59-
]
60-
61-
export extern "aerospace config --config-path" [
62-
--help(-h) # Print help
63-
]
48+
# export extern "aerospace config --major-keys" [
49+
# --help(-h) # Print help
50+
# ]
51+
#
52+
# export extern "aerospace config --all-keys" [
53+
# --help(-h) # Print help
54+
# ]
55+
#
56+
# export extern "aerospace config --config-path" [
57+
# --help(-h) # Print help
58+
# ]
6459

6560
def "nu-complete aerospace-config-list-all-keys" [] {
6661
aerospace config --all-keys
@@ -73,6 +68,7 @@ export extern "aerospace config --get" [
7368
--keys # Print keys of the complicated object (map or array)
7469
]
7570

71+
# Interactive command to record Accessibility API debug information to create bug reports
7672
export extern "aerospace debug-windows" [
7773
--help(-h) # Print help
7874
--window-id:int@"nu-complete aerospace-list-all-windows" # Print debug information of the specified window right away. Usage of this flag disables interactive mode
@@ -82,6 +78,7 @@ def "nu-complete aerospace-enable" [] {
8278
['toggle', 'on', 'off']
8379
}
8480

81+
# Temporarily disable window management
8582
export extern "aerospace enable" [
8683
--help(-h) # Print help
8784
command:string@"nu-complete aerospace-enable"
@@ -101,14 +98,22 @@ export extern "aerospace enable off" [
10198
--fail-if-noop # Exit with non-zero exit code if already in the requested mode
10299
]
103100

101+
# Run /bin/bash -c '<bash-script>', and don’t wait for the command termination. Stdout, stderr and exit code are ignored.
102+
export extern "aerospace exec-and-forget" [
103+
command:string
104+
]
105+
106+
# Flatten the tree of the focused workspace
104107
export extern "aerospace flatten-workspace-tree" [
105108
--help(-h) # Print help
106109
--workspace:int@"nu-complete aerospace-list-all-workspaces" # Act on the specified workspace instead of the focused workspace
107110
]
111+
108112
def "nu-complete aerospace-focus" [] {
109113
['left','down','up','right']
110114
}
111115

116+
# Set focus to the nearest window in the given direction
112117
export extern "aerospace focus" [
113118
--help(-h) # Print help
114119
command?:string@"nu-complete aerospace-focus"
@@ -153,6 +158,7 @@ export extern "aerospace focus right" [
153158
--boundaries-action:string@"nu-complete aerospace-focus-boundaries-action" # Defines the behavior when requested to cross the <boundary>.
154159
]
155160

161+
# Switch between the current and previously foxused elements back and forth. The element is either a window or an empty workspace
156162
export extern "aerospace focus-back-and-forth" [
157163
--help(-h) # Print help
158164
]
@@ -185,6 +191,7 @@ def "nu-complete aerospace-focus-monitor" [] {
185191
]
186192
}
187193

194+
# Focus monitor by relative direction, by order, or by pattern
188195
export extern "aerospace focus-monitor" [
189196
--help(-h) # Print help
190197
command:string@"nu-complete aerospace-focus-monitor"
@@ -227,6 +234,7 @@ def "nu-complete aerospace-fullscreen" [] {
227234
]
228235
}
229236

237+
# Toggle the fullscreen mode for the focused window
230238
export extern "aerospace fullscreen" [
231239
--help(-h) # Print help
232240
--no-outer-gaps # Remove the outer gaps when in fullscreen mode
@@ -257,6 +265,7 @@ def "nu-complete aerospace-join-with" [] {
257265
]
258266
}
259267

268+
# Put the focused window and the nearest node in the specified direction under a common parent container
260269
export extern "aerospace join-with" [
261270
--help(-h) # Print help
262271
--window-id:int@"nu-complete aerospace-list-all-windows" # Act on the specified window instead of the focues window
@@ -420,47 +429,132 @@ def "nu-complete aerospace-move-mouse" [] {
420429
export extern "aerospace move-mouse" [
421430
--help(-h) # Print help
422431
command:string@"nu-complete aerospace-move-mouse"
423-
--fail-if-noop # Exit with non-zero exit code if already not fullscreen
424432
]
425433

434+
export extern "aerospace move-mouse window-lazy-center" [
435+
--help(-h) # Print help
436+
--fail-if-noop # Exit with non-zero exit code if mouse is already at the requested position.
437+
]
438+
439+
export extern "aerospace move-mouse monitor-lazy-center" [
440+
--help(-h) # Print help
441+
--fail-if-noop # Exit with non-zero exit code if mouse is already at the requested position.
442+
]
443+
444+
# def "nu-complete aerospace-move-node-to-monitor" [] {
445+
# [
446+
# "left,
447+
# "down"
448+
# "up",
449+
# "right",
450+
# "next",
451+
# "prev",
452+
# ]
453+
# }
454+
455+
426456
export extern "aerospace move-node-to-monitor" [
427457
--help(-h) # Print help
458+
--wrap-around # Make it possible to jump between first and last workspaces using (next|prev)
459+
--fail-if-noop # Exit with non-zero code if moving a window to a workspace it already belongs to
460+
--focus-follows-window #Make sure that the window in question receives focus after moving.
461+
--window-id:int@"nu-complete aerospace-list-all-windows" # Act on the specified window instead of the focused window
462+
command:string
428463
]
429464

430465
export extern "aerospace move-node-to-workspace" [
431466
--help(-h) # Print help
467+
--wrap-around # Make it possible to jump between first and last workspaces using (next|prev)
468+
--fail-if-noop # Exit with non-zero code if moving a window to a workspace it already belongs to
469+
--focus-follows-window #Make sure that the window in question receives focus after moving.
470+
--window-id:int@"nu-complete aerospace-list-all-windows" # Act on the specified window instead of the focused window
471+
command:string
432472
]
433473

434474
export extern "aerospace move-workspace-to-monitor" [
435475
--help(-h) # Print help
476+
--wrap-around # Make it possible to jump between first and last monitors
477+
--workspace # Act on the specified workspace instead of the focused workspace
436478
]
437479

438480
export extern "aerospace reload-config" [
439481
--help(-h) # Print help
482+
--no-gui # Don't open GUI to show error. Only use stdout to report errors
483+
--dry-run # Validate the config and show errors (if any) but don't reload the config
440484
]
441485

442-
export extern "aerospace resize" [
486+
def "nu-complete aerospace-resize" [] {
487+
[
488+
"smart",
489+
"smart-opposite",
490+
"width",
491+
"height",
492+
]
493+
}
494+
495+
export extern "aerospace-resize" [
443496
--help(-h) # Print help
497+
--window-id:int@"nu-complete aerospace-list-all-windows" # Act on the specified window instead of the focused window
498+
command:string@"nu-complete aerospace-resize"
444499
]
445500

501+
def "nu-complete aerospace-split" [] {
502+
[
503+
"horizontal",
504+
"vertical",
505+
"opposite"
506+
]
507+
}
508+
446509
export extern "aerospace split" [
447510
--help(-h) # Print help
511+
--window-id:int@"nu-complete aerospace-list-all-windows" # Act on the specified window instead of the focused window
512+
command:string@"nu-complete aerospace-split"
448513
]
449514

450515
export extern "aerospace summon-workspace" [
451516
--help(-h) # Print help
517+
--fail-if-noop # Exit with non-zero code if moving a window to a workspace it already belongs to
518+
command:string
452519
]
453520

454521
export extern "aerospace trigger-binding" [
455522
--help(-h) # Print help
523+
command:string
524+
--mode:string # Moe to search <binding> in
456525
]
457526

527+
def "nu-complete aerospace-volume" [] {
528+
[
529+
"up",
530+
"down",
531+
"mute-toggle",
532+
"mute-off",
533+
"mute-on",
534+
"set"
535+
]
536+
}
537+
458538
export extern "aerospace volume" [
459539
--help(-h) # Print help
540+
command:string@"nu-complete aerospace-volume"
541+
]
542+
543+
def "nu-complete aerospace-volume-set" [] {
544+
0..100
545+
}
546+
547+
export extern "aerospace volume set" [
548+
--help(-h) # Print help
549+
command:int@"nu-complete aerospace-volume-set"
460550
]
461551

462552
export extern "aerospace workspace" [
463553
--help(-h) # Print help
554+
--wrap-around # Make it possible to jump between first and last workspaces using (next|prev)
555+
--auto-back-and-forth # Autmatic back-and-forth when switching to already focused workspace. Incompatible with --fail-if-noop
556+
--fail-if-noop # Exit with non-zero exit code if switching to the already focused workspace. Incompatible with --auto-back-and-forth
557+
command:string
464558
]
465559

466560
export extern "aerospace workspace-back-and-forth" [

0 commit comments

Comments
 (0)