<commit_before>[Rainmeter]
Group=ModernGadgets | MgImportRefresh | MgNetworkMeter
MiddleMouseDownAction=[!Refresh]
OnCloseAction=[!EnableMeasure MeasureSettingsBackup "#setupSkinConfig#"]
OnFocusAction=[!CommandMeasure MeasureServiceStatusDelay "Execute 1"]
AccurateText=1

[Metadata]
Name=Network Config
Author=raiguard
Information=Configuration for Network Meter.
License=Creative Commons Attribution-NonCommercial-ShareAlike 3.0
Version=1.4.0

; ========= Variables and Styles =========

[Variables]
@includeStyleSheet=#@#StyleSheet.inc
@includeGlobalSettings=#@#Settings\GlobalSettings.inc
@includeCpuSettings=#@#Settings\NetworkSettings.inc

bgWidth=230
bgHeight=292

contentMarginAbs=4

; ----- Defaults -----

dColorUpload=107,238,98
dColorDownload=255,246,42
dColorPeak=99,125,217

[StyleStringEI]
FontFace=ElegantIcons
FontSize=14
DynamicVariables=1
Group=NetMonMeters

[StyleInterfaceAutoConfigButton]
ImageName=#imgPath#gear.png
ImageTint=200,200,200
X=(#contentMarginRight# - 14)
Y=2r
W=13
H=13
Antialias=1
ToolTipIcon=Info
ToolTipTitle=Auto Configure
ToolTipText=Click this button to automatically configure this network interface. In the event that this does not work correctly, click the 'List my network adapters...' button below and configure it manually.#CRLF##CRLF#NOTE: If you system has multiple adapters of this type, this will choose the first one available. Virtual adapters are ignored.
ToolTipWidth=300

; ==================================================
;  MEASURES
; ==================================================

[MeasureSettingsScript]
Measure=Script
ScriptFile=#scriptPath#Settings.lua
SettingsPath=#networkSettingsPath#
ConfigPath=#networkMeterConfig#
ToggleOn=#toggleOn#
ToggleOff=#toggleOff#
RadioOn=#radioOn# 
RadioOff=#radioOff#
DefaultAction=[!Update "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
CensorExternalIpAction=[!UpdateMeasure MeasureExternalIpString "#networkMeterConfig#"][!UpdateMeter ExternalIpValueString "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
SpeedtestButtonAction=[!UpdateMeasure MeasureNetworkStatusImageState "#networkMeterConfig#"][!UpdateMeter MeterSpeedtestButton "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
PingAction=[!UpdateMeter PingString "#networkMeterConfig#"][!UpdateMeter Placeholder "#networkMeterConfig#"][!UpdateMeterGroup NetInOut "#networkMeterConfig#"][!UpdateMeterGroup NetTotals "#networkMeterConfig#"][!UpdateMeterGroup LineGraph "#networkMeterConfig#"][!UpdateMeterGroup Background "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
LineGraphAction=[!SetOptionGroup LineGraph Hidden "(#showLineGraph# = 0)" "#networkMeterConfig#"][!SetOption GraphLines Y "((#showLineGraph# = 1) ? (#rowSpacing# + 1) : (#rowSpacing# - 1))R" "#networkMeterConfig#"][!UpdateMeterGroup LineGraph "#networkMeterConfig#"][!UpdateMeterGroup Background "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
PeakNetUsageAction=[!SetOptionGroup NetPeaks Hidden "(#showPeakNetworkUsage# = 0)" "#networkMeterConfig#"][!UpdateMeterGroup NetPeaks "#networkMeterConfig#"][!UpdateMeterGroup LineGraph "#networkMeterConfig#"][!UpdateMeterGroup Background "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
PingUrlAction=[!UpdateMeasure MeasurePing "#networkMeterConfig#"][!UpdateMeter PingString "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
NetMonitorAction0=[!CommandMeasure MeasureLoadSkinScript "ToggleSkin('ModernGadgets\\NetworkMeter', 1, 'NetworkMeter.ini', 'NetworkMeterPro.ini', 1)"]
NetMonitorAction1=[!CommandMeasure MeasureLoadSkinScript "ToggleSkin('ModernGadgets\\NetworkMeter', 1, 'NetworkMeterPro.ini', 'NetworkMeter.ini', 1)"]
NetTotalsAction1=[!ShowMeterGroup NetTotals "#networkMeterConfig#"][!SetOption NetInOutSessionTotalLabelString Y "((#showNetTotals# = 1) ? #rowSpacing# : -1)R" "#networkMeterConfig#"][!UpdateMeasure MeasureNetworkStatusImageState "#networkMeterConfig#"][!UpdateMeterGroup NetTotalsRefreshButtons "#networkMeterConfig#"][!UpdateMeterGroup NetTotals "#networkMeterConfig#"][!UpdateMeterGroup LineGraph "#networkMeterConfig#"][!UpdateMeterGroup Background "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
NetTotalsAction0=[!HideMeterGroup NetTotals "#networkMeterConfig#"][!SetOption NetInOutSessionTotalLabelString Y "((#showNetTotals# = 1) ? #rowSpacing# : -1)R" "#networkMeterConfig#"][!UpdateMeasure MeasureNetworkStatusImageState "#networkMeterConfig#"][!UpdateMeterGroup NetTotalsRefreshButtons "#networkMeterConfig#"][!UpdateMeterGroup NetTotals "#networkMeterConfig#"][!UpdateMeterGroup LineGraph "#networkMeterConfig#"][!UpdateMeterGroup Background "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
NetInOutFontFaceAction=[!SetOptionGroup NetInOutFontFace FontFace "#netInOutFontFace#" "#networkMeterConfig#"][!UpdateMeterGroup NetInOutFontFace "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
InterfaceChangeAction=[!Refresh "#networkMeterConfig#"]

[MeasureLoadSkinScript]
Measure=Script
ScriptFile=#scriptPath#LoadSkin.lua
RadioOn=#radioOn#
RadioOff=#radioOff#
ToggleGroup=Settings

[MeasureInputText]
Measure=Plugin
Plugin=InputText
SolidColor=#colorInputBg#
FontColor=#colorInputText#
FontSize=10
FontFace=Roboto Lt
UpdateDivider=-1
FocusDismiss=1
Antialias=1
Command1=[!CommandMeasure MeasureSettingsScript "Set('pingUrl', '$UserInput$', 'PingUrlAction')"] DefaultValue="Do not include http://" X=[PingUrlInputBox:X] Y=[PingUrlInputBox:Y] W=[PingUrlInputBox:W] H=[PingUrlInputBox:H]
Command2=[!CommandMeasure MeasureSettingsScript "Set('interfaceEthernet', '$UserInput$', 'InterfaceChangeAction')"] DefaultValue="#interfaceEthernet#" X=[MeterEthernetInterfaceInputBox:X] Y=[MeterEthernetInterfaceInputBox:Y] W=[MeterEthernetInterfaceInputBox:W] H=[MeterEthernetInterfaceInputBox:H]
Command3=[!CommandMeasure MeasureSettingsScript "Set('interfaceWireless', '$UserInput$', 'InterfaceChangeAction')"] DefaultValue="#interfaceWireless#" X=[MeterWirelessInterfaceInputBox:X] Y=[MeterWirelessInterfaceInputBox:Y] W=[MeterWirelessInterfaceInputBox:W] H=[MeterWirelessInterfaceInputBox:H]
Command4=[!CommandMeasure MeasureSettingsScript "Set('interfaceOther', '$UserInput$', 'InterfaceChangeAction')"] DefaultValue="#interfaceOther#" X=[MeterOtherInterfaceInputBox:X] Y=[MeterOtherInterfaceInputBox:Y] W=[MeterOtherInterfaceInputBox:W] H=[MeterOtherInterfaceInputBox:H]
DynamicVariables=1

; ----- NetMonitor -----

[MeasureOSBits]
Measure=Plugin
Plugin=SysInfo
SysInfoType=OS_BITS

[MeasureServiceStatusDelay]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Wait 500 | Run
Run=[!CommandMeasure MeasureRunGetServiceStatus "Run"]
IfCondition=1
IfTrueAction=[!CommandMeasure MeasureRunGetServiceStatus "Run"]

[MeasureRunGetServiceStatus]
Measure=Plugin
Plugin=RunCommand
Parameter="sc query NetMonitorService"
OutputType=ANSI
State=Hide
Timeout=2000
RegExpSubstitute=1
Substitute="(?siU)^\[SC\].*$":"","(?siU)^.*:.*:.*:(.*)$":"\1","(?siU)(\w).*$":"\1","\s":"","1":"Stopped","2":"Starting","3":"Stopping","4":"Running","5":"Continuing","6":"Pausing","7":"Paused","^$":"Not Installed"
FinishAction=[!HideMeterGroup NetMonMeters][!ShowMeterGroup [MeasureRunGetServiceStatus]][!UpdateMeter MeterStatusText][!UpdateMeasure MeasureRunGetServiceStatus][!UpdateMeterGroup NetMonMeters][!Redraw]

[MeasureRunServiceStart]
Measure=Plugin
Plugin=RunCommand
Parameter="powershell -NonInteractive -Command "Start-Process '#@#Addons\NetMonitor\NetworkServiceStart.cmd' -Verb runAs -WindowStyle Hidden""
OutputType=ANSI
State=Hide
Timeout=2000

[MeasureRunServiceStop]
Measure=Plugin
Plugin=RunCommand
Parameter="powershell -NonInteractive -Command "Start-Process '#@#Addons\NetMonitor\NetworkServiceStop.cmd' -Verb runAs -WindowStyle Hidden""
OutputType=ANSI
State=Hide
Timeout=2000

[MeasureRunServicePause]
Measure=Plugin
Plugin=RunCommand
Parameter="powershell -NonInteractive -Command "Start-Process '#@#Addons\NetMonitor\NetworkServicePause.cmd' -Verb runAs -WindowStyle Hidden""
OutputType=ANSI
State=Hide
Timeout=2000

[MeasureRunServiceContinue]
Measure=Plugin
Plugin=RunCommand
Parameter="powershell -NonInteractive -Command "Start-Process '#@#Addons\NetMonitor\NetworkServiceContinue.cmd' -Verb runAs -WindowStyle Hidden""
OutputType=ANSI
State=Hide
Timeout=2000

; ----- Interface Commands -----

; get name of ethernet adapter, then refresh all network gadgets
[MeasureRunGetEthernetInterface]
Measure=Plugin
Plugin=RunCommand
Parameter="powershell -NonInteractive -Command "(Get-WmiObject -Class MSFT_NetAdapter -Filter 'InterfaceType = 6 and Virtual = False' -Namespace root\StandardCimv2 | Sort -Property InterfaceDescription | Select -First 1).InterfaceDescription""
OutputType=ANSI
State=Hide
Timeout=10000
Substitute="#CRLF#":""
IfMatch=^.+$
IfMatchAction=[!Log "Found ethernet adapter: [MeasureRunGetEthernetInterface]" Notice]
FinishAction=[!SetVariable InterfaceEthernet [MeasureRunGetEthernetInterface]][!WriteKeyValue Variables InterfaceEthernet "[MeasureRunGetEthernetInterface]" "#networkSettingsPath#"][!Log "Network interface autoconfig completed, restarting!" Notice][!RefreshGroup "#networkMeterConfig#"][!Update][!Redraw]

; get name of wireless adapter, then refresh all network gadgets
[MeasureRunGetWirelessInterface]
Measure=Plugin
Plugin=RunCommand
Parameter="powershell -NonInteractive -Command "(Get-WmiObject -Class MSFT_NetAdapter -Filter 'InterfaceType = 71 and Virtual = False' -Namespace root\StandardCimv2 | Sort -Property InterfaceDescription | Select -First 1).InterfaceDescription""
OutputType=ANSI
State=Hide
Timeout=10000
Substitute="#CRLF#":""
IfMatch=^.+$
IfMatchAction=[!Log "Found wireless adapter: [MeasureRunGetWirelessInterface]" Notice]
FinishAction=[!SetVariable InterfaceWireless [MeasureRunGetWirelessInterface]][!WriteKeyValue Variables InterfaceWireless "[MeasureRunGetWirelessInterface]" "#networkSettingsPath#"][!Log "Network interface autoconfig completed, restarting!" Notice][!Refresh "#networkMeterConfig#"][!Update][!Redraw]

; ==================================================
;  METERS
; ==================================================

[Background]
Meter=Image
MeterStyle=StyleBackground
Group=Background | Essentials

[TitleString]
Meter=String
MeterStyle=StyleString | StyleStringConfigTitle
Text=Network Meter Settings
<commit_msg>Fix ethernet interface autoconfigure not refreshing the skin<commit_after>[Rainmeter]
Group=ModernGadgets | MgImportRefresh | MgNetworkMeter
MiddleMouseDownAction=[!Refresh]
OnCloseAction=[!EnableMeasure MeasureSettingsBackup "#setupSkinConfig#"]
OnFocusAction=[!CommandMeasure MeasureServiceStatusDelay "Execute 1"]
AccurateText=1

[Metadata]
Name=Network Config
Author=raiguard
Information=Configuration for Network Meter.
License=Creative Commons Attribution-NonCommercial-ShareAlike 3.0
Version=1.4.0

; ========= Variables and Styles =========

[Variables]
@includeStyleSheet=#@#StyleSheet.inc
@includeGlobalSettings=#@#Settings\GlobalSettings.inc
@includeCpuSettings=#@#Settings\NetworkSettings.inc

bgWidth=230
bgHeight=292

contentMarginAbs=4

; ----- Defaults -----

dColorUpload=107,238,98
dColorDownload=255,246,42
dColorPeak=99,125,217

[StyleStringEI]
FontFace=ElegantIcons
FontSize=14
DynamicVariables=1
Group=NetMonMeters

[StyleInterfaceAutoConfigButton]
ImageName=#imgPath#gear.png
ImageTint=200,200,200
X=(#contentMarginRight# - 14)
Y=2r
W=13
H=13
Antialias=1
ToolTipIcon=Info
ToolTipTitle=Auto Configure
ToolTipText=Click this button to automatically configure this network interface. In the event that this does not work correctly, click the 'List my network adapters...' button below and configure it manually.#CRLF##CRLF#NOTE: If you system has multiple adapters of this type, this will choose the first one available. Virtual adapters are ignored.
ToolTipWidth=300

; ==================================================
;  MEASURES
; ==================================================

[MeasureSettingsScript]
Measure=Script
ScriptFile=#scriptPath#Settings.lua
SettingsPath=#networkSettingsPath#
ConfigPath=#networkMeterConfig#
ToggleOn=#toggleOn#
ToggleOff=#toggleOff#
RadioOn=#radioOn# 
RadioOff=#radioOff#
DefaultAction=[!Update "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
CensorExternalIpAction=[!UpdateMeasure MeasureExternalIpString "#networkMeterConfig#"][!UpdateMeter ExternalIpValueString "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
SpeedtestButtonAction=[!UpdateMeasure MeasureNetworkStatusImageState "#networkMeterConfig#"][!UpdateMeter MeterSpeedtestButton "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
PingAction=[!UpdateMeter PingString "#networkMeterConfig#"][!UpdateMeter Placeholder "#networkMeterConfig#"][!UpdateMeterGroup NetInOut "#networkMeterConfig#"][!UpdateMeterGroup NetTotals "#networkMeterConfig#"][!UpdateMeterGroup LineGraph "#networkMeterConfig#"][!UpdateMeterGroup Background "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
LineGraphAction=[!SetOptionGroup LineGraph Hidden "(#showLineGraph# = 0)" "#networkMeterConfig#"][!SetOption GraphLines Y "((#showLineGraph# = 1) ? (#rowSpacing# + 1) : (#rowSpacing# - 1))R" "#networkMeterConfig#"][!UpdateMeterGroup LineGraph "#networkMeterConfig#"][!UpdateMeterGroup Background "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
PeakNetUsageAction=[!SetOptionGroup NetPeaks Hidden "(#showPeakNetworkUsage# = 0)" "#networkMeterConfig#"][!UpdateMeterGroup NetPeaks "#networkMeterConfig#"][!UpdateMeterGroup LineGraph "#networkMeterConfig#"][!UpdateMeterGroup Background "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
PingUrlAction=[!UpdateMeasure MeasurePing "#networkMeterConfig#"][!UpdateMeter PingString "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
NetMonitorAction0=[!CommandMeasure MeasureLoadSkinScript "ToggleSkin('ModernGadgets\\NetworkMeter', 1, 'NetworkMeter.ini', 'NetworkMeterPro.ini', 1)"]
NetMonitorAction1=[!CommandMeasure MeasureLoadSkinScript "ToggleSkin('ModernGadgets\\NetworkMeter', 1, 'NetworkMeterPro.ini', 'NetworkMeter.ini', 1)"]
NetTotalsAction1=[!ShowMeterGroup NetTotals "#networkMeterConfig#"][!SetOption NetInOutSessionTotalLabelString Y "((#showNetTotals# = 1) ? #rowSpacing# : -1)R" "#networkMeterConfig#"][!UpdateMeasure MeasureNetworkStatusImageState "#networkMeterConfig#"][!UpdateMeterGroup NetTotalsRefreshButtons "#networkMeterConfig#"][!UpdateMeterGroup NetTotals "#networkMeterConfig#"][!UpdateMeterGroup LineGraph "#networkMeterConfig#"][!UpdateMeterGroup Background "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
NetTotalsAction0=[!HideMeterGroup NetTotals "#networkMeterConfig#"][!SetOption NetInOutSessionTotalLabelString Y "((#showNetTotals# = 1) ? #rowSpacing# : -1)R" "#networkMeterConfig#"][!UpdateMeasure MeasureNetworkStatusImageState "#networkMeterConfig#"][!UpdateMeterGroup NetTotalsRefreshButtons "#networkMeterConfig#"][!UpdateMeterGroup NetTotals "#networkMeterConfig#"][!UpdateMeterGroup LineGraph "#networkMeterConfig#"][!UpdateMeterGroup Background "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
NetInOutFontFaceAction=[!SetOptionGroup NetInOutFontFace FontFace "#netInOutFontFace#" "#networkMeterConfig#"][!UpdateMeterGroup NetInOutFontFace "#networkMeterConfig#"][!Redraw "#networkMeterConfig#"]
InterfaceChangeAction=[!Refresh "#networkMeterConfig#"]

[MeasureLoadSkinScript]
Measure=Script
ScriptFile=#scriptPath#LoadSkin.lua
RadioOn=#radioOn#
RadioOff=#radioOff#
ToggleGroup=Settings

[MeasureInputText]
Measure=Plugin
Plugin=InputText
SolidColor=#colorInputBg#
FontColor=#colorInputText#
FontSize=10
FontFace=Roboto Lt
UpdateDivider=-1
FocusDismiss=1
Antialias=1
Command1=[!CommandMeasure MeasureSettingsScript "Set('pingUrl', '$UserInput$', 'PingUrlAction')"] DefaultValue="Do not include http://" X=[PingUrlInputBox:X] Y=[PingUrlInputBox:Y] W=[PingUrlInputBox:W] H=[PingUrlInputBox:H]
Command2=[!CommandMeasure MeasureSettingsScript "Set('interfaceEthernet', '$UserInput$', 'InterfaceChangeAction')"] DefaultValue="#interfaceEthernet#" X=[MeterEthernetInterfaceInputBox:X] Y=[MeterEthernetInterfaceInputBox:Y] W=[MeterEthernetInterfaceInputBox:W] H=[MeterEthernetInterfaceInputBox:H]
Command3=[!CommandMeasure MeasureSettingsScript "Set('interfaceWireless', '$UserInput$', 'InterfaceChangeAction')"] DefaultValue="#interfaceWireless#" X=[MeterWirelessInterfaceInputBox:X] Y=[MeterWirelessInterfaceInputBox:Y] W=[MeterWirelessInterfaceInputBox:W] H=[MeterWirelessInterfaceInputBox:H]
Command4=[!CommandMeasure MeasureSettingsScript "Set('interfaceOther', '$UserInput$', 'InterfaceChangeAction')"] DefaultValue="#interfaceOther#" X=[MeterOtherInterfaceInputBox:X] Y=[MeterOtherInterfaceInputBox:Y] W=[MeterOtherInterfaceInputBox:W] H=[MeterOtherInterfaceInputBox:H]
DynamicVariables=1

; ----- NetMonitor -----

[MeasureOSBits]
Measure=Plugin
Plugin=SysInfo
SysInfoType=OS_BITS

[MeasureServiceStatusDelay]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Wait 500 | Run
Run=[!CommandMeasure MeasureRunGetServiceStatus "Run"]
IfCondition=1
IfTrueAction=[!CommandMeasure MeasureRunGetServiceStatus "Run"]

[MeasureRunGetServiceStatus]
Measure=Plugin
Plugin=RunCommand
Parameter="sc query NetMonitorService"
OutputType=ANSI
State=Hide
Timeout=2000
RegExpSubstitute=1
Substitute="(?siU)^\[SC\].*$":"","(?siU)^.*:.*:.*:(.*)$":"\1","(?siU)(\w).*$":"\1","\s":"","1":"Stopped","2":"Starting","3":"Stopping","4":"Running","5":"Continuing","6":"Pausing","7":"Paused","^$":"Not Installed"
FinishAction=[!HideMeterGroup NetMonMeters][!ShowMeterGroup [MeasureRunGetServiceStatus]][!UpdateMeter MeterStatusText][!UpdateMeasure MeasureRunGetServiceStatus][!UpdateMeterGroup NetMonMeters][!Redraw]

[MeasureRunServiceStart]
Measure=Plugin
Plugin=RunCommand
Parameter="powershell -NonInteractive -Command "Start-Process '#@#Addons\NetMonitor\NetworkServiceStart.cmd' -Verb runAs -WindowStyle Hidden""
OutputType=ANSI
State=Hide
Timeout=2000

[MeasureRunServiceStop]
Measure=Plugin
Plugin=RunCommand
Parameter="powershell -NonInteractive -Command "Start-Process '#@#Addons\NetMonitor\NetworkServiceStop.cmd' -Verb runAs -WindowStyle Hidden""
OutputType=ANSI
State=Hide
Timeout=2000

[MeasureRunServicePause]
Measure=Plugin
Plugin=RunCommand
Parameter="powershell -NonInteractive -Command "Start-Process '#@#Addons\NetMonitor\NetworkServicePause.cmd' -Verb runAs -WindowStyle Hidden""
OutputType=ANSI
State=Hide
Timeout=2000

[MeasureRunServiceContinue]
Measure=Plugin
Plugin=RunCommand
Parameter="powershell -NonInteractive -Command "Start-Process '#@#Addons\NetMonitor\NetworkServiceContinue.cmd' -Verb runAs -WindowStyle Hidden""
OutputType=ANSI
State=Hide
Timeout=2000

; ----- Interface Commands -----

; get name of ethernet adapter, then refresh all network gadgets
[MeasureRunGetEthernetInterface]
Measure=Plugin
Plugin=RunCommand
Parameter="powershell -NonInteractive -Command "(Get-WmiObject -Class MSFT_NetAdapter -Filter 'InterfaceType = 6 and Virtual = False' -Namespace root\StandardCimv2 | Sort -Property InterfaceDescription | Select -First 1).InterfaceDescription""
OutputType=ANSI
State=Hide
Timeout=10000
Substitute="#CRLF#":""
IfMatch=^.+$
IfMatchAction=[!Log "Found ethernet adapter: [MeasureRunGetEthernetInterface]" Notice]
FinishAction=[!SetVariable InterfaceEthernet [MeasureRunGetEthernetInterface]][!WriteKeyValue Variables InterfaceEthernet "[MeasureRunGetEthernetInterface]" "#networkSettingsPath#"][!Log "Network interface autoconfig completed, restarting!" Notice][!Refresh "#networkMeterConfig#"][!Update][!Redraw]

; get name of wireless adapter, then refresh all network gadgets
[MeasureRunGetWirelessInterface]
Measure=Plugin
Plugin=RunCommand
Parameter="powershell -NonInteractive -Command "(Get-WmiObject -Class MSFT_NetAdapter -Filter 'InterfaceType = 71 and Virtual = False' -Namespace root\StandardCimv2 | Sort -Property InterfaceDescription | Select -First 1).InterfaceDescription""
OutputType=ANSI
State=Hide
Timeout=10000
Substitute="#CRLF#":""
IfMatch=^.+$
IfMatchAction=[!Log "Found wireless adapter: [MeasureRunGetWirelessInterface]" Notice]
FinishAction=[!SetVariable InterfaceWireless [MeasureRunGetWirelessInterface]][!WriteKeyValue Variables InterfaceWireless "[MeasureRunGetWirelessInterface]" "#networkSettingsPath#"][!Log "Network interface autoconfig completed, restarting!" Notice][!Refresh "#networkMeterConfig#"][!Update][!Redraw]

; ==================================================
;  METERS
; ==================================================

[Background]
Meter=Image
MeterStyle=StyleBackground
Group=Background | Essentials

[TitleString]
Meter=String
MeterStyle=StyleString | StyleStringConfigTitle
Text=Network Meter Settings

{'fraction_non_alphanumeric': 0.14699310210822888, 'fraction_numerical': 0.013601476731759448, 'mean_word_length': 12.597754293262879, 'pattern_counts': {'":': 28, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '15944', 'n_tokens_mistral': 6452, 'n_tokens_neox': 6027, 'n_words': 1087}