Debian Codegraph @

modules/FvwmScript/Scripts/FvwmScript-BellSetup

raw
1 UseGettext
2 WindowLocaleTitle {Bell Setup}
3 WindowSize 410 190 # Size
4 Font "xft:monospace:pixelsize=11;"
5
6 Init
7 Begin
8 WarpPointer 2
9
10 For $i=3 To 7 Do
11 Begin
12 Do {Exec xcalc &}
13 End
14
15 Set $FILE=(GetScriptArgument 1)
16 If $FILE=={} Then
17 Set $FILE={.xinitrc-fvwm}
18
19 Set $pos=0
20 Set $finish=1
21 While $finish=={1} Do
22 Begin
23 Set $pos=(Add $pos 1)
24 Set $tmp=(GetOutput {xset -q} $pos 1)
25 If $tmp=={bell} Then
26 Set $finish=0
27 If $pos=={50} Then
28 Set $finish=0
29 End
30 If $pos=={50} Then
31 Begin
32 Do {Exec sh -c "echo 'BellSetup: uncompatible xset'"}
33 Quit
34 End
35 Set $SAVEDVOL=(GetOutput {xset -q} $pos 3)
36 Set $SAVEDPITCH=(GetOutput {xset -q} $pos 6)
37 Set $SAVEDDURA=(GetOutput {xset -q} $pos 9)
38 ChangeValue 4 $SAVEDVOL
39 ChangeTitle 6 $SAVEDPITCH
40 ChangeTitle 8 $SAVEDDURA
41 End
42
43 Widget 1
44 Property
45 Size 85 20
46 Position 115 150
47 Flags NoReliefString
48 Type PushButton
49 LocaleTitle {Apply}
50 Main
51 Case message of
52 SingleClic :
53 Begin
54 Do {Exec xset b } (GetValue 4) { } (GetTitle 6) { } (GetTitle 8)
55 Set $SAVEDVOL=(GetValue 4)
56 Set $SAVEDPITCH=(GetTitle 6)
57 Set $SAVEDDURA=(GetTitle 8)
58 End
59 End
60
61 Widget 2
62 Property
63 Size 85 20
64 Position 210 150
65 Flags NoReliefString
66 Type PushButton
67 LocaleTitle {Save}
68 Main
69 Case message of
70 SingleClic :
71 Begin
72 Do {Exec xset b } (GetValue 4) { } (GetTitle 6) { } (GetTitle 8)
73 WriteToFile $FILE {xset b } (GetValue 4) { } (GetTitle 6) { } (GetTitle 8)
74 Do {Exec chmod +x ~/} $FILE
75 #Quit
76 End
77 End
78
79 Widget 3
80 Property
81 Size 85 20
82 Position 305 150
83 Flags NoReliefString
84 Type PushButton
85 LocaleTitle {Quit}
86 Main
87 Case message of
88 SingleClic :
89 Begin
90 Quit
91 End
92 End
93
94 Widget 12
95 Property
96 Size 85 20
97 Position 20 150
98 Flags NoReliefString
99 Type PushButton
100 LocaleTitle {Beep}
101 Main
102 Case message of
103 SingleClic :
104 Begin
105 Set $HOP={xset b } (GetValue 4) { } (GetTitle 6) { } (GetTitle 8)
106 Do {Exec } $HOP
107 # wait
108 Set $dum=(GetOutput $HOP 1 -1)
109 Do {Beep}
110 Do {Exec xset b } $SAVEDVOL { } $SAVEDPITCH { } $SAVEDDURA
111 End
112 End
113
114 Widget 4
115 Property
116 Size 250 1
117 Position 120 20
118 Flags NoReliefString
119 Type HScrollBar
120 MinValue 0
121 MaxValue 100
122 Value 0
123 Main
124 Case message of
125 SingleClic :
126 Begin
127 End
128 End
129
130 Widget 5
131 Property
132 Position 20 43
133 Flags NoReliefString NoFocus
134 Type ItemDraw
135 LocaleTitle {Volume:}
136 Main
137 Case message of
138 SingleClic :
139 Begin
140 End
141 End
142
143 Widget 6
144 Property
145 Size 60 1
146 Position 120 90
147 Flags NoReliefString
148 Type TextField
149 Main
150 Case message of
151 SingleClic :
152 Begin
153 End
154 End
155
156 Widget 7
157 Property
158 Position 20 95
159 Flags NoReliefString NoFocus
160 Type ItemDraw
161 LocaleTitle {Pitch(Hz):}
162 Main
163 Case message of
164 SingleClic :
165 Begin
166 End
167 End
168
169 Widget 8
170 Property
171 Size 60 1
172 Position 310 90
173 Flags NoReliefString
174 Type TextField
175 Main
176 Case message of
177 SingleClic :
178 Begin
179 End
180 End
181
182 Widget 9
183 Property
184 Position 220 95
185 Flags NoReliefString NoFocus
186 Type ItemDraw
187 LocaleTitle {Duration(ms):}
188 Main
189 Case message of
190 SingleClic :
191 Begin
192 End
193 End
194
195 Widget 10
196 Property
197 Size 390 130
198 Position 10 10
199 Type Rectangle
200 Main
201 Case message of
202 SingleClic :
203 Begin
204 End
205 End
206
207 Widget 11
208 Property
209 Position 15 3
210 Flags NoReliefString NoFocus
211 Type ItemDraw
212 LocaleTitle {Bell}
213 Main
214 Case message of
215 SingleClic :
216 Begin
217 End
218 End
219
220
221
222
223
224
225
226
227
228