Debian Codegraph @

default-config/FvwmScript-ConfirmCopyConfig

raw
1 WindowTitle {ConfirmCopyConfig}
2 WindowSize 500 160
3 Font "xft:Sans:size=10"
4 Init
5 Begin
6 Set $DataDir=(GetOutput {echo "$FVWM_DATADIR"} 1 -1)
7 Set $UserDir=(GetOutput {echo "$FVWM_USERDIR"} 1 -1)
8 Set $DefaultConf=$DataDir {/default-config/config}
9 Set $UserConf=$UserDir {/config}
10 Set $BackupConf=$UserDir {/config-bak}
11
12 ChangeTitle 3 $UserConf
13 ChangeTitle 5 $BackupConf
14
15 Do {Style ConfirmCopyConfig Layer 6}
16 End
17
18 Widget 1
19 Property
20 Title {Fvwm Default Configuration}
21 Font "xft:Sans:size=14"
22 Size 500 25
23 Position 0 0
24 Type ItemDraw
25 Flags NoReliefString Center
26 Main
27 Case message of
28 SingleClic :
29 Begin
30 End
31 End
32
33 Widget 2
34 Property
35 Title {This script copies the default configuration into your home directory:}
36 Size 400 12
37 Position 15 30
38 Type ItemDraw
39 Flags NoReliefString Left
40 Main
41 Case message of
42 SingleClic :
43 Begin
44 End
45 End
46
47 Widget 3
48 Property
49 Title {}
50 Size 400 17
51 Position 70 50
52 Type ItemDraw
53 Flags NoReliefString Left
54 Main
55 Case message of
56 SingleClic :
57 Begin
58 End
59 End
60
61 Widget 4
62 Property
63 Title {A backup of your current configuration will be located at:}
64 Size 400 12
65 Position 15 70
66 Type ItemDraw
67 Flags NoReliefString Left
68 Main
69 Case message of
70 SingleClic :
71 Begin
72 End
73 End
74
75 Widget 5
76 Property
77 Title {}
78 Size 400 17
79 Position 70 90
80 Type ItemDraw
81 Flags NoReliefString Left
82 Main
83 Case message of
84 SingleClic :
85 Begin
86 End
87 End
88
89 Widget 6
90 Property
91 Title {Click Confirm to continue and restart Fvwm.}
92 Size 400 15
93 Position 15 107
94 Type ItemDraw
95 Flags NoReliefString Left
96 Main
97 Case message of
98 SingleClic :
99 Begin
100 End
101 End
102
103
104 Widget 7
105 Property
106 Title {Confirm}
107 Colorset 13
108 Size 60 28
109 Position 100 130
110 Flags NoReliefString
111 Type PushButton
112 Value 1
113 Main
114 Case message of
115 SingleClic :
116 Begin
117 Do {Test (f } $UserConf {) PipeRead `mv "} $UserConf {" "} $BackupConf {"; echo "Echo Backup: } $BackupConf {"`}
118 Do {PipeRead `cp "} $DefaultConf {" "} $UserDir {"; echo "Echo Copied default config to } $UserDir {"`}
119 Do {Restart}
120 Quit
121 End
122 End
123
124 Widget 8
125 Property
126 Title {Cancel}
127 Colorset 13
128 Size 60 28
129 Position 350 130
130 Flags NoReliefString
131 Type PushButton
132 Value 1
133 Main
134 Case message of
135 SingleClic :
136 Begin
137 Quit
138 End
139 End