cvsimport
[fvwm.git] / modules / FvwmScript / Scripts / FvwmScript-KeyboardSetup
blobbceadf87f489c9e59c0aa22441bd8250ddc8b741
1 UseGettext
2 WindowLocaleTitle {Keyboard Setup}
3 WindowSize 365 265              # Taille
4 Font "xft:monospace:pixelsize=11;"
6 Init
7  Begin
8   WarpPointer 2
9   Set $FILE=(GetScriptArgument 1)
10   If $FILE=={} Then
11    Set $FILE={.xinitrc-fvwm}
13   Set $pos=0
14   Set $finish=1
15   While $finish=={1} Do
16   Begin
17     Set $pos=(Add $pos 1)
18     Set $tmp=(GetOutput {xset -q} $pos 1)
19     If $tmp=={auto} Then
20       Set $finish=0
21     If $pos=={50} Then
22       Set $finish=0
23   End
24   If $pos=={50} Then
25   Begin
26    Do {Exec sh -c "echo 'KeyboardSetup: uncompatible xset'"}
27    Quit
28   End
29   ChangeValue 4 (GetOutput  {xset -q} $pos 7)
30   If (GetOutput  {xset -q } $pos 3)==on Then
31    ChangeValue 6 1
32   Set $pos=(Add $pos 1)
33   ChangeTitle 7 (GetOutput  {xset -q} $pos 4)
34   ChangeTitle 9 (GetOutput  {xset -q} $pos 7)
35  End
37 Widget 1
38 Property
39  Size 85 20
40  Position 30 225
41  Flags NoReliefString
42  Type PushButton
43  LocaleTitle {Apply}
44 Main
45  Case message of
46   SingleClic :
47   Begin
48    Do {Exec xset c } (GetValue 4)
49    If (GetValue 6) == 1 Then
50     Do {Exec xset r on r rate } (GetTitle 7) { } (GetTitle 9)
51    Else
52     Do {Exec xset r off}
53   End
54 End
56 Widget 2
57 Property
58  Size 85 25
59  Position 140 225
60  Flags NoReliefString
61  Type PushButton
62  LocaleTitle {Save}
63 Main
64  Case message of
65   SingleClic :
66   Begin
67    Do {Exec xset c } (GetValue 4)
68    If (GetValue 6) == 1 Then
69    Begin
70     Do {Exec xset r on r rate }  (GetTitle 7) { } (GetTitle 9)
71     WriteToFile $FILE {xset r on r rate }  (GetTitle 7) { } (GetTitle 9) { c } (GetValue 4)
72    End
73    Else
74    Begin
75     Do {Exec xset r off}
76     WriteToFile $FILE {xset r off c } (GetValue 4)
77    End
78    Do {Exec chmod +x ~/} $FILE
79    #Quit
80   End
81 End
83 Widget 3
84 Property
85  Size 85 25
86  Position 250 225
87  Flags NoReliefString
88  Type PushButton
89  LocaleTitle {Quit}
90 Main
91  Case message of
92   SingleClic :
93   Begin
94    Quit
95   End
96 End
98 Widget 4
99 Property
100  Size 300 1
101  Position 35 145
102  Flags NoReliefString
103  Type HScrollBar
104  MinValue 0
105  MaxValue 100
106  Value 0
107 Main
108  Case message of
109   SingleClic :
110   Begin
111   End
114 Widget 5
115 Property
116  Position 30 125
117  Size 300 20 
118  Flags NoReliefString NoFocus Center
119  Type ItemDraw
120  LocaleTitle {Click Volume (%)}
121 Main
122  Case message of
123   SingleClic :
124   Begin
125   End
128 Widget 6
129 Property
130  Position 30 30
131  Flags NoReliefString
132  Type CheckBox
133  LocaleTitle {AutoRepeat On}
134 Main
135  Case message of
136   SingleClic :
137   Begin
138   End
141 Widget 7
142 Property
143  Size 60 1
144  Position 220 60
145  Flags NoReliefString
146  Type TextField
147 Main
148  Case message of
149   SingleClic :
150   Begin
151   End
154 Widget 8
155 Property
156  Position 40 65
157  Flags NoReliefString NoFocus
158  Type ItemDraw
159  LocaleTitle {Start Delay:  }
160 Main
161  Case message of
162   SingleClic :
163   Begin
164   End
167 Widget 9
168 Property
169  Size 60 1
170  Position 220 90
171  Flags NoReliefString
172  Type TextField
173 Main
174  Case message of
175   SingleClic :
176   Begin
177   End
180 Widget 10
181 Property
182  Position 40 95
183  Flags NoReliefString NoFocus
184  Type ItemDraw
185  LocaleTitle {Repeat Delay:}
186 Main
187  Case message of
188   SingleClic :
189   Begin
190   End
193 Widget 11
194 Property
195  Size 345 205
196  Position 10 10
197  Type Rectangle
198 Main
199  Case message of
200   SingleClic :
201   Begin
202   End
205 Widget 12
206 Property
207  Position 15 3
208  Flags NoReliefString NoFocus
209  Type ItemDraw
210  LocaleTitle {Keyboard}
211 Main
212  Case message of
213   SingleClic :
214   Begin
215   End