Skip to content

Commit

Permalink
fixed showConfigs
Browse files Browse the repository at this point in the history
  • Loading branch information
modkavartini committed Sep 12, 2023
1 parent b633244 commit ecdab8c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion @resources/painmeter.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $settingsIniPath = $RmAPI.VariableStr("settingsPath") + "Rainmeter.ini"
$rootConfig = $RmAPI.VariableStr("rootConfig")
$exclude = ($RmAPI.VariableStr("exclude") -replace '^$','thiswillnevermatchanythingoktrustmebro') + "|$rootConfig"
$separator = if ($RmAPI.Variable("compactMode") -eq 1) { $RmAPI.VariableStr("compactSeparator") } else { $RmAPI.VariableStr("configSeparator") }
$showConfigs = $RmAPI.Variable("showConfigs")
$dedAction = $RmAPI.VariableStr("defaultAction")
$dedEditor = $RmAPI.VariableStr("dedEditor")
$excText = $RmAPI.VariableStr("excludedText")
Expand Down Expand Up @@ -52,7 +53,13 @@ function getConfig {
}
else {
$action += "[!refresh `"$found`"]"
$editing += "$found" + "$separator"
if ($showConfigs -eq 1) { $editing += "$found" + "$separator" }
else {
if ($addedRoot -ne $root) {
$editing += "$root" + "$separator"
$addedRoot = $root
}
}
}
$added++
}
Expand Down

0 comments on commit ecdab8c

Please sign in to comment.