Skip to content

Commit

Permalink
feat(Windows): Replacing lf to yazi, use git bundled unix tools inste…
Browse files Browse the repository at this point in the history
…ad of the others

After a more careful look at the Git For Windows package, I found out
that much of the utilities, I scooped down are already here. To
eliminate this redundancy, I uninstalled the scooped tools and shimmed
the tools in the Git For Windows (scoop) installation directory.
This only made my config a slightly more lightweight. (Anaconda make it
very cumbersome).
  • Loading branch information
Botond Kalocsai committed May 30, 2024
1 parent cee1345 commit 44f08ce
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 34 deletions.
2 changes: 1 addition & 1 deletion home/Documents/WindowsPowerShell/Functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function Remove-ContextMenuDir
BEGIN {
$RegistryClasses = Get-RegistryClasses -Scope "2" -Global:$Global
}
PROCESS {
PROCESS {
foreach($n in $DisplayName){
foreach($shell in $ContextMenuDirRegeditEntries){
$RegistryPath = Join-Path -Path (
Expand Down
13 changes: 13 additions & 0 deletions home/dot_local/windows_setup/Install-WindowsSetup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ winget import `

# Set up configuration

$GitInstallDir = "$(scoop prefix git)"
foreach(
$Executable in (Get-ChildItem -Path "$GitInstallDir\usr\bin\*.exe")
) {
scoop shim add $Executable.BaseName $Executable.FullName
}
foreach(
$Executable in (Get-ChildItem -Path "$GitInstallDir\mingw64\bin\*.exe")
) {
scoop shim add $Executable.BaseName $Executable.FullName
}


Set-EnvironmentVariablesSetup -Scope "User" # Installign environment variables
Add-ContextMenuDir `
-DisplayName "WezTerm" `
Expand Down
12 changes: 12 additions & 0 deletions home/dot_local/windows_setup/Uninstall-WindowsSetup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
."..\..\Documents\WindowsPowerShell\Variables.ps1"

# Cleaning up configuration
$GitInstallDir = "$(scoop prefix git)"
foreach(
$Executable in (Get-ChildItem -Path "$GitInstallDir\usr\bin\*.exe")
) {
scoop shim rm $Executable.BaseName
}
foreach(
$Executable in (Get-ChildItem -Path "$GitInstallDir\mingw64\bin\*.exe")
) {
scoop shim rm $Executable.BaseName
}

Remove-EnvironmentVariablesSetup -Scope "User" # Remove environment variables
Remove-ContextMenuDir -DisplayName "WezTerm"
Remove-ContextMenuDir -DisplayName "Neovim Qt"
Expand Down
36 changes: 3 additions & 33 deletions home/dot_local/windows_setup/scoop_export.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@
"Source": "main",
"Name": "mingw-winlibs"
},
{
"Info": "",
"Source": "main",
"Name": "uutils-coreutils"
},
{
"Info": "",
"Source": "main",
"Name": "diffutils"
},
{
"Info": "",
"Source": "main",
"Name": "patch"
},
{
"Info": "",
"Source": "main",
"Name": "sed"
},
{
"Info": "",
"Source": "main",
Expand All @@ -49,11 +29,6 @@
"Source": "extras",
"Name": "mc"
},
{
"Info": "",
"Source": "main",
"Name": "gawk"
},
{
"Info": "Better powershell",
"Source": "main",
Expand Down Expand Up @@ -115,9 +90,9 @@
"Name": "eza"
},
{
"Info": "File manager like ranger",
"Info": "File manager like ranger, lf",
"Source": "main",
"Name": "lf"
"Name": "yazi"
},
{
"Info": "Better GNU du",
Expand Down Expand Up @@ -195,7 +170,7 @@
"Name": "xh"
},
{
"Info": "Git version control system",
"Info": "Git version control system and basic linux CLI utilities.",
"Source": "main",
"Name": "git"
},
Expand All @@ -219,11 +194,6 @@
"Source": "extras",
"Name": "tortoisesvn"
},
{
"Info": "Encryption CLI tool",
"Source": "main",
"Name": "gpg"
},
{
"Info": "CLI password manager",
"Source": "main",
Expand Down

0 comments on commit 44f08ce

Please sign in to comment.