@@ -156,9 +156,32 @@ export extern "aerospace focus-back-and-forth" [
156156 -- help(-h) # Print help
157157]
158158
159+ def "nu-complete aerospace-focus-monitor-numbers" [] {
160+ ^ aerospace list-monitors - count
161+ | 1 .. $in
162+ | to str
163+ }
164+
165+ def "nu-complete aerospace-focus-monitor-regex" [] {
166+ ^ aerospace list-monitors
167+ | parse " {number} | {name}"
168+ | str trim
169+ | get name
170+ }
171+
159172def "nu-complete aerospace-focus-monitor" [] {
160- # TODO: figure out how to do <monitor pattern> parsing
161- [' left' ,' down' ,' up' ,' right' ,' next' ,' prev' ]
173+ [
174+ ' left' ,
175+ ' down' ,
176+ ' up' ,
177+ ' right' ,
178+ ' next' ,
179+ ' prev' ,
180+ ' main' ,
181+ ' secondary' ,
182+ ... (nu-complete aerospace-focus-monitor-numbers ),
183+ ... (nu-complete aerospace-focus-monitor-regex )
184+ ]
162185}
163186
164187export extern "aerospace focus-monitor" [
@@ -196,22 +219,72 @@ export extern "aerospace focus-monitor prev" [
196219 -- wrap-around # Make it possible to wrap around focus
197220]
198221
222+ def "nu-complete aerospace fullscreen" [] {
223+ [
224+ " on" ,
225+ " off"
226+ ]
227+ }
228+
199229export extern "aerospace fullscreen" [
200230 -- help(-h) # Print help
231+ -- no-outer-gaps # Remove the outer gaps when in fullscreen mode
232+ -- window-id :int @" nu-complete aerospace-list-all-windows" # Act on the specified window instead of the focues window
233+ command ?:string @" nu-complete aerospace-fullscreen"
201234]
202235
203- export extern "aerospace fullscreen" [
236+ export extern "aerospace fullscreen on " [
204237 -- help(-h) # Print help
238+ -- no-outer-gaps # Remove the outer gaps when in fullscreen mode
239+ -- window-id :int @" nu-complete aerospace-list-all-windows" # Act on the specified window instead of the focues window
240+ -- fail-if-noop # Exit with non-zero exit code if already fullscreen
205241]
206242
207- export extern "aerospace join-with " [
243+ export extern "aerospace fullscreen off " [
208244 -- help(-h) # Print help
245+ -- no-outer-gaps # Remove the outer gaps when in fullscreen mode
246+ -- window-id :int @" nu-complete aerospace-list-all-windows" # Act on the specified window instead of the focues window
247+ -- fail-if-noop # Exit with non-zero exit code if already not fullscreen
209248]
210249
250+ def "nu-complete aerospace-join-with" [] {
251+ [
252+ " left" ,
253+ " down" ,
254+ " up" ,
255+ " right"
256+ ]
257+ }
258+
259+ export extern "aerospace join-with" [
260+ -- help(-h) # Print help
261+ -- window-id :int @" nu-complete aerospace-list-all-windows" # Act on the specified window instead of the focues window
262+ command :string @" nu-complete aerospace-join-with"
263+ ]
264+
265+ def "nu-complete aerospace-join-with" [] {
266+ [
267+ " h_tiles" ,
268+ " v_tiles" ,
269+ " h_accordion" ,
270+ " v_accordion" ,
271+ " tiles" ,
272+ " accordion" ,
273+ " horizontal" ,
274+ " vertical" ,
275+ " tiling" ,
276+ " floating"
277+ ]
278+ }
279+
211280export extern "aerospace layout" [
212281 -- help(-h) # Print help
282+ -- window-id :int @" nu-complete aerospace-list-all-windows" # Act on the specified window instead of the focues window
283+ # TODO: find a way to support multiple options
284+ command :string @" nu-complete aerospace-layout"
213285]
214286
287+ # TODO: pick aback up from here
215288export extern "aerospace list-apps" [
216289 -- help(-h) # Print help
217290]
0 commit comments