-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.ini
258 lines (191 loc) · 8.98 KB
/
menu.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
; * ___ Requirements ___
; Windows 10 (1903 and up)
; OBS (25.0.0 and up)
; * ___ How do I use this? ___
; 1. Click on the Skin Config Names from the list to prepare it for OBS, the selection should turn red
; 2. Go on OBS, create a new Window Capture
; ( If you don't have any other window OBS can attach to, you won't be able to change anythig, this is an OBS bug,
; just open any window, Notepad or calculator should suffice )
; 3. Select Capture Method, change it from "Automatic" to "Windows 10 (1903 and up)"
; 4. Select Window, chose the Rainmeter window(s) you prepared
; 5. (Optional, Recommended) Untick Capture Cursor
; * ___ Why does this work? ___
; OBS has been coded so Windows™ windows that have the WS_EX_TOOLWINDOW Extended Window Style (confusing, don’t ask)
; don’t appear in the list of windows you can capture when set to Automatic, presumably this has been done because windows
; that use that extended style are usually overlays or windows that assist in other aspects, stuff you probably wouldn’t want to capture.
; While set on Automatic, the windows will be complete black, this is probably because it uses BitWit (Win 7), which dosen't support
; capturing windows with this Extended Window Style, Windows 10 however does, and it's the only reason the trick works.
; Rainmeter uses the WS_EX_TOOLWINDOW Extended Window Style to hide its skins from ALT+TAB/WIN+TAB, if you do
; the commands right now, you will see all the Rainmeter windows you selected in the skin and OBS will be in the Task Switcher.
; Pretty cool right?
; A side effect of this is that Rainmeter windows will be in other apps for capture too, like Discord.
; Anyways, to remove the style from Rainmeter’s windows I used an AHK script, the code pasted below
; for a, b in A_Args {
; WinSet, ExStyle, -0x80, %b%
; }
; I copy pasted it off the AHK Documentation and I didn’t read the rest, I don’t even know what the first “a” dose,
; “b” is the important parameter that is parsed though. Because the last parameter on WinSet accepts windows titles
; (the ones when you ALT+TAB, e.g. menu.ini - Notepad) and because Rainmeter’s window titles are
; their file name (because of these lines of code https://github.com/rainmeter/rainmeter/blob/master/Library/Skin.cpp#L272-L276 ),
; what this skin does is just execute a bang formatted like
; [“ExStyleRemove.exe” “G:\Rainmeter\Skins\RM-in-OBS\menu.ini”]
; which AHK executes to remove the Extended Style.
; The capturing method that was introduced in Windows 10 is used in Microsoft Teams and several other apps,
; you can also hide Rainmeter Windows from Share Screen! You need to toggle on WDA_EXCLUDEFROMCAPTURE, however
; Googling how to do that in AHK lead me to no result and I wouldn't know how to do it anyways.
; * ___ Shortcomings ___
; 1. DPI Scaling
; 2. Capture Method Yellow Border (Problem from Microsoft)
; 3. The style disappears if you restart Rainmeter (unless you make the AHK file portable, read the section below)
; 4. Because I didn't make the WinSet a toggle (because I don't wanna code the toggle, as it's already hard to keep track of
; skins that may have had the style applies, and because i literally don't know how), I only made the skin remove
; the Extended Style, to make them no longer be captured by OBS, unload and load the skins to completly kill the process
; that hosted the window, this can be easily fixed by someone with patience though, which is not me
; 5. The skin probably dosen't work for people who have Unicode characters in their Windows username, as it uses LUA to generate files,
; the problem can be solved again by going portable
; 6. Random Crashes (Problem from OBS, I don't blame them)
; * ___ Portable ___
; If you wanna remove the Extended Style of any window when a skin loads, all you need to do is include the bang below in
; a .ini/skin, copy pasting the line below should do it (if you know what you're doing, put it where you need though)
; OnRefreshAction=["#SKINSPATH#\RM-in-OBS\@Resources\ExStyleRemove.exe" "#CURRENTPATH##CURRENTFILE#"]
; * ___ Other things ____
; If you got this far, *mwah*, there's stuff you can change in [Variables] to make some elements in the skin to your liking
; The skin is janky because I had a really hard time with meters and the list, I found that using JSMorley's ConfigActive
; I am able to return the number of loaded configs, from that, I just created a script that returns the Config, the skin file
; and a String section with the Mouse Action too.
; To remove the fade, remove [!Hide] and [!ShowFade] from [Rainmeter]'s OnRefreshAction, you'll see why it's there though
; * ___ Credits ____
; "JSMorley" for his "ConfigActive" plugin, which is the main skeleton of the skin
; "icons8.com" for the refresh and note icon
[Variables]
FontName=Trebuchet MS
; Font Face of the skin, change if you want it to what you like
; Default is "Trebuchet MS"
TextSize=24
; Size of the text, make it smaller if you want the skin to get little
ColorText=255,255,255
ColorBackground=0,0,0
; Color of the text and background
; Reverse these for light theme
ColorUnset=44,25,255,100
ColorSet=255,0,0,100
; Background color of the active skins, ColorUnset when they haven't been magically ticked to work, ColorSet when they have
HideJunk=0
; Hides the small notice below the notice text
;=================MEASURES=================
[Configurator]
Measure=Plugin
Plugin=ConfigActive
[Scripting]
Measure=Script
ScriptFile=#@#GenerateFile.lua
NrOfLoadedSkins=[&Configurator:LoadedCount()]
IncFile=#@#GeneratedFile.inc
DynamicVariables=1
[RefresherScript]
Measure=Script
ScriptFile=#@#Refresher.lua
Refreshed=0
;=================METERS=================
[Texty]
X=r
Y=5R
FontSize=#TextSize#
FontFace=#FontName#
FontColor=#ColorText#,205
SolidColor=#ColorUnset#
Text=%1\%2
AntiAlias=1
[Background]
Meter=Shape
Shape =Rectangle 0, 0, #CURRENTCONFIGWIDTH#, #CURRENTCONFIGHEIGHT#, 10 | Fill Color #ColorBackground#,140 | StrokeWidth 2 | Stroke Color 104,104,104,88
Shape2=Rectangle 0, 0, #CURRENTCONFIGWIDTH#, ([MeterTitle:H]+#TextSize#/2), 10 | Fill Color #ColorBackground#,35 | StrokeWidth 0
DynamicVariables=1
[MeterTitle]
Meter=String
Text=Active Configs
FontSize=#TextSize#
FontFace=#FontName#
FontColor=#ColorText#,205
StringCase=Upper
AntiAlias=1
Y=6
X=(#CURRENTCONFIGWIDTH#/2)
StringAlign=Center
DynamicVariables=1
[Info]
Meter=Image
ImageName=#@#icons8-info-100.png
X=10
Y=12R
H=30
LeftMouseUpAction=!EditSkin
ImageTint=235,170,0
[ReadIniPlease]
Meter=String
Text=Click a Config Name to make the skin appear in OBS Window Capture.
;Y=12R
Y=r
X=12R
FontSize=(#TextSize#*0.75)
FontFace=#FontName#
FontColor=#ColorText#,205
AntiAlias=1
InLineSetting=Color | 235,170,0
InlinePattern=Config Name|OBS Window Capture
[ReadIniJunk]
Meter=String
Text=To add new skins to the list, load the skin and click the green icon to refresh the list.#CRLF#! Please edit the skin (click the circled i) and read the lines at the top of the file#CRLF#to understand how to set things up in RM and OBS and also its many shortcomings.#CRLF#Once a skin window style is changed, it can't be removed without unloading #CRLF#and loading the skin (window) again !#CRLF#Middle click me to hide me.
Y=5R
X=r
FontSize=(#TextSize#*0.6)
FontFace=#FontName#
FontColor=#ColorText#,150
AntiAlias=1
InLineSetting=Color | 235,170,0,150
InlinePattern=edit the skin|how to set things up|shortcomings|unset|set|circled i|Middle click me to hide me\.
InLineSetting2=Oblique
InlinePattern2=(?s)#CRLF#\!.+\!
Hidden=#HideJunk#
MouseActionCursor=0
MiddleMouseUpAction=[!WriteKeyValue Variables HideJunk "1"][!Refresh]
[Refresher]
Meter=Image
ImageName=#@#icons8-update-left-rotation-100.png
X=10
Y=12R
H=50
LeftMouseUpAction=!Refresh
ImageTint=170,235,0
SolidColor=0,0,0,1
[ErrorString]
Meter=String
MeterStyle=Texty
X=10R
Y=r
SolidColor=#ColorSet#
Text=⚠ This shouldn't appear, if it#CRLF#does, something went wrong.
LeftMouseUpAction=!About
[String1]
;X=10R
Y=R
@IncludeSections=#@#GeneratedFile.inc
[HackyPadding]
Meter=Image
SolidColor=0,0,0,1
W=12
H=12
;X = set by lua
Y=R
DynamicVariables=1
[Rainmeter]
Update=-1
AccurateText=1
OnRefreshAction=[!Hide][!CommandMeasure Scripting "GetWidth([&Configurator:LoadedCount()])"][!Update][!UpdateMeter Background][!UpdateMeter MeterTitle][!Redraw][!ShowFade]
;doing ShowFade because I don't know how to write efficient skins (also blaming Rainmeter though)
[Metadata]
Name=Rainmeter in OBS
Author=Jeff | Drgabi18
Information= | A skin that aids in getting Rainmeter skins into OBS | | How to setup OBS and Rainmeter is detailed at the begning of the file, please click "Edit" above this text (right of "Refresh") and read, thank you!
Version=Release Candidate 2
License=Free for Personal Use, Free to Distribute, Do not claim Ownership.