Debian Codegraph @

demos/demo.tape

raw
1 # VHS for bottom.
2 # To use:
3 # 1. Install vhs, launch firefox and kitty. Install speedcrunch as that's our target application to kill.
4 # 2. Compile using `cargo build --release`
5 # 3. Run in the project directory `vhs demos/demo.tape`.
6 # 4. Wait for it to finish, this will take a few minutes.
7 # 5. Check the output gif in `demos/demo.gif`.
8 # 6. Optimize the gif size. What seems to work is resize to 960x540, then optimize. Tools like Ezgif are great, and aim for 2-3 MB.
9
10 # Output configuration
11 Output demos/demo.gif
12
13 # Terminal settings
14 Set Shell bash
15 Set FontSize 16
16 Set Width 1280
17 Set Height 720
18 Set Padding 10
19 Set Theme "Dracula"
20 Set Framerate 30
21
22 Hide
23 Type "speedcrunch &"
24 Enter
25 Type "./target/release/btm -C sample_configs/demo_config.toml"
26 Enter
27
28 # Let it stabilize and show the initial view
29 Sleep 120s
30 Show
31
32 # Start. Have a sleep so there's at least a few seconds of stability.
33 Sleep 2s
34
35 # Expand
36 Type "e"
37 Sleep 1s
38
39 # Zoom out
40 Type@100ms "----------"
41 Sleep 1s
42
43 # Zoom back in
44 Type@100ms "++++++++++"
45 Sleep 1s
46
47 # Go to the CPU usage scroll
48 Ctrl+Right
49 Sleep 0.2s
50
51 # Scroll down
52 Down
53 Sleep 0.2s
54 Down
55 Sleep 0.2s
56 Down
57 Sleep 0.2s
58 Down
59 Sleep 0.2s
60 Down
61 Sleep 0.2s
62 Sleep 1s
63
64 # Scroll back to average
65 Up
66 Sleep 0.2s
67 Up
68 Sleep 0.2s
69 Up
70 Sleep 0.2s
71 Up
72 Sleep 0.2s
73 Sleep 1s
74
75 # Undo expand
76 Type "e"
77 Sleep 1s
78
79 # Now go to the memory widget
80 Sleep 1s
81 Ctrl+Left
82 Sleep 0.2s
83 Ctrl+Down
84 Sleep 0.2s
85 Sleep 0.5s
86
87 # Scroll out a few times
88 Type@100ms "---"
89 Sleep 1s
90
91 # Now go to the network widget
92 Sleep 1s
93 Ctrl+Down
94 Sleep 0.2s
95 Sleep 0.5s
96
97 # Scroll in twice
98 Type@50ms "++"
99 Sleep 1s
100
101 # Now go to the temperature widget and scroll around, then change sort
102 Sleep 1.5s
103 Ctrl+Up
104 Sleep 0.2s
105 Ctrl+Right
106 Sleep 0.2s
107 Sleep 1.1s
108 Down
109 Sleep 0.05s
110 Down
111 Sleep 0.05s
112 Down
113 Sleep 0.05s
114 Down
115 Sleep 0.05s
116 Down
117 Sleep 0.05s
118 Down
119 Sleep 0.05s
120 Down
121 Sleep 0.05s
122 Down
123 Sleep 0.05s
124 Sleep 1s
125 Type "gg"
126 Sleep 1s
127 Type "s"
128 Sleep 1.5s
129 Type "s"
130 Sleep 1.5s
131 Type "t"
132 Sleep 1.5s
133 Type "t"
134 Sleep 1.5s
135
136 # Go to disk and show off column sorting again
137 Sleep 1s
138 Ctrl+Down
139 Sleep 1s
140 Type "e"
141 Sleep 1s
142 Type "d"
143 Sleep 1.5s
144 Type "m"
145 Sleep 1.5s
146 Type "u"
147 Sleep 1.5s
148 Sleep 1s
149 Type "e"
150 Sleep 1s
151
152 # Go to processes
153 Sleep 1s
154 Ctrl+Down
155 Sleep 1s
156 Type "e"
157 Sleep 1s
158
159 # Show off process sorting
160 Type "p"
161 Sleep 1s
162 Type "p"
163 Sleep 1.5s
164 Type "c"
165 Sleep 1.5s
166 Type "P"
167 Sleep 2s
168 Type "P"
169
170 # Show off tree mode
171 Sleep 1s
172 Type "t"
173 Sleep 3s
174 Type "-"
175 Sleep 0.5s
176 Down
177 Type "-"
178 Sleep 0.5s
179 Type "-"
180 Sleep 0.5s
181 Up
182 Type "-"
183 Sleep 1s
184 Type "t"
185
186 # Show off search
187 Sleep 1s
188 Type "/"
189 Type@100ms "firefox OR kitty"
190 Sleep 2s
191 Ctrl+u
192 Sleep 1s
193 Alt+w
194 Sleep 0.5s
195 Type @250ms"pid=37 OR cpu>1"
196 Sleep 2s
197 Ctrl+u
198 Sleep 0.2s
199 Alt+w
200 Sleep 0.2s
201 Alt+r
202 Type@100ms "kworker/1[1-3]"
203 Sleep 2s
204 Ctrl+u
205
206 # Show off process killing
207 Sleep 1s
208 Type@100ms "speedcrunch"
209 Sleep 1s
210 Ctrl+Up
211 Delete
212 Sleep 1s
213 Enter
214 Escape
215 Sleep 0.5s
216 Escape
217 Sleep 0.5s
218 Type "/"
219 Sleep 0.5s
220 Ctrl+u
221 Sleep 0.5s
222 Escape
223
224 # Done
225 Sleep 3s