Skip to content

Commit c06422b

Browse files
committed
✨ feat(windows): align git defaults and trafficmonitor encoding
1 parent ae72662 commit c06422b

4 files changed

Lines changed: 38 additions & 7 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.* text eol=lf
22
.* text eol=lf
3+
windows/trafficmonitor/config.ini -text

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
129129

130130
The Windows installer backs up any conflicting profile or Git ignore file as `.bak.<timestamp>` before copying the shared version into place, and it also creates the optional local overlay directory used by the public profile loader.
131131

132+
It also applies the same recommended global Git defaults as the Bash/Zsh installer path, so Git behavior stays consistent across machines.
133+
132134
There is also a tracked example at `windows/profile.local.example.ps1` you can copy or adapt for local-only tweaks.
133135

134136
The installer copies the curated Windows package baseline into `~\.config\dotfiles\windows\packages.psd1` and the optional extras into `~\.config\dotfiles\windows\packages.optional.psd1`, so the shared manifests stay available even after the repo is moved or not mounted.

install.ps1

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,33 @@ function Install-GitIgnore {
320320
}
321321
}
322322

323+
function Install-GitDefaults {
324+
if (-not (Test-CommandExists git)) {
325+
Write-Warning "git not found; skipping global Git defaults."
326+
return
327+
}
328+
329+
$defaults = @(
330+
@{ Key = 'pull.rebase'; Value = 'true' }
331+
@{ Key = 'rebase.autostash'; Value = 'true' }
332+
@{ Key = 'core.editor'; Value = 'nano' }
333+
@{ Key = 'init.defaultBranch'; Value = 'main' }
334+
@{ Key = 'push.autoSetupRemote'; Value = 'true' }
335+
@{ Key = 'fetch.prune'; Value = 'true' }
336+
@{ Key = 'diff.colorMoved'; Value = 'zebra' }
337+
)
338+
339+
Write-Section 'Git defaults'
340+
foreach ($default in $defaults) {
341+
if ($DryRun) {
342+
Write-Info "Would set $($default.Key) = $($default.Value)"
343+
} else {
344+
git config --global $default.Key $default.Value
345+
Write-Info "$($default.Key) = $($default.Value)"
346+
}
347+
}
348+
}
349+
323350
function Get-BackupFiles {
324351
param([string]$RootPath)
325352

@@ -799,9 +826,10 @@ foreach ($profileTarget in $PowerShellProfileTargets.Shared) {
799826
Install-Profile -Source $WindowsProfileSource -Target $profileTarget
800827
}
801828
foreach ($profileShimTarget in $PowerShellProfileTargets.Host) {
802-
Install-ProfileShim -Target $profileShimTarget
829+
Install-ProfileShim -Target $profileShimTarget
803830
}
804831
Install-GitIgnore -Source $GitIgnoreSource -Target $GitIgnoreTarget
832+
Install-GitDefaults
805833
Ensure-Directory -Path $WindowsConfigRoot
806834
Copy-WithBackup -Source $WindowsCorePackageManifest -Target $WindowsCorePackageTarget
807835
if (Test-Path -LiteralPath $WindowsOptionalPackageManifest) {

windows/trafficmonitor/config.ini

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[window_size]
1+
[window_size]
22
OptionsDlg_width = 597
33
OptionsDlg_height = 854
44
NetworkInfoDlg_width = 490
@@ -63,9 +63,9 @@ font_size = 10
6363
font_style = 0
6464
swap_up_down = false
6565
hide_main_wnd_when_fullscreen = true
66-
up_string = "UP: "
67-
down_string = "DN: "
68-
total_speed_string = "UP/DN: "
66+
up_string = ": "
67+
down_string = ": "
68+
total_speed_string = "↑↓: "
6969
cpu_string = "CPU: "
7070
memory_string = "MEM: "
7171
gpu_string = "GPU: "
@@ -115,5 +115,5 @@ tbar_display_item = 15
115115
font_name = Segoe UI
116116
font_size = 9
117117
font_style = 0
118-
up_string = "UP: "
119-
down_string = "DN: "
118+
up_string = ": "
119+
down_string = ": "

0 commit comments

Comments
 (0)