Add an option for showing file extensions
This commit is contained in:
parent
901262b8a7
commit
6268eab1e5
|
@ -19,6 +19,12 @@
|
|||
};
|
||||
};
|
||||
|
||||
showFileExt = mkOption {
|
||||
type = types.bool;
|
||||
description = "A value indicating whether file extensions should be displayed in Windows Explorer.";
|
||||
default = true;
|
||||
};
|
||||
|
||||
legacyIconSpacing = mkEnableOption "legacy icon spacing" // {
|
||||
default = true;
|
||||
};
|
||||
|
|
|
@ -124,6 +124,16 @@ Start-SoftwareInstaller @PSBoundParameters `
|
|||
$startLayout | ConvertTo-Json -Compress | Set-Content "$env:SystemDrive\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.json";
|
||||
}
|
||||
|
||||
if (Get-WinConfig "showFileExt") {
|
||||
Edit-DefaultUserKey {
|
||||
param (
|
||||
[RegistryKey] $Key
|
||||
)
|
||||
|
||||
Set-ItemProperty "$($Key.PSPath)\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideFileExt" -Value 0 -Type "DWord";
|
||||
};
|
||||
}
|
||||
|
||||
Pop-Location;
|
||||
Remove-Item -Recurse $dir;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue