-
Notifications
You must be signed in to change notification settings - Fork 0
/
VortexAnnoyanceReducer.ps1
492 lines (413 loc) · 14.3 KB
/
VortexAnnoyanceReducer.ps1
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
# Remove annoyance script v1.2.5
# For Vortex 1.5.4 to 1.6.8 (or later)
# Converted to executable with ps2exe (WIN-PS2EXE) (https://github.com/MScholtes/PS2EXE)
# Compact Style String
$CompactStyle = @"
// reduce paddings
.nav-tabs > li > a {
padding: 2px 16px;
}
.xtable > .xtbody > .xtr > .xtd {
padding: 0.25rem 0.75rem;
}
// show only icons on the toolbars unless the mouse cursor is hovered on them
.mainpage-header {
height: 32px !important;
transition: height 250ms ease 500ms;
.menubar {
height: 100%;
}
}
.mainpage-header .btn {
.button-text {
opacity: 0;
transition: opacity 250ms ease;
position: absolute;
top: 32px;
z-index: 1;
background-color: $brand-bg;
border: $border-width solid $border-color;
padding: 8px;
font-size: 1em;
pointer-events: none;
}
&:hover .button-text {
opacity: 1;
transition: opacity 250ms ease 100ms;
}
}
// if the sidebar is collapsed, show the tab name when hovering
// (this conflicts a bit with the tooltip which we can't disable from css)
#main-nav-sidebar.sidebar-compact #main-nav-container {
overflow: visible;
z-index: 3;
}
.sidebar-compact .nav-pills > li > a {
overflow: visible;
}
.sidebar-compact .main-nav-group > li:hover a::after {
content: attr(title);
background-color: $brand-bg;
margin-left: 8px;
padding: 8px 8px;
border: $border-width solid $border-color;
position: absolute;
top: 0;
bottom: 0;
left: 100%;
display: flex;
align-items: center;
}
// category names can be very long and force a line break.
// instead, limit the width and display ellipsis as necessary
.xtd.table-mods.cell-category {
white-space: nowrap;
max-width: 20em;
overflow-x: hidden;
text-overflow: ellipsis;
}
.toolbar-app-region .container-quicklaunch .tool-icon-container {
width: 200px;
height: 52px;
}
.container-quicklaunch .tool-icon-container {
height: 52px;
}
#main-toolbar.toolbar-app-region {
height: unset;
}
#main-toolbar.toolbar-app-region .main-toolbar-right {
margin-bottom: auto;
margin-right: 146px;
border-right: $border-width solid $border-color;
}
#main-toolbar .nexus-main-banner div {
font-size: xx-small;
}
#main-toolbar .nexus-main-banner div:first-child {
font-size: 1.4em;
margin-bottom: 0;
}
#main-toolbar .nexus-main-banner .right-center {
font-size: inherit;
}
"@
#Compact Variable String
$CompactVariable = @"
`$brand-primary: #D78F46;
`$brand-highlight: #00C1FF;
`$brand-success: #86B951;
`$brand-info: #00C1FF;
`$brand-warning: #FF7300;
`$brand-danger: #FF1C38;
`$brand-bg: #2A2C2B;
`$brand-menu: #4C4C4C;
`$brand-secondary: #D78F46;
`$brand-clickable: #D78F46;
`$text-color: #eeeeee;
`$text-color-disabled: #bbbbbb;
`$link-color: #D78F46;
`$font-size-base: 12px;
`$hidpi-scale-factor: 100%;
`$font-family-base: "Roboto";
`$font-family-headings: "Montserrat";
`$gutter-width: 16px;
`$dark-theme: true;
"@
#Contrast Style String
$ContrastStyle = @"
// reduce paddings
.nav-tabs > li > a {
padding: 2px 16px;
}
.xtable > .xtbody > .xtr > .xtd {
padding: 0.25rem 0.75rem;
}
// show only icons on the toolbars unless the mouse cursor is hovered on them
.mainpage-header {
height: 32px !important;
transition: height 250ms ease 500ms;
.menubar {
height: 100%;
}
}
.mainpage-header .btn {
.button-text {
opacity: 0;
transition: opacity 250ms ease;
position: absolute;
top: 32px;
z-index: 1;
background-color: $brand-bg;
border: $border-width solid $border-color;
padding: 8px;
font-size: 1em;
pointer-events: none;
}
&:hover .button-text {
opacity: 1;
transition: opacity 250ms ease 100ms;
}
}
// if the sidebar is collapsed, show the tab name when hovering
// (this conflicts a bit with the tooltip which we can't disable from css)
#main-nav-sidebar.sidebar-compact #main-nav-container {
overflow: visible;
z-index: 3;
}
.sidebar-compact .nav-pills > li > a {
overflow: visible;
}
.sidebar-compact .main-nav-group > li:hover a::after {
content: attr(title);
background-color: $brand-bg;
margin-left: 8px;
padding: 8px 8px;
border: $border-width solid $border-color;
position: absolute;
top: 0;
bottom: 0;
left: 100%;
display: flex;
align-items: center;
}
// category names can be very long and force a line break.
// instead, limit the width and display ellipsis as necessary
.xtd.table-mods.cell-category {
white-space: nowrap;
max-width: 20em;
overflow-x: hidden;
text-overflow: ellipsis;
}
.toolbar-app-region .container-quicklaunch .tool-icon-container {
width: 200px;
height: 52px;
}
.container-quicklaunch .tool-icon-container {
height: 52px;
}
#main-toolbar.toolbar-app-region {
height: unset;
}
#main-toolbar.toolbar-app-region .main-toolbar-right {
margin-bottom: auto;
margin-right: 146px;
border-right: $border-width solid $border-color;
}
#main-toolbar .nexus-main-banner div {
font-size: xx-small;
}
#main-toolbar .nexus-main-banner div:first-child {
font-size: 1.4em;
margin-bottom: 0;
}
#main-toolbar .nexus-main-banner .right-center {
font-size: inherit;
}
.table-hover > .xtbody > .xtr:hover {
background-color: #4c4c4c !important;
}
.has-success .control-label {
filter: brightness(200%);
}
.has-error .control-label {
filter: brightness(200%);
}
"@
#Contrast Variable String
$ContrastVariable = @"
`$brand-primary: #ad651c;
`$brand-highlight: #0099ff;
`$brand-success: #326500;
`$brand-info: #005c9a;
`$brand-warning: #ff7300;
`$brand-danger: #ad0000;
`$brand-bg: #060807;
`$brand-menu: #1c1c1c;
`$brand-secondary: #ad651c;
`$brand-clickable: #ad651c;
`$text-color: #ffffff;
`$text-color-disabled: #bbbbbb;
`$link-color: #ffc96a;
`$font-size-base: 13px;
`$hidpi-scale-factor: 100%;
`$font-family-base: "Roboto";
`$font-family-headings: "Montserrat";
`$gutter-width: 16px;
`$dark-theme: true;
`$gray: #595959;
"@
#Regular Dummy String
$RegularString = @"
This directory exists only to make the "default" option available without hard-coding an exception for it.
"@
#More Mods Remover
$MoreModsRemover = @"
#more-mods-container {
display: none;
}
"@
#Remove Nexus Nags
$NagRemover = @"
.nexus-main-banner {
display: none;
}
.nexus-download-banner {
display: none;
}
#Go\ Premium {
display: none;
}
"@
#Remove Collections Tab
$RemoveCollections = @"
#Collections {
display: none;
}
"@
$NetworkInstallChoice = Read-Host -prompt "Would you like to use a networked install (Most recent versions of default themes/patches) (Y/N) or (y/n)"
If ($NetworkInstallChoice -eq "Y" -or $NetworkInstallChoice -eq "y") {
# Use TSL 1.2
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# Compact
$CompactStyle = Invoke-WebRequest 'https://raw.githubusercontent.com/Nexus-Mods/extension-theme-switcher/master/themes/compact/style.scss' | Select-Object -Expand Content
$CompactVariable = Invoke-WebRequest 'https://raw.githubusercontent.com/Nexus-Mods/extension-theme-switcher/master/themes/compact/variables.scss' | Select-Object -Expand Content
#Contrast
$ContrastStyle = Invoke-WebRequest 'https://raw.githubusercontent.com/Nexus-Mods/extension-theme-switcher/master/themes/contrast/style.scss' | Select-Object -Expand Content
$ContrastVariable = Invoke-WebRequest 'https://raw.githubusercontent.com/Nexus-Mods/extension-theme-switcher/master/themes/contrast/variables.scss' | Select-Object -Expand Content
#Default
$ThemeDummyFile = Invoke-WebRequest 'https://raw.githubusercontent.com/Nexus-Mods/extension-theme-switcher/master/themes/default/dummy.txt' | Select-Object -Expand Content
#Mods Remover
$MoreModsRemover = Invoke-WebRequest 'https://raw.githubusercontent.com/Glaceon575/VortexNoGetMoreModsBox/master/Stylesheets/MoreModsRemover.css' | Select-Object -Expand Content
#Remove Nag/Ads
$NagRemover = Invoke-WebRequest 'https://raw.githubusercontent.com/Glaceon575/VortexNoGetMoreModsBox/master/Stylesheets/NagRemover.css' | Select-Object -Expand Content
#Remove Collection
$RemoveCollections = Invoke-WebRequest 'https://raw.githubusercontent.com/Glaceon575/VortexNoGetMoreModsBox/master/Stylesheets/RemoveCollection.css' | Select-Object -Expand Content
}
$SharedInstallChoice = Read-Host -prompt "Is your Vortex a shared install? (Default is no) (Y/N) or (y/n)"
if ($SharedInstallChoice -eq "Y" -or $SharedInstallChoice -eq "y") {
$VortexThemeFolder = $env:PROGRAMDATA + "\Vortex\themes\"
}
else {
$VortexThemeFolder = $env:APPDATA + "\Vortex\themes\"
}
if (-Not (Test-Path -path $VortexThemeFolder)) {
New-Item -ItemType "directory" -Path $VortexThemeFolder -Force | Out-Null
}
if (Test-Path -path $VortexThemeFolder) {
Do {
Write-Host "Please pick your theme"
Write-Host "Enter only a number 1, 2, 3 or 4"
Write-Host ""
Write-Host "1. Default"
Write-Host "2. Compact"
Write-Host "3. Contrast"
Write-Host "4. Append To Custom Theme"
Write-Host ""
$ThemeSelection = Read-Host -prompt "Your Selection"
} until(($ThemeSelection -eq 1) -or ($ThemeSelection -eq 2) -or ($ThemeSelection -eq 3) -or ($ThemeSelection -eq 4))
Clear-Host
if ($ThemeSelection -eq 4) {
Write-Host "Enter your custom theme name exactly, it will only work if the wording is exact"
Write-Host "If the theme does not exist you will be reprompted. If you do not have one installed close the window"
Write-Host "Here is a listing of all your current custom themes. Type it exactly, including capitalization."
Write-Host ""
Write-Host "Theme Folder:"
Write-Host $VortexThemeFolder
Write-Host ""
Write-Host "Theme Names:"
Get-ChildItem $VortexThemeFolder -Directory -Name
Write-Host ""
$ThemeName = Read-Host -prompt "Please enter the name of the theme you want to modify)"
$TempThemeFolder = $VortexThemeFolder + $ThemeName
while (((Test-Path -path $TempThemeFolder) -eq $false) -or ($ThemeName -eq "") -or ($ThemeName -eq $null) -or ($ThemeName -Like "*.*")) {
$ThemeName = Read-Host -prompt "Please enter the name of the theme you want to modify)"
$TempThemeFolder = $VortexThemeFolder + $ThemeName
}
}
else {
$ThemeName = Read-Host -prompt "Please enter the name for your theme (Default is `"NoGetMoreMods`")"
}
Clear-Host
if (($ThemeName -eq "") -or ($ThemeName -eq $null) -or ($ThemeName -Like "*.*")) {
$ThemeName = "NoGetMoreMods"
}
$ThemeFolder = $VortexThemeFolder + $ThemeName
$ThemeStyleFile = $ThemeFolder + "\style.scss"
$ThemeVariableFile = $ThemeFolder + "\variables.scss"
$ThemeDummyFile = $ThemeFolder + "\dummy.txt"
if ($ThemeSelection -ne 4) {
if (Test-Path -path $ThemeFolder) {
Remove-Item $ThemeFolder -Recurse
}
New-Item -ItemType "directory" -Path $ThemeFolder -Force
New-Item $ThemeStyleFile -Force
New-Item $ThemeVariableFile -Force
}
Write-Host ""
Write-Host $MoreModsRemover
if ($ThemeSelection -eq 1) {
New-Item $ThemeDummyFile
$MoreModsRemover | Out-File -FilePath $ThemeStyleFile -Append -Encoding UTF8
$RegularString | Out-File -FilePath $ThemeDummyFile -Append -Encoding UTF8
}
if ($ThemeSelection -eq 2) {
$CompactStyle | Out-File -FilePath $ThemeStyleFile -Append -Encoding UTF8
$MoreModsRemover | Out-File -FilePath $ThemeStyleFile -Append -Encoding UTF8
$CompactVariable | Out-File -FilePath $ThemeVariableFile -Append -Encoding UTF8
}
if ($ThemeSelection -eq 3) {
$ContrastStyle | Out-File -FilePath $ThemeStyleFile -Append -Encoding UTF8
$MoreModsRemover | Out-File -FilePath $ThemeStyleFile -Append -Encoding UTF8
$ContrastVariable | Out-File -FilePath $ThemeVariableFile -Append -Encoding UTF8
}
if ($ThemeSelection -eq 4) {
$MoreModsRemover | Out-File -FilePath $ThemeStyleFile -Append -Encoding UTF8
}
Write-Host ""
Write-Host "Would you like to remove some nexus nag prompts (All go premium buttons)"
$NagSelection = Read-Host -prompt "(Y/N) or (y/n)"
If ($NagSelection -eq "Y" -or $NagRemover -eq "y") {
Write-Host ""
Write-Host $NagRemover
$NagRemover | Out-File -FilePath $ThemeStyleFile -Append -Encoding UTF8
}
Write-Host ""
Write-Host "Would you like to remove the collections button"
$CollectionsSelection = Read-Host -prompt "(Y/N) or (y/n)"
If ($CollectionsSelection -eq "Y" -or $CollectionsSelection -eq "y") {
Write-Host ""
Write-Host $RemoveCollections
$RemoveCollections | Out-File -FilePath $ThemeStyleFile -Append -Encoding UTF8
}
Write-Host ""
Write-Host "Finally, would you like to try and automatically set the selected theme as the default theme?"
$AutoSetThemeSelection = Read-Host -prompt "(Y/N) or (y/n)"
If ($AutoSetThemeSelection -eq "Y" -or $AutoSetThemeSelection -eq "y") {
$VortexExecutableLocation = "C:\Program Files\Black Tree Gaming Ltd\Vortex\Vortex.exe"
$VortexDefaultLocation = Test-Path -Path $VortexExecutableLocation -PathType Leaf
If (!$VortexDefaultLocation) {
Write-Host ""
Write-Host "Vortex is not installed in the default location. Please paste the location of your vortex executable. It should end in Vortex.exe"
$VortexExecutableLocation = Read-Host -Prompt "Paste Here"
# Trim so the command gets executed properly
$VortexExecutableLocation = $VortexExecutableLocation.Trim('"')
}
Write-Host ""
Write-Host "The text below is text ouput by Vortex. You can ignore most of it, just look for text that says `"changed`""
&$VortexExecutableLocation --set settings.interface.currentTheme=$ThemeName | Out-String
}
Else {
Write-Host ""
Write-Host "In Vortex, make sure to go to your theme settings and change the theme to be the name that you gave the theme: $ThemeName"
Write-Host "For the changes you made to take effect you must do this"
}
Write-Host ""
Write-Host "Hit the red X or the Enter key"
Write-Host "Have a good day :)"
Read-Host
}
else {
Write-Host "If you see this text, it means you do not have a vortex themes folder, even though the script tried to create one, and something is wrong"
Write-Host "If you know you do have one (please check), report it to me on nexus with details!"
}