summaryrefslogtreecommitdiff
blob: f7ec7f7d271033338d80d5d3c65bc65f3056c02b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Built-ins
=========

Types:
 - "string": A string.
 - 1, 2, 3: Integers
 - #t, #f: Booleans.

Boolean operations:
 - (and bool*) -> bool: perform a boolean AND of boolean values
 - (or bool*) -> bool: perform a boolean OR of boolean values

Addition, substraction:
 - (+ int*) -> int: add integers
 - (+ string*) -> string: concat strings
 - (- int int*) -> int: subtract integers from the first
 
Types casting:
 - (cast-int string|int|bool) -> int: cast to an integer value
 - (cast-string string|int|bool) -> string: cast to an string value

Comparison operators:
 - (<|>|= int int) -> bool: compare two integers
 - (<|>|= string string) -> bool: compare two strings

Function flow:
 - (if bool func) -> type: execute a function if the condition holds
 - (if bool func func) -> type: choose what function to execute depending on the
   condition
 - (begin func func*) -> type: execute a sequence of functions, and return the
   result of the last one


Logical operations
==================

This are predicates you can use to test strings, for instance in "if"
conditions.

 - (is string string) -> bool: return #t if the two strings are the same
   Example:  (if (is (application_name) "XMMS") ...)
 - (contains string string) -> bool: return #t if the second string is a
   substring of the first one.
   Example: (if (contains (application_name) "term") ...)
 - (matches string string) -> bool: return #t if the second string is a regular
   expression matching the first one.
   Example: (if (matches (window_name) "^Character.+") ...)


Matchers
========

Matchers are functions which return informations about windows. You can for
instance use them in "if" condition to match some particular windows.

 - (window_name) -> string: return the title of the current window
 - (application_name) -> string: return the application name of the current
   window, as determined by libwnck
 - (window_role) -> string: return the role of the current window, as determined
   by the WM_WINDOW_ROLE hint
 - (window_class) -> string: return the class of the current window


Actions
=======

Actions are the functions you can use to change some window properties.
All actions return booleans (TRUE on success, FALSE on failure).

  - (debug): debugging function - print informations about current window
  - (print args*): print all arguments
  - (geometry string): set size and/or position of a window. Examples: 
       (if ... (geometry "600x600"))
       (if ... (geometry "+200+200"))
       (if ... (geometry "600x600+200+200"))
  - (fullscreen): make the current window fullscreen
  - (focus): focus the current window
  - (center): center position of current window
  - (maximize): maximize the current window
  - (maximize_vertically): maximize the current window vertically
  - (maximize_horizontally): maximize the current window horizontally
  - (minimize): minimize the current window
  - (shade): shade ("roll up") the current window
  - (unshade): unshade ("roll down") the current window
  - (close): close the current window
  - (pin): pin the current window to all workspaces
  - (unpin): unpin the current window from all workspaces
  - (set_workspace int): move the window to a specific workspace number,
    counting from 1
  - (skip_pager): remove the current window from the pager
  - (skip_tasklist): remove the current window from the window list
  - (above): set the current window to be above all normal windows
  - (below): set the current window to be below all normal windows
  - (undecorate): remove the window manager decorations from the current window
  - (wintype string): set the window type of the current window. Accepted values
    are: "normal", "dialog", "menu", "toolbar", "splashscreen", "utility",
    "dock" and "desktop".