Skip to content

Commit d07fe42

Browse files
committedSep 1, 2024·
update doc
1 parent c78fe28 commit d07fe42

File tree

11 files changed

+316
-86
lines changed

11 files changed

+316
-86
lines changed
 

‎data/doc/4.widgets/0.button.md

+20-7
Original file line numberDiff line numberDiff line change
@@ -44,37 +44,47 @@ const `btn`
4444

4545
Support relative value, **_but don't recommend using relative value for this property_**.
4646

47+
_Type: `int | string`_
48+
4749
## `height*`
4850

4951
Length of the button.
5052

51-
Support relative value, **_but don't recommend using relative value for this property_**.
53+
Support relative value.
54+
55+
_Type: `int | string`_
5256

5357
## `frame_rate`
5458

5559
Frame rate per second, won't hurt if over screen refresh rate.
5660

57-
Default: `60`
61+
_Type: `int`_
62+
_Default: `60`_
5863

5964
## `transition_duration`
6065

61-
Time cost of showing the widget from the edge. millisecond.
66+
Time cost of showing the widget from the edge.
67+
Millisecond.
6268

63-
Default: `100`
69+
_Type: `int`_
70+
_Default: `100`_
6471

6572
## `extra_trigger_size`
6673

6774
Extra mouse event input region of the widget, if `0` then the widget won't be shown by mouse hover.
6875

69-
Default: `5`
76+
_Type: `int | string`_
77+
_Default: `5`_
7078

7179
## `color`
7280

73-
Color of the button, support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
81+
Color of the button.
7482

83+
Support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
7584
For full info, check [RGBA](https://gtk-rs.org/gtk4-rs/stable/latest/docs/src/gdk4/rgba.rs.html#205)
7685

77-
Default: `#7B98FF`
86+
_Type: `string`_
87+
_Default: `#7B98FF`_
7888

7989
## `event_map`
8090

@@ -89,3 +99,6 @@ Default mouse keys:
8999
- `2` - Middle button
90100
- `3` - Right button
91101
- ...others you need to test on your self by passing `--mouse-debug`: `way-edges daemon --mouse-debug`
102+
103+
_Type: `[[int, string]...]`_
104+
_Default: `[]`_

‎data/doc/4.widgets/1.slide.md

+56-25
Original file line numberDiff line numberDiff line change
@@ -32,33 +32,41 @@ const `slide`
3232

3333
## `width*`
3434

35-
**\*Thickness\*** of the widget, from screen edge to the screen center.
35+
**\*Thickness\*** of the button, from screen edge to the screen center.
3636

3737
Support relative value, **_but don't recommend using relative value for this property_**.
3838

39+
_Type: `int | string`_
40+
3941
## `height*`
4042

41-
Length of the widget.
43+
Length of the button.
4244

43-
Support relative value, **_but don't recommend using relative value for this property_**.
45+
Support relative value.
46+
47+
_Type: `int | string`_
4448

4549
## `frame_rate`
4650

4751
Frame rate per second, won't hurt if over screen refresh rate.
4852

49-
Default: `60`
53+
_Type: `int`_
54+
_Default: `60`_
5055

5156
## `transition_duration`
5257

53-
Time cost of showing the widget from the edge. millisecond.
58+
Time cost of showing the widget from the edge.
59+
Millisecond.
5460

55-
Default: `100`
61+
_Type: `int`_
62+
_Default: `100`_
5663

5764
## `extra_trigger_size`
5865

5966
Extra mouse event input region of the widget, if `0` then the widget won't be shown by mouse hover.
6067

61-
Default: `5`
68+
_Type: `int | string`_
69+
_Default: `5`_
6270

6371
## `event_map`
6472

@@ -74,85 +82,108 @@ Default mouse keys:
7482
- `3` - Right button
7583
- ...others you need to test on your self by passing `--mouse-debug`: `way-edges daemon --mouse-debug`
7684

85+
_Type: `[[int, string]...]`_
86+
_Default: `[]`_
87+
7788
## `on_change`
7889

79-
Command to execute, replace '{progress}' with the progress from 0-1.
90+
Command to execute, replace '{progress}' with the progress from 0-1.
91+
Example: `notify-send {progress}`
8092

81-
Default: empty string
93+
_Type: `null | string`_
94+
_Default: `null`_
8295

8396
## `draggable`
8497

8598
Is progress in slide changeable by mouse left click drag.
8699

87-
Default: `true`
100+
_Type: `bool`_
101+
_Default: `true`_
88102

89103
## `update_with_interval_ms`
90104

91105
Array of tuples. each tuple contains `millisecond` and `shell command`:
92-
`[<millisecond>, <shell_command>]`
106+
`[<millisecond>, <shell_command>]`
107+
Example: `[1000, \"echo 0.2333\"]`
93108

94109
For `shell command`, the returned value must be a number within `[0, 1]`.
95110

96-
Example: `[1000, \"echo 0.2333\"]`
111+
_Type: `[[int, string]...]`_
112+
_Default: `[]`_
97113

98114
## `bg_color`
99115

100-
Color of the background of widget, support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
116+
Color of the background of widget.
101117

118+
Support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
102119
For full info, check [RGBA](https://gtk-rs.org/gtk4-rs/stable/latest/docs/src/gdk4/rgba.rs.html#205)
103120

104-
Default: `#808080`
121+
_Type: `string`_
122+
_Default: `#808080`_
105123

106124
## `fg_color`
107125

108-
Color of the foreground of widget, support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
126+
Color of the foreground of widget.
109127

128+
Support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
110129
For full info, check [RGBA](https://gtk-rs.org/gtk4-rs/stable/latest/docs/src/gdk4/rgba.rs.html#205)
111130

112-
Default: `#FFB847`
131+
_Type: `string`_
132+
_Default: `#FFB847`_
113133

114134
## `border_color`
115135

116-
Color of the border of widget, support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
136+
Color of the border of widget.
117137

138+
Support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
118139
For full info, check [RGBA](https://gtk-rs.org/gtk4-rs/stable/latest/docs/src/gdk4/rgba.rs.html#205)
119140

120-
Default: `#646464`
141+
_Type: `string`_
142+
_Default: `#646464`_
121143

122144
## `text_color`
123145

124-
Color of the text of widget, support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
146+
Color of the text of widget.
147+
148+
For full info, check [RGBA](https://gtk-rs.org/gtk4-rs/stable/latest/docs/src/gdk4/rgba.rs.html#205)
125149

150+
Support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
126151
For full info, check [RGBA](https://gtk-rs.org/gtk4-rs/stable/latest/docs/src/gdk4/rgba.rs.html#205)
127152

128-
Default: `#000000`
153+
_Type: `string`_
154+
_Default: `#000000`_
129155

130156
## `preview_size`
131157

132158
How much area should the widget reveal when hidden
133159

134-
Default: `3`
160+
_Type: `int`_
161+
_Default: `3`_
135162

136163
## `progress_direction`
137164

138165
Progress bar: `Forward/Backward`
139166

140-
Default: `Forward`
167+
_Type: `string`_
168+
_Default: `Forward`_
141169

142170
## `is_text_position_start`
143171

144172
Which side percentage info at, start or end of the widget
145173

146-
Default: `true`
174+
_Type: `bool`_
175+
_Default: `true`_
147176

148177
## `obtuse_angle`
149178

150179
The 2 obtuse angle in trapezoid, set it within `[90, 180)`, when `90`, you'll get a square.
151180

152-
Default: `120`
181+
_Type: `int`_
182+
_Default: `120`_
153183

154184
## `radius`
155185

156186
Radius of the rounded corners for 2 obtuse angle in trapezoid.
157187

158-
Default: `20`
188+
_Type: `int`_
189+
_Default: `20`_

‎data/doc/4.widgets/2.speaker.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,25 @@ const `speaker`
3737

3838
## `device`
3939

40-
Device description for sink or source. you can find it with `pamixer --list-sinks/--list-sources` at the end of each line
40+
Device description for sink or source. you can find it with `pamixer --list-sinks/--list-sources` at the end of each line.
41+
Provide `null` to use default sink.
4142

42-
Default: `empty` to use default sink or source
43+
_Type: `null | string`_
44+
_Default: `null`_
4345

4446
## `mute_color`
4547

46-
Color of the foreground when muted, support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
48+
Color of the foreground when muted.
4749

50+
Support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
4851
For full info, check [RGBA](https://gtk-rs.org/gtk4-rs/stable/latest/docs/src/gdk4/rgba.rs.html#205)
4952

50-
Default: `#000000`
53+
_Type: `string`_
54+
_Default: `#000000`_
5155

5256
## `redraw_only_on_pa_change`
5357

5458
Drag slider won't affect progress immediately. Send the changed value first and redraw after `PulseAudio` sink or source info changes
5559

56-
Default: `false`
60+
_Type: `bool`_
61+
_Default: `false`_

‎data/doc/4.widgets/3.microphone.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,25 @@ const `microphone`
3838

3939
## `device`
4040

41-
Device description for sink or source. you can find it with `pamixer --list-sinks/--list-sources` at the end of each line
41+
Device description for sink or source. you can find it with `pamixer --list-sinks/--list-sources` at the end of each line.
42+
Provide `null` to use default source.
4243

43-
Default: `empty` to use default sink or source
44+
_Type: `null | string`_
45+
_Default: `null`_
4446

4547
## `mute_color`
4648

47-
Color of the foreground when muted, support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
49+
Color of the foreground when muted.
4850

51+
Support: `#rgb`/`#rrggbb`/`#rrrgggbbb`/`rgb(r, g, b)`/`rgba(r, g, b, a)`...
4952
For full info, check [RGBA](https://gtk-rs.org/gtk4-rs/stable/latest/docs/src/gdk4/rgba.rs.html#205)
5053

51-
Default: `#000000`
54+
_Type: `string`_
55+
_Default: `#000000`_
5256

5357
## `redraw_only_on_pa_change`
5458

5559
Drag slider won't affect progress immediately. Send the changed value first and redraw after `PulseAudio` sink or source info changes
5660

57-
Default: `false`
61+
_Type: `bool`_
62+
_Default: `false`_

‎data/doc/4.widgets/4.backlight.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ const `backlight`
3434

3535
## `device_name`
3636

37-
Hardware name, you can find it under `/sys/class/backlight`.
37+
Hardware name, you can find it under `/sys/class/backlight`.
38+
Provide `null` to use default from `org.freedesktop.login1.Session`.
3839

39-
Default: `empty` to use default from `org.freedesktop.login1.Session`
40+
_Type: `null | string`_
41+
_Default: `null`_
4042

41-
## `redraw_only_on_change`
43+
## `redraw_only_on_pa_change`
4244

43-
Drag slider won't affect progress immediately. Send the changed value first and redraw after `Backlight` changes
45+
Drag slider won't affect progress immediately. Send the changed value first and redraw after `Backlight`.
4446

45-
Default: `false`
47+
_Type: `bool`_
48+
_Default: `false`_

0 commit comments

Comments
 (0)
Please sign in to comment.