3 assert False, 'cannot create WingoCommands directly'
4
6 '''
7 Adds a new workspace to Wingo with a name Name. Note that a workspace name
8 must be unique with respect to other workspaces and must have non-zero length.
9
10 The name of the workspace that was added is returned.
11 '''
12 self._assert_arg_type('Name', Name, [basestring])
13
14 arg_str = self._gribble_arg_str([Name])
15 val = self.gribble('AddWorkspace %s' % arg_str)
16 return self._from_str('AddWorkspace', val)
17
18 - def And(self, Op1, Op2):
19 '''
20 Returns the logical AND of Op1 and Op2.
21
22 If Op1 or Op2 is not in {0, 1}, then a warning is logged and nil is returned.
23 '''
24 self._assert_arg_type('Op1', Op1, [int])
25 self._assert_arg_type('Op2', Op2, [int])
26
27 arg_str = self._gribble_arg_str([Op1, Op2])
28 val = self.gribble('And %s' % arg_str)
29 return self._from_str('And', val)
30
32 '''
33 Cycles to the next automatic tiling layout in the workspace specified by
34 Workspace.
35
36 Note that this command has no effect if the workspace is not visible.
37
38 Workspace may be a workspace index (integer) starting at 0, or a workspace
39 name.
40 '''
41 self._assert_arg_type('Workspace', Workspace, [int, basestring])
42
43 arg_str = self._gribble_arg_str([Workspace])
44 val = self.gribble('AutoCycle %s' % arg_str)
45 return self._from_str('AutoCycle', val)
46
48 '''
49 Switches the current window with the first master in the layout for the
50 workspace specified by Workspace.
51
52 Note that this command has no effect if the workspace is not visible.
53
54 Workspace may be a workspace index (integer) starting at 0, or a workspace
55 name.
56 '''
57 self._assert_arg_type('Workspace', Workspace, [int, basestring])
58
59 arg_str = self._gribble_arg_str([Workspace])
60 val = self.gribble('AutoMakeMaster %s' % arg_str)
61 return self._from_str('AutoMakeMaster', val)
62
64 '''
65 Focuses the (first) master window in the layout for the workspace specified
66 by Workspace.
67
68 Note that this command has no effect if the workspace is not visible.
69
70 Workspace may be a workspace index (integer) starting at 0, or a workspace
71 name.
72 '''
73 self._assert_arg_type('Workspace', Workspace, [int, basestring])
74
75 arg_str = self._gribble_arg_str([Workspace])
76 val = self.gribble('AutoMaster %s' % arg_str)
77 return self._from_str('AutoMaster', val)
78
80 '''
81 Allows one fewer master window to fit into the master split.
82
83 Workspace may be a workspace index (integer) starting at 0, or a workspace
84 name.
85 '''
86 self._assert_arg_type('Workspace', Workspace, [int, basestring])
87
88 arg_str = self._gribble_arg_str([Workspace])
89 val = self.gribble('AutoMastersFewer %s' % arg_str)
90 return self._from_str('AutoMastersFewer', val)
91
93 '''
94 Allows one more master window to fit into the master split.
95
96 Workspace may be a workspace index (integer) starting at 0, or a workspace
97 name.
98 '''
99 self._assert_arg_type('Workspace', Workspace, [int, basestring])
100
101 arg_str = self._gribble_arg_str([Workspace])
102 val = self.gribble('AutoMastersMore %s' % arg_str)
103 return self._from_str('AutoMastersMore', val)
104
106 '''
107 Moves focus to the next client in the layout.
108
109 Note that this command has no effect if the workspace is not visible.
110
111 Workspace may be a workspace index (integer) starting at 0, or a workspace
112 name.
113 '''
114 self._assert_arg_type('Workspace', Workspace, [int, basestring])
115
116 arg_str = self._gribble_arg_str([Workspace])
117 val = self.gribble('AutoNext %s' % arg_str)
118 return self._from_str('AutoNext', val)
119
121 '''
122 Moves focus to the next client in the layout.
123
124 Note that this command has no effect if the workspace is not visible.
125
126 Workspace may be a workspace index (integer) starting at 0, or a workspace
127 name.
128 '''
129 self._assert_arg_type('Workspace', Workspace, [int, basestring])
130
131 arg_str = self._gribble_arg_str([Workspace])
132 val = self.gribble('AutoPrev %s' % arg_str)
133 return self._from_str('AutoPrev', val)
134
136 '''
137 Increases or decreases the size of the master split by Amount in the layout on
138 the workspace specified by Workspace.
139
140 Amount should be a ratio between 0.0 and 1.0.
141
142 Workspace may be a workspace index (integer) starting at 0, or a workspace
143 name.
144 '''
145 self._assert_arg_type('Workspace', Workspace, [int, basestring])
146 self._assert_arg_type('Amount', Amount, [float])
147
148 arg_str = self._gribble_arg_str([Workspace, Amount])
149 val = self.gribble('AutoResizeMaster %s' % arg_str)
150 return self._from_str('AutoResizeMaster', val)
151
153 '''
154 Increases or decreases the size of the current window by Amount in the layout
155 on the workspace specified by Workspace.
156
157 Amount should be a ratio between 0.0 and 1.0.
158
159 Workspace may be a workspace index (integer) starting at 0, or a workspace
160 name.
161 '''
162 self._assert_arg_type('Workspace', Workspace, [int, basestring])
163 self._assert_arg_type('Amount', Amount, [float])
164
165 arg_str = self._gribble_arg_str([Workspace, Amount])
166 val = self.gribble('AutoResizeWindow %s' % arg_str)
167 return self._from_str('AutoResizeWindow', val)
168
170 '''
171 Switches the current window with the next window in the layout.
172
173 Note that this command has no effect if the workspace is not visible.
174
175 Workspace may be a workspace index (integer) starting at 0, or a workspace
176 name.
177 '''
178 self._assert_arg_type('Workspace', Workspace, [int, basestring])
179
180 arg_str = self._gribble_arg_str([Workspace])
181 val = self.gribble('AutoSwitchNext %s' % arg_str)
182 return self._from_str('AutoSwitchNext', val)
183
185 '''
186 Switches the current window with the previous window in the layout.
187
188 Note that this command has no effect if the workspace is not visible.
189
190 Workspace may be a workspace index (integer) starting at 0, or a workspace
191 name.
192 '''
193 self._assert_arg_type('Workspace', Workspace, [int, basestring])
194
195 arg_str = self._gribble_arg_str([Workspace])
196 val = self.gribble('AutoSwitchPrev %s' % arg_str)
197 return self._from_str('AutoSwitchPrev', val)
198
200 '''
201 Initiates automatic tiling on the workspace specified by Workspace. If tiling
202 is already active, the layout will be re-placed.
203
204 Note that this command has no effect if the workspace is not visible.
205
206 Workspace may be a workspace index (integer) starting at 0, or a workspace
207 name.
208 '''
209 self._assert_arg_type('Workspace', Workspace, [int, basestring])
210
211 arg_str = self._gribble_arg_str([Workspace])
212 val = self.gribble('AutoTile %s' % arg_str)
213 return self._from_str('AutoTile', val)
214
216 '''
217 Stops automatic tiling on the workspace specified by Workspace, and restores
218 windows to their position and geometry before being tiled. If tiling is not
219 active on the specified workspace, this command has no effect.
220
221 Note that this command has no effect if the workspace is not visible.
222
223 Workspace may be a workspace index (integer) starting at 0, or a workspace
224 name.
225 '''
226 self._assert_arg_type('Workspace', Workspace, [int, basestring])
227
228 arg_str = self._gribble_arg_str([Workspace])
229 val = self.gribble('AutoUntile %s' % arg_str)
230 return self._from_str('AutoUntile', val)
231
232 - def Close(self, Client):
233 '''
234 Closes the window specified by Client.
235
236 Client may be the window id or a substring that matches a window name.
237 '''
238 self._assert_arg_type('Client', Client, [int, basestring])
239
240 arg_str = self._gribble_arg_str([Client])
241 val = self.gribble('Close %s' % arg_str)
242 return self._from_str('Close', val)
243
245 '''
246 Activates the current choice in a cycle prompt.
247 '''
248
249 arg_str = self._gribble_arg_str([])
250 val = self.gribble('CycleClientChoose %s' % arg_str)
251 return self._from_str('CycleClientChoose', val)
252
254 '''
255 Hides (i.e., cancels) the current cycle prompt.
256 '''
257
258 arg_str = self._gribble_arg_str([])
259 val = self.gribble('CycleClientHide %s' % arg_str)
260 return self._from_str('CycleClientHide', val)
261
262 - def CycleClientNext(self, OnlyActiveWorkspace, OnlyVisible, ShowIconified):
263 '''
264 Shows the cycle prompt for clients and advances the selection to the next
265 client. If the cycle prompt is already visible, then the selection is advanced
266 to the next client.
267
268 OnlyActiveWorkspace specifies that only clients on the current workspace should
269 be listed. Valid values are "yes" or "no".
270
271 OnlyVisible specifies that only clients on visible workspaces should be listed.
272 Valid values are "yes" or "no".
273
274 ShowIconified specifies that iconified clients will be shown. Valid values are
275 "yes" or "no".
276 '''
277 self._assert_arg_type('OnlyActiveWorkspace', OnlyActiveWorkspace, [basestring])
278 self._assert_arg_type('OnlyVisible', OnlyVisible, [basestring])
279 self._assert_arg_type('ShowIconified', ShowIconified, [basestring])
280
281 arg_str = self._gribble_arg_str([OnlyActiveWorkspace, OnlyVisible, ShowIconified])
282 val = self.gribble('CycleClientNext %s' % arg_str)
283 return self._from_str('CycleClientNext', val)
284
285 - def CycleClientPrev(self, OnlyActiveWorkspace, OnlyVisible, ShowIconified):
286 '''
287 Shows the cycle prompt for clients and advances the selection to the previous
288 client. If the cycle prompt is already visible, then the selection is advanced
289 to the previous client.
290
291 OnlyActiveWorkspace specifies that only clients on the current workspace should
292 be listed. Valid values are "yes" or "no".
293
294 OnlyVisible specifies that only clients on visible workspaces should be listed.
295 Valid values are "yes" or "no".
296
297 ShowIconified specifies that iconified clients will be shown. Valid values are
298 "yes" or "no".
299 '''
300 self._assert_arg_type('OnlyActiveWorkspace', OnlyActiveWorkspace, [basestring])
301 self._assert_arg_type('OnlyVisible', OnlyVisible, [basestring])
302 self._assert_arg_type('ShowIconified', ShowIconified, [basestring])
303
304 arg_str = self._gribble_arg_str([OnlyActiveWorkspace, OnlyVisible, ShowIconified])
305 val = self.gribble('CycleClientPrev %s' % arg_str)
306 return self._from_str('CycleClientPrev', val)
307
309 '''
310 Make sure "audio_play_cmd" is set to a program that can play wav files.
311 '''
312
313 arg_str = self._gribble_arg_str([])
314 val = self.gribble('Dale %s' % arg_str)
315 return self._from_str('Dale', val)
316
318 '''
319 Deiconifies (unminimizes) the window specified by Client. If the window
320 is already deiconified, this command has no effect.
321
322 Client may be the window id or a substring that matches a window name.
323 '''
324 self._assert_arg_type('Client', Client, [int, basestring])
325
326 arg_str = self._gribble_arg_str([Client])
327 val = self.gribble('Deiconify %s' % arg_str)
328 return self._from_str('Deiconify', val)
329
331 '''
332 Always returns 0.
333 '''
334
335 arg_str = self._gribble_arg_str([])
336 val = self.gribble('False %s' % arg_str)
337 return self._from_str('False', val)
338
339 - def Float(self, Client):
340 '''
341 Floats the window specified by Client. If the window is already floating,
342 this command has no effect.
343
344 Client may be the window id or a substring that matches a window name.
345 '''
346 self._assert_arg_type('Client', Client, [int, basestring])
347
348 arg_str = self._gribble_arg_str([Client])
349 val = self.gribble('Float %s' % arg_str)
350 return self._from_str('Float', val)
351
352 - def Focus(self, Client):
353 '''
354 Focuses the window specified by Client.
355
356 Client may be the window id or a substring that matches a window name.
357 '''
358 self._assert_arg_type('Client', Client, [int, basestring])
359
360 arg_str = self._gribble_arg_str([Client])
361 val = self.gribble('Focus %s' % arg_str)
362 return self._from_str('Focus', val)
363
365 '''
366 Focuses and raises the window specified by Client.
367
368 Client may be the window id or a substring that matches a window name.
369 '''
370 self._assert_arg_type('Client', Client, [int, basestring])
371
372 arg_str = self._gribble_arg_str([Client])
373 val = self.gribble('FocusRaise %s' % arg_str)
374 return self._from_str('FocusRaise', val)
375
377 '''
378 Set the decorations of the window specified by Client to the "Borders" frame.
379
380 Client may be the window id or a substring that matches a window name.
381 '''
382 self._assert_arg_type('Client', Client, [int, basestring])
383
384 arg_str = self._gribble_arg_str([Client])
385 val = self.gribble('FrameBorders %s' % arg_str)
386 return self._from_str('FrameBorders', val)
387
389 '''
390 Set the decorations of the window specified by Client to the "Full" frame.
391
392 Client may be the window id or a substring that matches a window name.
393 '''
394 self._assert_arg_type('Client', Client, [int, basestring])
395
396 arg_str = self._gribble_arg_str([Client])
397 val = self.gribble('FrameFull %s' % arg_str)
398 return self._from_str('FrameFull', val)
399
401 '''
402 Set the decorations of the window specified by Client to the "Nada" frame.
403
404 Client may be the window id or a substring that matches a window name.
405 '''
406 self._assert_arg_type('Client', Client, [int, basestring])
407
408 arg_str = self._gribble_arg_str([Client])
409 val = self.gribble('FrameNada %s' % arg_str)
410 return self._from_str('FrameNada', val)
411
413 '''
414 Set the decorations of the window specified by Client to the "Slim" frame.
415
416 Client may be the window id or a substring that matches a window name.
417 '''
418 self._assert_arg_type('Client', Client, [int, basestring])
419
420 arg_str = self._gribble_arg_str([Client])
421 val = self.gribble('FrameSlim %s' % arg_str)
422 return self._from_str('FrameSlim', val)
423
425 '''
426 Returns the id of the currently active window. If there is no active window,
427 0 is returned.
428 '''
429
430 arg_str = self._gribble_arg_str([])
431 val = self.gribble('GetActive %s' % arg_str)
432 return self._from_str('GetActive', val)
433
435 '''
436 Returns a list of all client ids separated by new lines. Clients are listed
437 in the order in which they were managed, starting with the oldest client.
438 '''
439
440 arg_str = self._gribble_arg_str([])
441 val = self.gribble('GetAllClients %s' % arg_str)
442 return self._from_str('GetAllClients', val)
443
445 '''
446 Returns the height of the window specified by Client, including
447 decorations. If the client id is invalid, 0 is returned.
448
449 Client may be the window id or a substring that matches a window name.
450 '''
451 self._assert_arg_type('Client', Client, [int, basestring])
452
453 arg_str = self._gribble_arg_str([Client])
454 val = self.gribble('GetClientHeight %s' % arg_str)
455 return self._from_str('GetClientHeight', val)
456
458 '''
459 Returns a list of client ids separated by new lines on the workspace specified
460 by Workspace. Clients are listed in their focus orderering, from most recently
461 focused to least recently focused.
462
463 Workspace may be a workspace index (integer) starting at 0, or a workspace
464 name.
465 '''
466 self._assert_arg_type('Workspace', Workspace, [int, basestring])
467
468 arg_str = self._gribble_arg_str([Workspace])
469 val = self.gribble('GetClientList %s' % arg_str)
470 return self._from_str('GetClientList', val)
471
473 '''
474 Returns the name of the window specified by Client active window.
475
476 Client may be the window id or a substring that matches a window name.
477 '''
478 self._assert_arg_type('Client', Client, [int, basestring])
479
480 arg_str = self._gribble_arg_str([Client])
481 val = self.gribble('GetClientName %s' % arg_str)
482 return self._from_str('GetClientName', val)
483
485 '''
486 Returns a list of states that the client is in. These states are in
487 correspondence with the possible values of the _NET_WM_STATE property.
488 The following states may appear in the list: STICKY, MAXIMIZED_VERT,
489 MAXIMIZED_HORZ, SKIP_TASKBAR, SKIP_PAGER, HIDDEN, FULLSCREEN,
490 ABOVE, BELOW, DEMANDS_ATTENTION and FOCUSED.
491
492 More details can be found here: http://goo.gl/FHdjl
493
494 Client may be the window id or a substring that matches a window name.
495 '''
496 self._assert_arg_type('Client', Client, [int, basestring])
497
498 arg_str = self._gribble_arg_str([Client])
499 val = self.gribble('GetClientStatesList %s' % arg_str)
500 return self._from_str('GetClientStatesList', val)
501
503 '''
504 Returns the type of the window specified by Client active window. A window
505 type will either be "desktop", "dock" or "normal".
506
507 Client may be the window id or a substring that matches a window name.
508 '''
509 self._assert_arg_type('Client', Client, [int, basestring])
510
511 arg_str = self._gribble_arg_str([Client])
512 val = self.gribble('GetClientType %s' % arg_str)
513 return self._from_str('GetClientType', val)
514
516 '''
517 Returns the width of the window specified by Client, including
518 decorations. If the client id is invalid, 0 is returned.
519
520 Client may be the window id or a substring that matches a window name.
521 '''
522 self._assert_arg_type('Client', Client, [int, basestring])
523
524 arg_str = self._gribble_arg_str([Client])
525 val = self.gribble('GetClientWidth %s' % arg_str)
526 return self._from_str('GetClientWidth', val)
527
529 '''
530 Returns the workspace of the window specified by Client active window.
531
532 Client may be the window id or a substring that matches a window name.
533 '''
534 self._assert_arg_type('Client', Client, [int, basestring])
535
536 arg_str = self._gribble_arg_str([Client])
537 val = self.gribble('GetClientWorkspace %s' % arg_str)
538 return self._from_str('GetClientWorkspace', val)
539
541 '''
542 Returns the relative X position of the window specified by Client, where the X
543 position refers to the left-most region of the window, including
544 decorations. Note that "relative" in this case refers to the workspace
545 that the client is on.
546
547 Relative positions can be used as arguments to MoveRelative.
548
549 If the client id is invalid, or the client is not visible, -9999 is returned.
550
551 Client may be the window id or a substring that matches a window name.
552 '''
553 self._assert_arg_type('Client', Client, [int, basestring])
554
555 arg_str = self._gribble_arg_str([Client])
556 val = self.gribble('GetClientX %s' % arg_str)
557 return self._from_str('GetClientX', val)
558
560 '''
561 Returns the relative Y position of the window specified by Client, where the Y
562 position refers to the left-most region of the window, including
563 decorations. Note that "relative" in this case refers to the workspace
564 that the client is on.
565
566 Relative positions can be used as arguments to MoveRelative.
567
568 If the client id is invalid, or the client is not visible, -9999 is returned.
569
570 Client may be the window id or a substring that matches a window name.
571 '''
572 self._assert_arg_type('Client', Client, [int, basestring])
573
574 arg_str = self._gribble_arg_str([Client])
575 val = self.gribble('GetClientY %s' % arg_str)
576 return self._from_str('GetClientY', val)
577
579 '''
580 Returns the index of the current head. Indexing starts at 0. Heads are ordered
581 by their physical position: left to right and then top to bottom.
582 '''
583
584 arg_str = self._gribble_arg_str([])
585 val = self.gribble('GetHead %s' % arg_str)
586 return self._from_str('GetHead', val)
587
589 '''
590 Gets the workable height of the head indexed at Head. If the head specified
591 is not visible, then 0 is returned.
592
593 Indexing starts at 0. Heads are ordered by their physical position: left to
594 right and then top to bottom.
595 '''
596 self._assert_arg_type('Head', Head, [int])
597
598 arg_str = self._gribble_arg_str([Head])
599 val = self.gribble('GetHeadHeight %s' % arg_str)
600 return self._from_str('GetHeadHeight', val)
601
603 '''
604 Gets the workable width of the head indexed at Head. If the head specified
605 is not visible, then 0 is returned.
606
607 Indexing starts at 0. Heads are ordered by their physical position: left to
608 right and then top to bottom.
609 '''
610 self._assert_arg_type('Head', Head, [int])
611
612 arg_str = self._gribble_arg_str([Head])
613 val = self.gribble('GetHeadWidth %s' % arg_str)
614 return self._from_str('GetHeadWidth', val)
615
617 '''
618 Returns the name of the workspace currently visible on the monitor indexed by
619 Head. Indexing starts at 0. Heads are ordered by their physical position:
620 left to right and then top to bottom.
621 '''
622 self._assert_arg_type('Head', Head, [int])
623
624 arg_str = self._gribble_arg_str([Head])
625 val = self.gribble('GetHeadWorkspace %s' % arg_str)
626 return self._from_str('GetHeadWorkspace', val)
627
629 '''
630 Returns the name of the currently active (or "default") layout on the workspace
631 specified by Workspace. Note that when a workspace is set to a tiling layout,
632 it is still possible for clients to be floating.
633
634 Workspace may be a workspace index (integer) starting at 0, or a workspace
635 name.
636 '''
637 self._assert_arg_type('Workspace', Workspace, [int, basestring])
638
639 arg_str = self._gribble_arg_str([Workspace])
640 val = self.gribble('GetLayout %s' % arg_str)
641 return self._from_str('GetLayout', val)
642
644 '''
645 Returns the number of active Heads.
646 '''
647
648 arg_str = self._gribble_arg_str([])
649 val = self.gribble('GetNumHeads %s' % arg_str)
650 return self._from_str('GetNumHeads', val)
651
653 '''
654 Returns the number of Heads connected. This number may be greater
655 than the number returned by GetNumHeads.
656 '''
657
658 arg_str = self._gribble_arg_str([])
659 val = self.gribble('GetNumHeadsConnected %s' % arg_str)
660 return self._from_str('GetNumHeadsConnected', val)
661
663 '''
664 Returns the name of the current workspace.
665 '''
666
667 arg_str = self._gribble_arg_str([])
668 val = self.gribble('GetWorkspace %s' % arg_str)
669 return self._from_str('GetWorkspace', val)
670
672 '''
673 Returns the id (the index) of the workspace specified by Workspace.
674
675 Workspace may be a workspace index (integer) starting at 0, or a workspace
676 name.
677 '''
678 self._assert_arg_type('Workspace', Workspace, [int, basestring])
679
680 arg_str = self._gribble_arg_str([Workspace])
681 val = self.gribble('GetWorkspaceId %s' % arg_str)
682 return self._from_str('GetWorkspaceId', val)
683
685 '''
686 Returns a list of all workspaces, in the order that they were added.
687
688 The special "Sticky" workspace is not included.
689 '''
690
691 arg_str = self._gribble_arg_str([])
692 val = self.gribble('GetWorkspaceList %s' % arg_str)
693 return self._from_str('GetWorkspaceList', val)
694
696 '''
697 Returns the name of the "next" workspace. The ordering of workspaces is
698 the order in which they were added. This might cause confusing behavior in
699 multi-head setups, since multiple workspaces can be viewable at one time.
700 '''
701
702 arg_str = self._gribble_arg_str([])
703 val = self.gribble('GetWorkspaceNext %s' % arg_str)
704 return self._from_str('GetWorkspaceNext', val)
705
707 '''
708 Returns the first non-visible workspace starting with Prefix. If the current
709 workspace starts with Prefix, then the first workspace *after* the current
710 workspace starting with Prefix will be returned.
711 '''
712 self._assert_arg_type('Prefix', Prefix, [basestring])
713
714 arg_str = self._gribble_arg_str([Prefix])
715 val = self.gribble('GetWorkspacePrefix %s' % arg_str)
716 return self._from_str('GetWorkspacePrefix', val)
717
719 '''
720 Returns the name of the "previous" workspace. The ordering of workspaces is
721 the order in which they were added. This might cause confusing behavior in
722 multi-head setups, since multiple workspaces can be viewable at one time.
723 '''
724
725 arg_str = self._gribble_arg_str([])
726 val = self.gribble('GetWorkspacePrev %s' % arg_str)
727 return self._from_str('GetWorkspacePrev', val)
728
730 '''
731 Focuses the head indexed at Head. Indexing starts at 0. Heads are ordered
732 by their physical position: left to right and then top to bottom.
733 '''
734 self._assert_arg_type('Head', Head, [int])
735
736 arg_str = self._gribble_arg_str([Head])
737 val = self.gribble('HeadFocus %s' % arg_str)
738 return self._from_str('HeadFocus', val)
739
741 '''
742 Focuses the head indexed at Head, and move the Client specified by client to
743 that head. Indexing of heads starts at 0. Heads are ordered by their physical
744 position: left to right and then top to bottom.
745
746 Client may be the window id or a substring that matches a window name.
747 '''
748 self._assert_arg_type('Head', Head, [int])
749 self._assert_arg_type('Client', Client, [int, basestring])
750
751 arg_str = self._gribble_arg_str([Head, Client])
752 val = self.gribble('HeadFocusWithClient %s' % arg_str)
753 return self._from_str('HeadFocusWithClient', val)
754
756 '''
757 Sets the appropriate flags so that the window specified by Client is
758 hidden from panels and pagers.
759
760 Client may be the window id or a substring that matches a window name.
761 '''
762 self._assert_arg_type('Client', Client, [int, basestring])
763
764 arg_str = self._gribble_arg_str([Client])
765 val = self.gribble('HideClientFromPanels %s' % arg_str)
766 return self._from_str('HideClientFromPanels', val)
767
769 '''
770 Iconifies (minimizes) the window specified by Client. If the window
771 is already iconified, this command has no effect.
772
773 Client may be the window id or a substring that matches a window name.
774 '''
775 self._assert_arg_type('Client', Client, [int, basestring])
776
777 arg_str = self._gribble_arg_str([Client])
778 val = self.gribble('Iconify %s' % arg_str)
779 return self._from_str('Iconify', val)
780
797
799 '''
800 Returns 1 if the "class" part of the WM_CLASS property on the window
801 specified by Client contains the substring specified by Class, and otherwise
802 returns 0. The search is done case insensitively.
803
804 Client may be the window id or a substring that matches a window name.
805 '''
806 self._assert_arg_type('Client', Client, [int, basestring])
807 self._assert_arg_type('Class', Class, [basestring])
808
809 arg_str = self._gribble_arg_str([Client, Class])
810 val = self.gribble('MatchClientClass %s' % arg_str)
811 return self._from_str('MatchClientClass', val)
812
814 '''
815 Returns 1 if the "instance" part of the WM_CLASS property on the window
816 specified by Client contains the substring specified by Instance, and otherwise
817 returns 0. The search is done case insensitively.
818
819 Client may be the window id or a substring that matches a window name.
820 '''
821 self._assert_arg_type('Client', Client, [int, basestring])
822 self._assert_arg_type('Instance', Instance, [basestring])
823
824 arg_str = self._gribble_arg_str([Client, Instance])
825 val = self.gribble('MatchClientInstance %s' % arg_str)
826 return self._from_str('MatchClientInstance', val)
827
829 '''
830 Returns 1 if the window specified by Client is a transient window, and
831 otherwise returns 0. A transient window usually corresponds to some kind of
832 dialog window.
833
834 Client may be the window id or a substring that matches a window name.
835 '''
836 self._assert_arg_type('Client', Client, [int, basestring])
837
838 arg_str = self._gribble_arg_str([Client])
839 val = self.gribble('MatchClientIsTransient %s' % arg_str)
840 return self._from_str('MatchClientIsTransient', val)
841
843 '''
844 Returns 1 if the window specified by Client is mapped or not.
845
846 Client may be the window id or a substring that matches a window name.
847 '''
848 self._assert_arg_type('Client', Client, [int, basestring])
849
850 arg_str = self._gribble_arg_str([Client])
851 val = self.gribble('MatchClientMapped %s' % arg_str)
852 return self._from_str('MatchClientMapped', val)
853
855 '''
856 Returns 1 if the name of the window specified by Client contains the substring
857 specified by Name, and otherwise returns 0. The search is done case
858 insensitively.
859
860 Client may be the window id or a substring that matches a window name.
861 '''
862 self._assert_arg_type('Client', Client, [int, basestring])
863 self._assert_arg_type('Name', Name, [basestring])
864
865 arg_str = self._gribble_arg_str([Client, Name])
866 val = self.gribble('MatchClientName %s' % arg_str)
867 return self._from_str('MatchClientName', val)
868
870 '''
871 Returns 1 if the type of the window specified by Client matches the type
872 named by Type, and otherwise returns 0.
873
874 Valid window types are "Normal", "Dock" or "Desktop".
875
876 Client may be the window id or a substring that matches a window name.
877 '''
878 self._assert_arg_type('Client', Client, [int, basestring])
879 self._assert_arg_type('Type', Type, [basestring])
880
881 arg_str = self._gribble_arg_str([Client, Type])
882 val = self.gribble('MatchClientType %s' % arg_str)
883 return self._from_str('MatchClientType', val)
884
886 '''
887 Maximizes the window specified by Client. If the window is already maximized,
888 this command has no effect.
889
890 Client may be the window id or a substring that matches a window name.
891 '''
892 self._assert_arg_type('Client', Client, [int, basestring])
893
894 arg_str = self._gribble_arg_str([Client])
895 val = self.gribble('Maximize %s' % arg_str)
896 return self._from_str('Maximize', val)
897
899 '''
900 Shows a centered prompt window with the text specified by Text. The message
901 will not disappear until it loses focus or when the confirm or cancel key
902 is pressed.
903 '''
904 self._assert_arg_type('Text', Text, [basestring])
905
906 arg_str = self._gribble_arg_str([Text])
907 val = self.gribble('Message %s' % arg_str)
908 return self._from_str('Message', val)
909
911 '''
912 Initiates a drag that allows a window to be moved with the mouse.
913
914 This is a special command that can only be assigned in Wingo's mouse
915 configuration file. Invoking this command in any other way has no effect.
916 '''
917
918 arg_str = self._gribble_arg_str([])
919 val = self.gribble('MouseMove %s' % arg_str)
920 return self._from_str('MouseMove', val)
921
923 '''
924 Initiates a drag that allows a window to be resized with the mouse.
925
926 Direction specifies how the window should be resized, and what the pointer
927 should look like. For example, if Direction is set to "BottomRight", then only
928 the width and height of the window can change---but not the x or y position.
929
930 Valid values for Direction are: Infer, Top, Bottom, Left, Right, TopLeft,
931 TopRight, BottomLeft and BottomRight. When "Infer" is used, the direction
932 is determined based on where the pointer is on the window when the drag is
933 initiated.
934
935 This is a special command that can only be assigned in Wingo's mouse
936 configuration file. Invoking this command in any other way has no effect.
937 '''
938 self._assert_arg_type('Direction', Direction, [basestring])
939
940 arg_str = self._gribble_arg_str([Direction])
941 val = self.gribble('MouseResize %s' % arg_str)
942 return self._from_str('MouseResize', val)
943
944 - def Move(self, Client, X, Y):
945 '''
946 Moves the window specified by Client to the x and y position specified by
947 X and Y. Note that the origin is located in the top left corner.
948
949 X and Y may either be pixels (integers) or ratios in the range 0.0 to
950 1.0 (specifically, (0.0, 1.0]). Ratios are measured with respect to the
951 window's workspace's geometry.
952
953 Client may be the window id or a substring that matches a window name.
954 '''
955 self._assert_arg_type('Client', Client, [int, basestring])
956 self._assert_arg_type('X', X, [float, int])
957 self._assert_arg_type('Y', Y, [float, int])
958
959 arg_str = self._gribble_arg_str([Client, X, Y])
960 val = self.gribble('Move %s' % arg_str)
961 return self._from_str('Move', val)
962
964 '''
965 Moves the pointer to the x and y position specified by X and Y. Note the the
966 origin is located in the top left corner.
967 '''
968 self._assert_arg_type('X', X, [int])
969 self._assert_arg_type('Y', Y, [int])
970
971 arg_str = self._gribble_arg_str([X, Y])
972 val = self.gribble('MovePointer %s' % arg_str)
973 return self._from_str('MovePointer', val)
974
976 '''
977 Moves the pointer to the x and y position specified by X and Y relative to the
978 current workspace. Note the the origin is located in the top left corner of
979 the current workspace.
980
981 X and Y may either be pixels (integers) or ratios in the range 0.0 to
982 1.0 (specifically, (0.0, 1.0]). Ratios are measured with respect to the
983 workspace's geometry.
984 '''
985 self._assert_arg_type('X', X, [float, int])
986 self._assert_arg_type('Y', Y, [float, int])
987
988 arg_str = self._gribble_arg_str([X, Y])
989 val = self.gribble('MovePointerRelative %s' % arg_str)
990 return self._from_str('MovePointerRelative', val)
991
993 '''
994 Moves the window specified by Client to the x and y position specified by
995 X and Y, relative to its workspace. Note that the origin is located in the top
996 left corner of the client's workspace.
997
998 X and Y may either be pixels (integers) or ratios in the range 0.0 to
999 1.0 (specifically, (0.0, 1.0]). Ratios are measured with respect to the
1000 window's workspace's geometry.
1001
1002 Client may be the window id or a substring that matches a window name.
1003 '''
1004 self._assert_arg_type('Client', Client, [int, basestring])
1005 self._assert_arg_type('X', X, [float, int])
1006 self._assert_arg_type('Y', Y, [float, int])
1007
1008 arg_str = self._gribble_arg_str([Client, X, Y])
1009 val = self.gribble('MoveRelative %s' % arg_str)
1010 return self._from_str('MoveRelative', val)
1011
1012 - def Not(self, Op):
1013 '''
1014 Returns the negation of Op. When Op is 0, Not returns 1. When Op is 1, Not
1015 returns 0.
1016
1017 If Op is not in {0, 1}, then a warning is logged and nil is returned.
1018 '''
1019 self._assert_arg_type('Op', Op, [int])
1020
1021 arg_str = self._gribble_arg_str([Op])
1022 val = self.gribble('Not %s' % arg_str)
1023 return self._from_str('Not', val)
1024
1025 - def Or(self, Op1, Op2):
1026 '''
1027 Returns the logical OR of Op1 and Op2.
1028
1029 If Op1 or Op2 is not in {0, 1}, then a warning is logged and nil is returned.
1030 '''
1031 self._assert_arg_type('Op1', Op1, [int])
1032 self._assert_arg_type('Op2', Op2, [int])
1033
1034 arg_str = self._gribble_arg_str([Op1, Op2])
1035 val = self.gribble('Or %s' % arg_str)
1036 return self._from_str('Or', val)
1037
1039 '''
1040 Stops Wingo.
1041 '''
1042
1043 arg_str = self._gribble_arg_str([])
1044 val = self.gribble('Quit %s' % arg_str)
1045 return self._from_str('Quit', val)
1046
1047 - def Raise(self, Client):
1048 '''
1049 Raises the window specified by Client to the top of its layer.
1050
1051 Client may be the window id or a substring that matches a window name.
1052 '''
1053 self._assert_arg_type('Client', Client, [int, basestring])
1054
1055 arg_str = self._gribble_arg_str([Client])
1056 val = self.gribble('Raise %s' % arg_str)
1057 return self._from_str('Raise', val)
1058
1060 '''
1061 Removes the workspace specified by Workspace. Note that a workspace can *only*
1062 be removed if it is empty (i.e., does not contain any windows).
1063
1064 Workspace may be a workspace index (integer) starting at 0, or a workspace
1065 name.
1066 '''
1067 self._assert_arg_type('Workspace', Workspace, [int, basestring])
1068
1069 arg_str = self._gribble_arg_str([Workspace])
1070 val = self.gribble('RemoveWorkspace %s' % arg_str)
1071 return self._from_str('RemoveWorkspace', val)
1072
1074 '''
1075 Renames the workspace specified by Workspace to the name in NewName.
1076
1077 Workspace may be a workspace index (integer) starting at 0, or a workspace
1078 name.
1079 NewName can only be a string.
1080 '''
1081 self._assert_arg_type('Workspace', Workspace, [int, basestring])
1082 self._assert_arg_type('NewName', NewName, [basestring])
1083
1084 arg_str = self._gribble_arg_str([Workspace, NewName])
1085 val = self.gribble('RenameWorkspace %s' % arg_str)
1086 return self._from_str('RenameWorkspace', val)
1087
1088 - def Resize(self, Client, Width, Height):
1089 '''
1090 Resizes the window specified by Client to some width and height specified by
1091 Width and Height.
1092
1093 Width and Height may either be pixels (integers) or ratios in the range 0.0 to
1094 1.0 (specifically, (0.0, 1.0]). Ratios are measured with respect to the
1095 window's workspace's geometry.
1096
1097 Client may be the window id or a substring that matches a window name.
1098 '''
1099 self._assert_arg_type('Client', Client, [int, basestring])
1100 self._assert_arg_type('Width', Width, [float, int])
1101 self._assert_arg_type('Height', Height, [float, int])
1102
1103 arg_str = self._gribble_arg_str([Client, Width, Height])
1104 val = self.gribble('Resize %s' % arg_str)
1105 return self._from_str('Resize', val)
1106
1108 '''
1109 Restarts Wingo in place using exec. This should be used to reload Wingo
1110 after you've made changes to its configuration.
1111 '''
1112
1113 arg_str = self._gribble_arg_str([])
1114 val = self.gribble('Restart %s' % arg_str)
1115 return self._from_str('Restart', val)
1116
1118 '''
1119 Executes a script in $XDG_CONFIG_HOME/wingo/scripts. The command
1120 may include arguments.
1121 '''
1122 self._assert_arg_type('Command', Command, [basestring])
1123
1124 arg_str = self._gribble_arg_str([Command])
1125 val = self.gribble('Script %s' % arg_str)
1126 return self._from_str('Script', val)
1127
1128 - def SelectClient(self, TabCompletion, OnlyActiveWorkspace, OnlyVisible, ShowIconified):
1129 '''
1130 Shows a centered prompt window with a list of clients satisfying the arguments
1131 provided.
1132
1133 OnlyActiveWorkspace specifies that only clients on the current workspace should
1134 be listed. Valid values are "yes" or "no".
1135
1136 OnlyVisible specifies that only clients on visible workspaces should be listed.
1137 Valid values are "yes" or "no".
1138
1139 ShowIconified specifies that iconified clients will be shown. Valid values are
1140 "yes" or "no".
1141
1142 TabCompletetion can be set to either "Prefix", "Any" or "Multiple". When it's
1143 set to "Prefix", the clients can be searched by a prefix matching string. When
1144 it's set to "Any", the clients can be searched by a substring matching string.
1145 When it's set to "Multiple", the clients can be searched by multiple space-
1146 separated substring matching strings.
1147
1148 This command may be used as a sub-command to pass a particular client to
1149 another command.
1150 '''
1151 self._assert_arg_type('TabCompletion', TabCompletion, [basestring])
1152 self._assert_arg_type('OnlyActiveWorkspace', OnlyActiveWorkspace, [basestring])
1153 self._assert_arg_type('OnlyVisible', OnlyVisible, [basestring])
1154 self._assert_arg_type('ShowIconified', ShowIconified, [basestring])
1155
1156 arg_str = self._gribble_arg_str([TabCompletion, OnlyActiveWorkspace, OnlyVisible, ShowIconified])
1157 val = self.gribble('SelectClient %s' % arg_str)
1158 return self._from_str('SelectClient', val)
1159
1161 '''
1162 Shows a centered prompt window with a list of all workspaces.
1163
1164 TabCompletetion can be set to either "Prefix", "Any" or "Multiple". When it's
1165 set to "Prefix", the clients can be searched by a prefix matching string. When
1166 it's set to "Any", the clients can be searched by a substring matching string.
1167 When it's set to "Multiple", the clients can be searched by multiple space-
1168 separated substring matching strings.
1169
1170 This command may be used as a sub-command to pass a particular workspace to
1171 another command.
1172 '''
1173 self._assert_arg_type('TabCompletion', TabCompletion, [basestring])
1174
1175 arg_str = self._gribble_arg_str([TabCompletion])
1176 val = self.gribble('SelectWorkspace %s' % arg_str)
1177 return self._from_str('SelectWorkspace', val)
1178
1180 '''
1181 Sets the current layout of the workspace specified by Workspace to the layout
1182 named by Name. If a layout with name Name does not exist, this command has
1183 no effect.
1184
1185 Note that this command has no effect if the workspace is not visible.
1186
1187 Workspace may be a workspace index (integer) starting at 0, or a workspace
1188 name.
1189 '''
1190 self._assert_arg_type('Workspace', Workspace, [int, basestring])
1191 self._assert_arg_type('Name', Name, [basestring])
1192
1193 arg_str = self._gribble_arg_str([Workspace, Name])
1194 val = self.gribble('SetLayout %s' % arg_str)
1195 return self._from_str('SetLayout', val)
1196
1198 '''
1199 Sets the opacity of the window specified by Client to the opacity level
1200 specified by Opacity.
1201
1202 This command won't have any effect unless you're running a compositing manager
1203 like compton or cairo-compmgr.
1204
1205 Client may be the window id or a substring that matches a window name.
1206
1207 Opacity should be a float in the range 0.0 to 1.0, inclusive, where 0.0 is
1208 completely transparent and 1.0 is completely opaque.
1209 '''
1210 self._assert_arg_type('Client', Client, [int, basestring])
1211 self._assert_arg_type('Opacity', Opacity, [float])
1212
1213 arg_str = self._gribble_arg_str([Client, Opacity])
1214 val = self.gribble('SetOpacity %s' % arg_str)
1215 return self._from_str('SetOpacity', val)
1216
1217 - def Shell(self, Command):
1218 '''
1219 Attempts to execute the shell command specified by Command. If an error occurs,
1220 it will be logged to Wingo's stderr.
1221 '''
1222 self._assert_arg_type('Command', Command, [basestring])
1223
1224 arg_str = self._gribble_arg_str([Command])
1225 val = self.gribble('Shell %s' % arg_str)
1226 return self._from_str('Shell', val)
1227
1229 '''
1230 Sets the appropriate flags so that the window specified by Client is
1231 shown on panels and pagers.
1232
1233 Client may be the window id or a substring that matches a window name.
1234 '''
1235 self._assert_arg_type('Client', Client, [int, basestring])
1236
1237 arg_str = self._gribble_arg_str([Client])
1238 val = self.gribble('ShowClientInPanels %s' % arg_str)
1239 return self._from_str('ShowClientInPanels', val)
1240
1241 - def TagGet(self, Client, Name):
1242 '''
1243 Retrieves the tag with name Name for the client specified by Client.
1244
1245 Client may be the window id or a substring that matches a window name.
1246
1247 Tag names may only contain the following characters: [-a-zA-Z0-9_].
1248 '''
1249 self._assert_arg_type('Client', Client, [int, basestring])
1250 self._assert_arg_type('Name', Name, [basestring])
1251
1252 arg_str = self._gribble_arg_str([Client, Name])
1253 val = self.gribble('TagGet %s' % arg_str)
1254 return self._from_str('TagGet', val)
1255
1271
1273 '''
1274 Toggles whether the window specified by Client should be forced into the
1275 floating layout. A window forced into the floating layout CANNOT be tiled.
1276
1277 Client may be the window id or a substring that matches a window name.
1278 '''
1279 self._assert_arg_type('Client', Client, [int, basestring])
1280
1281 arg_str = self._gribble_arg_str([Client])
1282 val = self.gribble('ToggleFloating %s' % arg_str)
1283 return self._from_str('ToggleFloating', val)
1284
1286 '''
1287 Iconifies (minimizes) or deiconifies (unminimizes) the window specified by
1288 Client.
1289
1290 Client may be the window id or a substring that matches a window name.
1291 '''
1292 self._assert_arg_type('Client', Client, [int, basestring])
1293
1294 arg_str = self._gribble_arg_str([Client])
1295 val = self.gribble('ToggleIconify %s' % arg_str)
1296 return self._from_str('ToggleIconify', val)
1297
1299 '''
1300 Maximizes or restores the window specified by Client.
1301
1302 Client may be the window id or a substring that matches a window name.
1303 '''
1304 self._assert_arg_type('Client', Client, [int, basestring])
1305
1306 arg_str = self._gribble_arg_str([Client])
1307 val = self.gribble('ToggleMaximize %s' % arg_str)
1308 return self._from_str('ToggleMaximize', val)
1309
1311 '''
1312 Toggles the layer of the window specified by Client from normal to above. When
1313 a window is in the "above" layer, it will always be above other (normal)
1314 clients.
1315
1316 Client may be the window id or a substring that matches a window name.
1317 '''
1318 self._assert_arg_type('Client', Client, [int, basestring])
1319
1320 arg_str = self._gribble_arg_str([Client])
1321 val = self.gribble('ToggleStackAbove %s' % arg_str)
1322 return self._from_str('ToggleStackAbove', val)
1323
1325 '''
1326 Toggles the layer of the window specified by Client from normal to below. When
1327 a window is in the "below" layer, it will always be below other (normal)
1328 clients.
1329
1330 Client may be the window id or a substring that matches a window name.
1331 '''
1332 self._assert_arg_type('Client', Client, [int, basestring])
1333
1334 arg_str = self._gribble_arg_str([Client])
1335 val = self.gribble('ToggleStackBelow %s' % arg_str)
1336 return self._from_str('ToggleStackBelow', val)
1337
1339 '''
1340 Toggles the sticky status of the window specified by Client. When a window is
1341 sticky, it will always be visible unless iconified. (i.e., it does not belong
1342 to any particular workspace.)
1343
1344 Client may be the window id or a substring that matches a window name.
1345 '''
1346 self._assert_arg_type('Client', Client, [int, basestring])
1347
1348 arg_str = self._gribble_arg_str([Client])
1349 val = self.gribble('ToggleSticky %s' % arg_str)
1350 return self._from_str('ToggleSticky', val)
1351
1353 '''
1354 Always returns 1.
1355 '''
1356
1357 arg_str = self._gribble_arg_str([])
1358 val = self.gribble('True %s' % arg_str)
1359 return self._from_str('True', val)
1360
1362 '''
1363 Unfloats the window specified by Client. If the window is not floating,
1364 this command has no effect.
1365
1366 Client may be the window id or a substring that matches a window name.
1367 '''
1368 self._assert_arg_type('Client', Client, [int, basestring])
1369
1370 arg_str = self._gribble_arg_str([Client])
1371 val = self.gribble('Unfloat %s' % arg_str)
1372 return self._from_str('Unfloat', val)
1373
1375 '''
1376 Unmaximizes the window specified by Client. If the window is not maximized,
1377 this command has no effect.
1378
1379 Client may be the window id or a substring that matches a window name.
1380 '''
1381 self._assert_arg_type('Client', Client, [int, basestring])
1382
1383 arg_str = self._gribble_arg_str([Client])
1384 val = self.gribble('Unmaximize %s' % arg_str)
1385 return self._from_str('Unmaximize', val)
1386
1388 '''
1389 Executes a series of Wingo commands specified by Commands. If an error occurs
1390 while executing the command, it will be shown in a popup message.
1391 '''
1392 self._assert_arg_type('Commands', Commands, [basestring])
1393
1394 arg_str = self._gribble_arg_str([Commands])
1395 val = self.gribble('WingoExec %s' % arg_str)
1396 return self._from_str('WingoExec', val)
1397
1399 '''
1400 Shows the usage information for a particular command specified by CommandName.
1401 '''
1402 self._assert_arg_type('CommandName', CommandName, [basestring])
1403
1404 arg_str = self._gribble_arg_str([CommandName])
1405 val = self.gribble('WingoHelp %s' % arg_str)
1406 return self._from_str('WingoHelp', val)
1407
1409 '''
1410 Sets the current workspace to the one specified by Workspace.
1411
1412 Workspace may be a workspace index (integer) starting at 0, or a workspace
1413 name.
1414 '''
1415 self._assert_arg_type('Workspace', Workspace, [int, basestring])
1416
1417 arg_str = self._gribble_arg_str([Workspace])
1418 val = self.gribble('Workspace %s' % arg_str)
1419 return self._from_str('Workspace', val)
1420
1422 '''
1423 Sets the current workspace to the one specified by Workspace in a greedy
1424 fashion.
1425
1426 A greedy switch *always* brings the specified workspace to the
1427 currently focused head. (N.B. Greedy is only different when switching between
1428 two visible workspaces.)
1429
1430 Workspace may be a workspace index (integer) starting at 0, or a workspace
1431 name.
1432 '''
1433 self._assert_arg_type('Workspace', Workspace, [int, basestring])
1434
1435 arg_str = self._gribble_arg_str([Workspace])
1436 val = self.gribble('WorkspaceGreedy %s' % arg_str)
1437 return self._from_str('WorkspaceGreedy', val)
1438
1440 '''
1441 Sets the current workspace to the workspace specified by Workspace in a greedy
1442 fashion, and moves the window specified by Client to that workspace.
1443
1444 A greedy switch *always* brings the specified workspace to the
1445 currently focused head. (N.B. Greedy is only different when switching between
1446 two visible workspaces.)
1447
1448 Workspace may be a workspace index (integer) starting at 0, or a workspace
1449 name.
1450
1451 Client may be the window id or a substring that matches a window name.
1452 '''
1453 self._assert_arg_type('Workspace', Workspace, [int, basestring])
1454 self._assert_arg_type('Client', Client, [int, basestring])
1455
1456 arg_str = self._gribble_arg_str([Workspace, Client])
1457 val = self.gribble('WorkspaceGreedyWithClient %s' % arg_str)
1458 return self._from_str('WorkspaceGreedyWithClient', val)
1459
1461 '''
1462 Retrieves the head index of the workspace specified by Workspace. If the
1463 workspace is not visible, then -1 is returned.
1464
1465 Head indexing starts at 0. Heads are ordered by their physical position: left
1466 to right and then top to bottom.
1467
1468 Workspace may be a workspace index (integer) starting at 0, or a workspace
1469 name.
1470 '''
1471 self._assert_arg_type('Workspace', Workspace, [int, basestring])
1472
1473 arg_str = self._gribble_arg_str([Workspace])
1474 val = self.gribble('WorkspaceHead %s' % arg_str)
1475 return self._from_str('WorkspaceHead', val)
1476
1478 '''
1479 Sends the window specified by Client to the workspace specified by Workspace.
1480
1481 Workspace may be a workspace index (integer) starting at 0, or a workspace
1482 name.
1483
1484 Client may be the window id or a substring that matches a window name.
1485 '''
1486 self._assert_arg_type('Workspace', Workspace, [int, basestring])
1487 self._assert_arg_type('Client', Client, [int, basestring])
1488
1489 arg_str = self._gribble_arg_str([Workspace, Client])
1490 val = self.gribble('WorkspaceSendClient %s' % arg_str)
1491 return self._from_str('WorkspaceSendClient', val)
1492
1494 '''
1495 Sets the workspace specified by Workspace to appear on the head specified by
1496 the Head index.
1497
1498 Workspace may be a workspace index (integer) starting at 0, or a workspace
1499 name.
1500
1501 Head indexing starts at 0. Heads are ordered by their physical position: left
1502 to right and then top to bottom.
1503 '''
1504 self._assert_arg_type('Head', Head, [int])
1505 self._assert_arg_type('Workspace', Workspace, [int, basestring])
1506
1507 arg_str = self._gribble_arg_str([Head, Workspace])
1508 val = self.gribble('WorkspaceToHead %s' % arg_str)
1509 return self._from_str('WorkspaceToHead', val)
1510
1512 '''
1513 Sets the current workspace to the workspace specified by Workspace, and moves
1514 the window specified by Client to that workspace.
1515
1516 Workspace may be a workspace index (integer) starting at 0, or a workspace
1517 name.
1518
1519 Client may be the window id or a substring that matches a window name.
1520 '''
1521 self._assert_arg_type('Workspace', Workspace, [int, basestring])
1522 self._assert_arg_type('Client', Client, [int, basestring])
1523
1524 arg_str = self._gribble_arg_str([Workspace, Client])
1525 val = self.gribble('WorkspaceWithClient %s' % arg_str)
1526 return self._from_str('WorkspaceWithClient', val)
1527