├── config ├── sharp-keys.skl ├── windhawk │ ├── start-menu-all-apps.json │ ├── windhawk.png │ ├── taskbar-button-click.json │ ├── taskbar-icon-size.json │ ├── taskbar-clock-customization.json │ └── windows-11-start-menu-styler.json ├── shell │ ├── alias.sh │ ├── zsh-config.sh │ ├── bash-config.sh │ └── fish-config.sh ├── __OS-STARTUP-TASK__.xml ├── __SLACK-STARTUP-TASK___.xml ├── monitor.ini ├── mise.toml ├── launch.jsonc ├── starship.toml ├── uup-dump │ ├── 10 │ │ ├── ConvertConfig.ini │ │ └── CustomAppsList.txt │ └── 11 │ │ ├── ConvertConfig.ini │ │ └── CustomAppsList.txt ├── zed │ ├── keymap.json │ └── settings.json ├── symlink.jsonc ├── fastfetch.jsonc ├── winget-apps.jsonc └── windows-terminal.json ├── .gitignore ├── assets ├── bash.ico ├── fish.ico └── zsh.ico ├── src ├── compile-ahk │ ├── bin │ │ ├── Ahk2Exe.exe │ │ └── AutoHotkey64.exe │ ├── scripts │ │ ├── Macro.ico │ │ ├── WindowManager.ico │ │ ├── VirtualDesktop-Flip.ico │ │ ├── VirtualDesktop-W10.ico │ │ ├── VirtualDesktop-W11.ico │ │ ├── WindowManager.ahk │ │ ├── VirtualDesktop-Flip.ahk │ │ ├── VirtualDesktop-W11.ahk │ │ ├── Macro.ahk │ │ └── VirtualDesktop-W10.ahk │ └── main.go ├── bin │ └── VirtualDesktopAccessor.dll ├── scripts │ ├── proxy-pause │ │ └── main.go │ ├── file-sys-case │ │ └── main.go │ ├── git-pull │ │ └── main.go │ ├── gh-repo-view │ │ └── main.go │ ├── gh-pr-create │ │ └── main.go │ ├── gh-repo-view-web │ │ └── main.go │ ├── git-back │ │ └── main.go │ ├── slack-startup │ │ └── main.go │ ├── winget-install │ │ └── main.go │ ├── git-restore │ │ └── main.go │ ├── git-pull-merge │ │ └── main.go │ ├── git-pull-rebase │ │ └── main.go │ ├── winget-upgrade │ │ └── main.go │ ├── symlink-setup │ │ └── main.go │ ├── git-clone │ │ └── main.go │ ├── windows-startup │ │ └── main.go │ ├── gpg-unlock │ │ └── main.go │ ├── git-checkout │ │ └── main.go │ ├── git-clean │ │ └── main.go │ ├── msys-setup │ │ └── main.go │ ├── slack-status │ │ └── main.go │ ├── proxy-vbs │ │ └── main.go │ ├── clean-code-snippets │ │ └── main.go │ └── git-nuke │ │ └── main.go ├── helpers │ ├── detached-exec.go │ ├── cmd.go │ ├── detached-elevate.go │ ├── slack │ │ ├── launch.go │ │ └── runtime.go │ ├── symlink.go │ ├── fs.go │ ├── exec.go │ ├── winsdk │ │ └── admin.go │ ├── env.go │ ├── pause.go │ └── winget │ │ └── helpers.go ├── ps1 │ ├── settings.ps1 │ ├── disable-update.ps1 │ ├── remove-features.ps1 │ ├── remove-capabilities.ps1 │ ├── delete-tasks.ps1 │ ├── remove-apps.ps1 │ ├── disable-services.ps1 │ ├── settings-machine.ps1 │ └── settings-user.ps1 ├── constants │ └── constants.go ├── compile-go │ └── main.go └── install-start-menu │ └── main.go ├── __install-start-menu.cmd ├── .vscode └── settings.json ├── __install-msys2.cmd ├── __install-go-tools.cmd ├── go.mod ├── __compile.cmd ├── __install-config.cmd ├── __windows-setup.cmd ├── __install-dotfiles.cmd ├── go.sum ├── __git-gpg.cmd └── README.md /config/sharp-keys.skl: -------------------------------------------------------------------------------- 1 | n::F -------------------------------------------------------------------------------- /config/windhawk/start-menu-all-apps.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .build 2 | .experiment 3 | node_modules -------------------------------------------------------------------------------- /config/shell/alias.sh: -------------------------------------------------------------------------------- 1 | alias ..="cd .." 2 | alias ...="cd ../.." 3 | -------------------------------------------------------------------------------- /config/shell/zsh-config.sh: -------------------------------------------------------------------------------- 1 | source ~/.dotfiles/config/shell/alias.sh 2 | -------------------------------------------------------------------------------- /assets/bash.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/assets/bash.ico -------------------------------------------------------------------------------- /assets/fish.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/assets/fish.ico -------------------------------------------------------------------------------- /assets/zsh.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/assets/zsh.ico -------------------------------------------------------------------------------- /config/shell/bash-config.sh: -------------------------------------------------------------------------------- 1 | source ~/.dotfiles/config/shell/alias.sh 2 | 3 | eval "$(starship init bash)" 4 | -------------------------------------------------------------------------------- /config/windhawk/windhawk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/config/windhawk/windhawk.png -------------------------------------------------------------------------------- /config/__OS-STARTUP-TASK__.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/config/__OS-STARTUP-TASK__.xml -------------------------------------------------------------------------------- /src/compile-ahk/bin/Ahk2Exe.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/src/compile-ahk/bin/Ahk2Exe.exe -------------------------------------------------------------------------------- /src/compile-ahk/scripts/Macro.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/src/compile-ahk/scripts/Macro.ico -------------------------------------------------------------------------------- /config/__SLACK-STARTUP-TASK___.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/config/__SLACK-STARTUP-TASK___.xml -------------------------------------------------------------------------------- /src/bin/VirtualDesktopAccessor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/src/bin/VirtualDesktopAccessor.dll -------------------------------------------------------------------------------- /src/compile-ahk/bin/AutoHotkey64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/src/compile-ahk/bin/AutoHotkey64.exe -------------------------------------------------------------------------------- /src/compile-ahk/scripts/WindowManager.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/src/compile-ahk/scripts/WindowManager.ico -------------------------------------------------------------------------------- /src/compile-ahk/scripts/VirtualDesktop-Flip.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/src/compile-ahk/scripts/VirtualDesktop-Flip.ico -------------------------------------------------------------------------------- /src/compile-ahk/scripts/VirtualDesktop-W10.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/src/compile-ahk/scripts/VirtualDesktop-W10.ico -------------------------------------------------------------------------------- /src/compile-ahk/scripts/VirtualDesktop-W11.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NazmusSayad/.dotfiles/HEAD/src/compile-ahk/scripts/VirtualDesktop-W11.ico -------------------------------------------------------------------------------- /__install-start-menu.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | 4 | echo. 5 | echo ^> Installing start menu entries... 6 | call go run ./src/install-start-menu/main.go 7 | -------------------------------------------------------------------------------- /config/monitor.ini: -------------------------------------------------------------------------------- 1 | Pro Mode: User 2 | Gaming Mode: User 3 | 4 | Brightness: 16 5 | 6 | Color Temperature (Custom): 7 | R: 43 8 | G: 49 9 | B: 50 10 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "fastfetch", 4 | "fscs", 5 | "msys", 6 | "netserv", 7 | "winget", 8 | "winsdk" 9 | ] 10 | } -------------------------------------------------------------------------------- /config/windhawk/taskbar-button-click.json: -------------------------------------------------------------------------------- 1 | { 2 | "multipleItemsBehavior": "closeAll", 3 | "keysToEndTask.Ctrl": 1, 4 | "keysToEndTask.Alt": 1, 5 | "oldTaskbarOnWin11": 0 6 | } 7 | -------------------------------------------------------------------------------- /config/windhawk/taskbar-icon-size.json: -------------------------------------------------------------------------------- 1 | { 2 | "TaskbarHeight": 40, 3 | "IconSize": 24, 4 | "TaskbarButtonWidth": 40, 5 | "IconSizeSmall": 16, 6 | "TaskbarButtonWidthSmall": 32 7 | } 8 | -------------------------------------------------------------------------------- /src/compile-ahk/scripts/WindowManager.ahk: -------------------------------------------------------------------------------- 1 | #NoTrayIcon 2 | 3 | F23:: 4 | { 5 | Send("{Alt down}") 6 | Send("{Tab}") 7 | } 8 | 9 | F23 up:: 10 | { 11 | Send("{Alt up}") 12 | } 13 | 14 | -------------------------------------------------------------------------------- /__install-msys2.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | 4 | echo ^> Installing shells... 5 | pacman -S --noconfirm bash fish 6 | 7 | echo ^> Installing fastfetch... 8 | pacman -S --noconfirm mingw-w64-clang-x86_64-fastfetch 9 | 10 | echo. 11 | pause 12 | -------------------------------------------------------------------------------- /src/compile-ahk/scripts/VirtualDesktop-Flip.ahk: -------------------------------------------------------------------------------- 1 | #NoTrayIcon 2 | 3 | F23:: { 4 | static goRight := true 5 | 6 | if (goRight) { 7 | Send("^#{Right}") 8 | } else { 9 | Send("^#{Left}") 10 | } 11 | 12 | goRight := !goRight 13 | } -------------------------------------------------------------------------------- /__install-go-tools.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | 4 | echo ^> Installing go... 5 | call go install -v golang.org/x/tools/gopls@latest 6 | call go install -v mvdan.cc/sh/v3/cmd/shfmt@latest 7 | call go install -v honnef.co/go/tools/cmd/staticcheck@latest 8 | 9 | echo. 10 | pause -------------------------------------------------------------------------------- /src/scripts/proxy-pause/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "dotfiles/src/helpers" 5 | "os" 6 | ) 7 | 8 | func main() { 9 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 10 | Command: os.Args[1], 11 | Args: os.Args[2:], 12 | }) 13 | 14 | helpers.PressAnyKeyOrWaitToExit() 15 | } 16 | -------------------------------------------------------------------------------- /src/scripts/file-sys-case/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "dotfiles/src/helpers" 4 | 5 | func main() { 6 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 7 | Command: "fsutil.exe", 8 | Args: []string{"file", "setCaseSensitiveInfo", ".", "enable", "recursive"}, 9 | Exit: true, 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /src/scripts/git-pull/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "dotfiles/src/helpers" 5 | "os" 6 | ) 7 | 8 | func main() { 9 | arguments := os.Args[1:] 10 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 11 | Command: "git", 12 | Args: append([]string{"pull"}, arguments...), 13 | Exit: true, 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /config/shell/fish-config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env fish 2 | 3 | set -g fish_color_command magenta 4 | 5 | source ~/.dotfiles/config/shell/alias.sh 6 | 7 | if status is-interactive 8 | starship init fish | source 9 | end 10 | 11 | function fish_greeting 12 | if not set -q TERM_PROGRAM 13 | # fastfetch 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /src/helpers/detached-exec.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "os/exec" 5 | "syscall" 6 | ) 7 | 8 | func DetachedExec(exe string, args ...string) error { 9 | cmd := exec.Command(exe, args...) 10 | cmd.SysProcAttr = &syscall.SysProcAttr{CreationFlags: syscall.CREATE_NEW_PROCESS_GROUP | 0x00000008} 11 | cmd.Start() 12 | return nil 13 | } 14 | -------------------------------------------------------------------------------- /src/scripts/gh-repo-view/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | helpers "dotfiles/src/helpers" 5 | "os" 6 | ) 7 | 8 | func main() { 9 | arguments := os.Args[1:] 10 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 11 | Command: "gh", 12 | Args: append([]string{"repo", "view"}, arguments...), 13 | Exit: true, 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /src/scripts/gh-pr-create/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | helpers "dotfiles/src/helpers" 5 | "os" 6 | ) 7 | 8 | func main() { 9 | arguments := os.Args[1:] 10 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 11 | Command: "gh", 12 | Args: append([]string{"pr", "create", "-B"}, arguments...), 13 | Exit: true, 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /config/windhawk/taskbar-clock-customization.json: -------------------------------------------------------------------------------- 1 | { 2 | "ShowSeconds": 1, 3 | "TimeFormat": "hh':'mm':'ss tt", 4 | "DateFormat": "ddd',' dd/MM/yy", 5 | "WeekdayFormat": "dddd", 6 | "WeekdayFormatCustom": "Sun, Mon, Tue, Wed, Thu, Fri, Sat", 7 | "TopLine": "%time%", 8 | "BottomLine": "%date%", 9 | "MiddleLine": "", 10 | "TooltipLine": "" 11 | } 12 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module dotfiles 2 | 3 | go 1.24.5 4 | 5 | require ( 6 | github.com/logrusorgru/aurora/v4 v4.0.0 7 | github.com/manifoldco/promptui v0.9.0 8 | github.com/tidwall/jsonc v0.3.2 9 | ) 10 | 11 | require ( 12 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect 13 | golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b // indirect 14 | ) 15 | -------------------------------------------------------------------------------- /src/scripts/gh-repo-view-web/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | helpers "dotfiles/src/helpers" 5 | "os" 6 | ) 7 | 8 | func main() { 9 | arguments := os.Args[1:] 10 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 11 | Command: "gh", 12 | Args: append([]string{"repo", "view", "--web"}, arguments...), 13 | Exit: true, 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /config/windhawk/windows-11-start-menu-styler.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme": "Windows11_Metro10Minimal", 3 | "disableNewStartMenuLayout": 0, 4 | "controlStyles[0].target": "", 5 | "controlStyles[0].styles[0]": "", 6 | "webContentStyles[0].target": "", 7 | "webContentStyles[0].styles[0]": "", 8 | "webContentCustomJs": "", 9 | "styleConstants[0]": "", 10 | "resourceVariables[0].variableKey": "", 11 | "resourceVariables[0].value": "" 12 | } 13 | -------------------------------------------------------------------------------- /__compile.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | 4 | echo ^> Killing all AHK scripts... 5 | tasklist /NH | findstr /I "^AHK-" >nul && sudo taskkill /F /IM AHK-* 6 | 7 | echo ^> Cleaning build directory... 8 | rmdir .\.build\bin /s /q 9 | rmdir .\.build\ahk /s /q 10 | 11 | echo. 12 | echo ^> Compiling Go scripts... 13 | call go run ./src/compile-go/main.go 14 | 15 | echo. 16 | echo ^> Compiling AutoHotkey scripts... 17 | call go run ./src/compile-ahk/main.go 18 | -------------------------------------------------------------------------------- /src/ps1/settings.ps1: -------------------------------------------------------------------------------- 1 | Write-Output 'Setting Windows Settings...' 2 | 3 | # Removes OneDrive 4 | Remove-Item "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk" -ErrorAction Continue 5 | Remove-Item "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.exe" -ErrorAction Continue 6 | Remove-Item "C:\Windows\System32\OneDriveSetup.exe" -ErrorAction Continue 7 | Remove-Item "C:\Windows\SysWOW64\OneDriveSetup.exe" -ErrorAction Continue 8 | -------------------------------------------------------------------------------- /src/ps1/disable-update.ps1: -------------------------------------------------------------------------------- 1 | Write-Output 'Disabling Windows Update...' 2 | 3 | if (-not (Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) { 4 | New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force 5 | } 6 | 7 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Value 0 -Type DWord 8 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Value 1 -Type DWord 9 | -------------------------------------------------------------------------------- /src/ps1/remove-features.ps1: -------------------------------------------------------------------------------- 1 | Write-Output 'Removing Windows Features...' 2 | 3 | $featuresToDisable = @( 4 | 'Microsoft-SnippingTool', 5 | 'Microsoft-Windows-Hello-Face', 6 | 'Print-Fax-Client' 7 | ) 8 | 9 | Get-WindowsOptionalFeature -Online | 10 | ForEach-Object { 11 | $featureName = $_.FeatureName 12 | if ($featuresToDisable | Where-Object { $featureName -Like $_ }) { 13 | Write-Output "Removing $featureName..." 14 | Disable-WindowsOptionalFeature -Online -FeatureName $featureName -NoRestart 15 | } 16 | } -------------------------------------------------------------------------------- /src/compile-ahk/scripts/VirtualDesktop-W11.ahk: -------------------------------------------------------------------------------- 1 | #NoTrayIcon 2 | 3 | DLLPath := A_ScriptDir . "\bin\VirtualDesktopAccessor.dll" 4 | GetDesktopCount := DllCall.Bind(DLLPath "\GetDesktopCount", "cdecl int") 5 | GetCurrentDesktop := DllCall.Bind(DLLPath "\GetCurrentDesktopNumber", "cdecl int") 6 | 7 | F23:: 8 | { 9 | current := GetCurrentDesktop() 10 | total := GetDesktopCount() 11 | 12 | if (current >= total - 1) { 13 | Loop total - 1 { 14 | Send("^#{Left}") 15 | } 16 | } else { 17 | Send("^#{Right}") 18 | } 19 | } 20 | return -------------------------------------------------------------------------------- /src/compile-ahk/scripts/Macro.ahk: -------------------------------------------------------------------------------- 1 | #NoTrayIcon 2 | ProcessSetPriority "Realtime" 3 | A_MaxHotkeysPerInterval := 9999 4 | 5 | #UseHook 6 | #Space::+!F 7 | 8 | #UseHook 9 | #PrintScreen::#^+PrintScreen 10 | 11 | #UseHook 12 | ^WheelUp:: { 13 | Critical "On" 14 | KeyWait "Ctrl" 15 | Send "{WheelUp}" 16 | } 17 | 18 | #UseHook 19 | ^WheelDown:: { 20 | Critical "On" 21 | KeyWait "Ctrl" 22 | Send "{WheelDown}" 23 | } 24 | 25 | 26 | ::@me::me@sayad.dev 27 | ::@fake::fake@sayad.dev 28 | ::@mail::sayadenv@gmail.com 29 | -------------------------------------------------------------------------------- /src/scripts/git-back/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "dotfiles/src/helpers" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/logrusorgru/aurora/v4" 9 | ) 10 | 11 | func main() { 12 | commitHash := "" 13 | if len(os.Args) > 1 { 14 | commitHash = os.Args[1] 15 | } 16 | 17 | if commitHash == "" { 18 | fmt.Println(aurora.Red("Commit hash required")) 19 | os.Exit(1) 20 | } 21 | 22 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 23 | Command: "git", 24 | Args: []string{"restore", "--source", commitHash, "--", "."}, 25 | Exit: true, 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /config/mise.toml: -------------------------------------------------------------------------------- 1 | [tools] 2 | 3 | node = "lts" 4 | pnpm = "latest" 5 | yarn = "latest" 6 | 7 | ni = "latest" 8 | bun = "latest" 9 | deno = "latest" 10 | 11 | "npm:tsx" = "latest" 12 | "npm:netserv" = "latest" 13 | "npm:uni-run" = "latest" 14 | "npm:code-info" = "latest" 15 | 16 | go = "latest" 17 | python = "latest" 18 | 19 | php = "latest" 20 | java = "latest" 21 | 22 | rust = "stable" 23 | ruby = "latest" 24 | rust-analyzer = "latest" 25 | 26 | dart = "latest" 27 | kotlin = "latest" 28 | 29 | fzf = "latest" 30 | bat = "latest" 31 | eza = "latest" 32 | yazi = "latest" 33 | tokei = "latest" 34 | 35 | [settings] 36 | auto_install = false 37 | exec_auto_install = false 38 | not_found_auto_install = false 39 | -------------------------------------------------------------------------------- /src/ps1/remove-capabilities.ps1: -------------------------------------------------------------------------------- 1 | Write-Output 'Removing Windows Capabilities...' 2 | 3 | $capabilitiesToRemove = @( 4 | 'Browser.InternetExplorer', 5 | 'MathRecognizer', 6 | 'OpenSSH.Client', 7 | 'Microsoft.Windows.MSPaint', 8 | 'Microsoft.Windows.PowerShell.ISE', 9 | 'App.Support.QuickAssist', 10 | 'App.StepsRecorder', 11 | 'Media.WindowsMediaPlayer', 12 | 'Microsoft.Windows.WordPad' 13 | ) 14 | 15 | Get-WindowsCapability -Online | 16 | ForEach-Object { 17 | $capabilityName = $_.Name 18 | if ($capabilitiesToRemove | Where-Object { $capabilityName -Like $_ }) { 19 | Write-Output "Removing $capabilityName..." 20 | Remove-WindowsCapability -Online -Name $capabilityName 21 | } 22 | } -------------------------------------------------------------------------------- /src/scripts/slack-startup/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path/filepath" 7 | "strings" 8 | 9 | slack_helpers "dotfiles/src/helpers/slack" 10 | ) 11 | 12 | func main() { 13 | homeDir, err := os.UserHomeDir() 14 | if err != nil { 15 | fmt.Println("Error getting user home directory:", err) 16 | os.Exit(1) 17 | } 18 | 19 | data, err := os.ReadFile(filepath.Join(homeDir, ".slack-status")) 20 | if err != nil { 21 | fmt.Println("Error reading slack status file:", err) 22 | slack_helpers.SlackLaunch("work-hours") 23 | os.Exit(1) 24 | } 25 | 26 | status := strings.TrimSpace(string(data)) 27 | slack_helpers.SlackLaunch(slack_helpers.SlackStatus(status)) 28 | } 29 | -------------------------------------------------------------------------------- /config/launch.jsonc: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Name": "CTF Monitor", 4 | "Path": "ctfmon.exe", 5 | "Admin": true 6 | }, 7 | { 8 | "Name": "CMD", 9 | "Path": "cmd.exe", 10 | "Args": ["/c"], 11 | "Admin": true 12 | }, 13 | { 14 | "Name": "AHK Macro", 15 | "Path": "./.build/ahk/AHK-Macro.exe", 16 | "Admin": true 17 | }, 18 | { 19 | "Name": "AHK Window Manager", 20 | "Path": "./.build/ahk/AHK-WindowManager.exe", 21 | "Admin": true 22 | }, 23 | { 24 | "Name": "ShareX", 25 | "Path": "$PROGRAMFILES/ShareX/ShareX.exe", 26 | "Admin": true 27 | }, 28 | { 29 | "Name": "GPG Init", 30 | "Path": "gpg", 31 | "Args": ["--list-keys"], 32 | "Admin": true 33 | } 34 | ] 35 | -------------------------------------------------------------------------------- /config/starship.toml: -------------------------------------------------------------------------------- 1 | add_newline = false 2 | follow_symlinks = false 3 | 4 | format = "$username$hostname$directory$git_branch$git_state$git_status$line_break$shell" 5 | 6 | [shell] 7 | disabled = false 8 | format = "[$indicator ](dimmed white)" 9 | fish_indicator = '' 10 | bash_indicator = '' 11 | 12 | [directory] 13 | style = "blue" 14 | 15 | [git_branch] 16 | format = "[](dimmed) [$branch](yellow)" 17 | 18 | [git_status] 19 | format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](red) ($ahead_behind$stashed)](red)" 20 | conflicted = "​" 21 | untracked = "​" 22 | modified = "​" 23 | staged = "​" 24 | renamed = "​" 25 | deleted = "​" 26 | stashed = "≡" 27 | 28 | [git_state] 29 | format = '\([$state( $progress_current/$progress_total)]($bright-black)\) ' 30 | -------------------------------------------------------------------------------- /src/scripts/winget-install/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "dotfiles/src/helpers" 5 | "dotfiles/src/helpers/winget" 6 | "fmt" 7 | "strconv" 8 | 9 | "github.com/logrusorgru/aurora/v4" 10 | ) 11 | 12 | func main() { 13 | packages := winget.GetWingetPackages() 14 | fmt.Println(aurora.Faint("Installing packages, total: " + strconv.Itoa(len(packages)))) 15 | 16 | for _, p := range packages { 17 | if p.SkipInstall { 18 | fmt.Println() 19 | fmt.Println(aurora.Faint("- Skipping " + p.ID)) 20 | continue 21 | } 22 | 23 | fmt.Println() 24 | fmt.Println(aurora.Faint("- Installing " + p.ID)) 25 | 26 | args := winget.BuildWingetInstallCommands(p) 27 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 28 | Command: args[0], 29 | Args: args[1:], 30 | }) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/scripts/git-restore/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bufio" 5 | "dotfiles/src/helpers" 6 | "fmt" 7 | "os" 8 | "strings" 9 | 10 | "github.com/logrusorgru/aurora/v4" 11 | ) 12 | 13 | func main() { 14 | fmt.Println(aurora.Red("Restore and clean?")) 15 | 16 | fmt.Println("Press [Enter] to confirm, or any other key to cancel: ") 17 | line, _ := bufio.NewReader(os.Stdin).ReadString('\n') 18 | if strings.TrimRight(line, "\r\n") != "" { 19 | fmt.Println(aurora.Red("Aborted.")) 20 | os.Exit(0) 21 | } 22 | 23 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 24 | Command: "git", 25 | Args: []string{"restore", "."}, 26 | }) 27 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 28 | Command: "git", 29 | Args: []string{"clean", "-fd"}, 30 | Exit: true, 31 | }) 32 | } 33 | -------------------------------------------------------------------------------- /config/uup-dump/10/ConvertConfig.ini: -------------------------------------------------------------------------------- 1 | [convert-UUP] 2 | AutoStart =1 3 | AddUpdates =1 4 | Cleanup =1 5 | ResetBase =1 6 | NetFx3 =0 7 | StartVirtual =0 8 | wim2esd =0 9 | wim2swm =0 10 | SkipISO =0 11 | SkipWinRE =1 12 | LCUwinre =0 13 | UpdtBootFiles=1 14 | ForceDism =0 15 | RefESD =0 16 | SkipLCUmsu =1 17 | SkipEdge =1 18 | AutoExit =0 19 | AddDrivers =0 20 | DisableUpdatingUpgrade=0 21 | Drv_Source =\Drivers 22 | 23 | [Store_Apps] 24 | SkipApps =0 25 | AppsLevel =0 26 | StubAppsFull =0 27 | CustomList =CustomAppsList.txt 28 | 29 | [create_virtual_editions] 30 | vUseDism =1 31 | vAutoStart =1 32 | vDeleteSource=0 33 | vPreserve =0 34 | vwim2esd =0 35 | vwim2swm =0 36 | vSkipISO =0 37 | vAutoEditions= -------------------------------------------------------------------------------- /src/helpers/cmd.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "os" 5 | "os/exec" 6 | ) 7 | 8 | type ExecCommandOptions struct { 9 | Command string 10 | Args []string 11 | 12 | Exit bool 13 | NoStdin bool 14 | NoStdout bool 15 | NoStderr bool 16 | } 17 | 18 | func ExecNativeCommand(options ExecCommandOptions) error { 19 | cmd := exec.Command(options.Command, options.Args...) 20 | 21 | if !options.NoStdin { 22 | cmd.Stdin = os.Stdin 23 | } 24 | 25 | if !options.NoStdout { 26 | cmd.Stdout = os.Stdout 27 | } 28 | 29 | if !options.NoStderr { 30 | cmd.Stderr = os.Stderr 31 | } 32 | 33 | err := cmd.Run() 34 | if err != nil && options.Exit { 35 | if ee, ok := err.(*exec.ExitError); ok { 36 | os.Exit(ee.ExitCode()) 37 | } else { 38 | os.Exit(1) 39 | } 40 | } 41 | 42 | return err 43 | } 44 | -------------------------------------------------------------------------------- /__install-config.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | 4 | echo ^> Setting up git config... 5 | git config --global user.name "Nazmus Sayad" 6 | git config --global user.email "87106526+NazmusSayad@users.noreply.github.com" 7 | git config --global init.defaultBranch main 8 | git config --global core.eol lf 9 | git config --global core.autocrlf false 10 | git config --global core.pager cat 11 | git config --global core.ignorecase false 12 | git config --global --add safe.directory "*" 13 | git config --global --add --bool push.autoSetupRemote true 14 | 15 | echo ^> pnpm config settings... 16 | call pnpm config set ci true 17 | call pnpm config set allow-scripts true 18 | call pnpm config set shamefully-hoist true 19 | call pnpm config set auto-install-peers true 20 | 21 | echo ^> Symlinking 22 | call symlink-setup.exe 23 | 24 | echo. 25 | pause -------------------------------------------------------------------------------- /src/helpers/detached-elevate.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "strings" 5 | "syscall" 6 | "unsafe" 7 | ) 8 | 9 | var ( 10 | shell32 = syscall.NewLazyDLL("shell32.dll") 11 | procShellExecW = shell32.NewProc("ShellExecuteW") 12 | ) 13 | 14 | func DetachedElevate(exe string, args ...string) error { 15 | verb := syscall.StringToUTF16Ptr("runas") 16 | path := syscall.StringToUTF16Ptr(exe) 17 | 18 | var params *uint16 19 | if len(args) > 0 { 20 | p := strings.Join(args, " ") 21 | params = syscall.StringToUTF16Ptr(p) 22 | } 23 | 24 | // 0 = SW_HIDE 25 | r, _, _ := procShellExecW.Call( 26 | 0, 27 | uintptr(unsafe.Pointer(verb)), 28 | uintptr(unsafe.Pointer(path)), 29 | uintptr(unsafe.Pointer(params)), 30 | 0, 31 | 0, 32 | ) 33 | if r <= 32 { 34 | return syscall.Errno(r) 35 | } 36 | return nil 37 | } 38 | -------------------------------------------------------------------------------- /config/uup-dump/11/ConvertConfig.ini: -------------------------------------------------------------------------------- 1 | [convert-UUP] 2 | AutoStart =1 3 | AddUpdates =1 4 | Cleanup =1 5 | ResetBase =1 6 | NetFx3 =0 7 | StartVirtual =0 8 | wim2esd =0 9 | wim2swm =0 10 | SkipISO =0 11 | SkipWinRE =0 12 | LCUwinre =0 13 | LCUmsuExpand =0 14 | UpdtBootFiles=0 15 | ForceDism =0 16 | RefESD =0 17 | SkipEdge =1 18 | SkipLCUmsu =1 19 | AutoExit =0 20 | DisableUpdatingUpgrade=0 21 | AddDrivers =0 22 | Drv_Source =\Drivers 23 | 24 | [Store_Apps] 25 | SkipApps =0 26 | AppsLevel =0 27 | StubAppsFull =0 28 | CustomList =CustomAppsList.txt 29 | 30 | [create_virtual_editions] 31 | vUseDism =1 32 | vAutoStart =1 33 | vDeleteSource=0 34 | vPreserve =0 35 | vwim2esd =0 36 | vwim2swm =0 37 | vSkipISO =0 38 | vAutoEditions= 39 | vSortEditions= 40 | -------------------------------------------------------------------------------- /config/zed/keymap.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "context": "Editor", 4 | "bindings": { "ctrl-shift-k": null } 5 | }, 6 | { 7 | "context": "(Editor && showing_completions)", 8 | "bindings": { "tab": null } 9 | }, 10 | 11 | { 12 | "context": "Editor", 13 | "bindings": { "ctrl-e": "editor::RevealInFileManager" } 14 | }, 15 | { 16 | "context": "Editor", 17 | "bindings": { "ctrl-shift-delete": "editor::DeleteLine" } 18 | }, 19 | { 20 | "context": "showing_completions", 21 | "bindings": { "tab": "editor::ContextMenuNext" } 22 | }, 23 | { 24 | "context": "showing_completions", 25 | "bindings": { "shift-tab": "editor::ContextMenuPrevious" } 26 | }, 27 | { 28 | "context": "Workspace", 29 | "bindings": { 30 | "f1": null 31 | } 32 | }, 33 | { 34 | "context": "Editor", 35 | "bindings": { 36 | "f1": "editor::ToggleFold" 37 | } 38 | } 39 | ] 40 | -------------------------------------------------------------------------------- /src/ps1/delete-tasks.ps1: -------------------------------------------------------------------------------- 1 | # Disables Telemetry Scheduled Tasks 2 | $scheduledTasks = @( 3 | "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser", 4 | "Microsoft\Windows\Application Experience\ProgramDataUpdater", 5 | "Microsoft\Windows\Autochk\Proxy", 6 | "Microsoft\Windows\Customer Experience Improvement Program\Consolidator", 7 | "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip", 8 | "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector", 9 | "Microsoft\Windows\Feedback\Siuf\DmClient", 10 | "Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload", 11 | "Microsoft\Windows\Windows Error Reporting\QueueReporting", 12 | "Microsoft\Windows\Application Experience\MareBackup", 13 | "Microsoft\Windows\Application Experience\StartupAppTask", 14 | "Microsoft\Windows\Application Experience\PcaPatchDbTask", 15 | "Microsoft\Windows\Maps\MapsUpdateTask" 16 | ) 17 | foreach ($task in $scheduledTasks) { 18 | schtasks /Change /TN $task /Disable 19 | } -------------------------------------------------------------------------------- /__windows-setup.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | powershell -Command "if (-not([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { exit 1 }" 3 | if %errorLevel% NEQ 0 ( 4 | echo This script requires administrator privileges. 5 | echo Press any key to exit... 6 | pause >nul 7 | exit /b 8 | ) 9 | 10 | cd /d "%~dp0" 11 | 12 | echo Running with administrator privileges. 13 | echo. 14 | 15 | setlocal enabledelayedexpansion 16 | 17 | :: Set execution policy equivalent (batch files run by default) 18 | :: Execute all PowerShell scripts in the scripts directory 19 | for %%f in (.\src\ps1\*.ps1) do ( 20 | echo Executing: %%f 21 | powershell.exe -ExecutionPolicy RemoteSigned -File "%%f" 22 | if !errorlevel! neq 0 ( 23 | echo Error executing %%f 24 | pause 25 | exit /b !errorlevel! 26 | ) 27 | ) 28 | 29 | :: Restart computer 30 | echo. 31 | echo All scripts executed successfully. 32 | echo. 33 | echo Press any key to restart the computer... 34 | pause >nul 35 | echo Restarting computer... 36 | shutdown /r /f /t 0 37 | -------------------------------------------------------------------------------- /src/scripts/git-pull-merge/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "dotfiles/src/helpers" 5 | "fmt" 6 | "os" 7 | "os/exec" 8 | "strings" 9 | 10 | "github.com/logrusorgru/aurora/v4" 11 | ) 12 | 13 | func main() { 14 | currentBranch := "" 15 | if out, err := exec.Command("git", "branch", "--show-current").Output(); err == nil { 16 | currentBranch = strings.TrimSpace(string(out)) 17 | } 18 | 19 | targetBranch := "" 20 | if len(os.Args) == 1 { 21 | fmt.Println(aurora.Faint("No branch specified, using current branch")) 22 | targetBranch = currentBranch 23 | } else if len(os.Args) == 2 { 24 | targetBranch = os.Args[1] 25 | } else { 26 | fmt.Fprintln(os.Stderr, "Usage: gp [branch]") 27 | os.Exit(1) 28 | } 29 | 30 | fmt.Printf("Pulling changes from %s into %s (default)\n", aurora.Yellow(targetBranch), aurora.Red(currentBranch)) 31 | 32 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 33 | Command: "git", 34 | Args: []string{"prune", "--progress"}, 35 | }) 36 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 37 | Command: "git", 38 | Args: []string{"pull", "origin", targetBranch, "--progress"}, 39 | Exit: true, 40 | }) 41 | } 42 | -------------------------------------------------------------------------------- /src/scripts/git-pull-rebase/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "dotfiles/src/helpers" 5 | "fmt" 6 | "os" 7 | "os/exec" 8 | "strings" 9 | 10 | "github.com/logrusorgru/aurora/v4" 11 | ) 12 | 13 | func main() { 14 | currentBranch := "" 15 | if out, err := exec.Command("git", "branch", "--show-current").Output(); err == nil { 16 | currentBranch = strings.TrimSpace(string(out)) 17 | } 18 | 19 | targetBranch := "" 20 | if len(os.Args) == 1 { 21 | fmt.Println(aurora.Faint("No branch specified, using current branch")) 22 | targetBranch = currentBranch 23 | } else if len(os.Args) == 2 { 24 | targetBranch = os.Args[1] 25 | } else { 26 | fmt.Fprintln(os.Stderr, "Usage: gp [branch]") 27 | os.Exit(1) 28 | } 29 | 30 | fmt.Printf("Pulling changes from %s into %s (rebase)\n", aurora.Yellow(targetBranch), aurora.Red(currentBranch)) 31 | 32 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 33 | Command: "git", 34 | Args: []string{"prune", "--progress"}, 35 | }) 36 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 37 | Command: "git", 38 | Args: []string{"pull", "origin", targetBranch, "--progress", "--rebase"}, 39 | Exit: true, 40 | }) 41 | } 42 | -------------------------------------------------------------------------------- /src/scripts/winget-upgrade/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "dotfiles/src/helpers" 5 | "dotfiles/src/helpers/winget" 6 | "fmt" 7 | "slices" 8 | 9 | "github.com/logrusorgru/aurora/v4" 10 | ) 11 | 12 | func main() { 13 | packages := winget.GetWingetPackages() 14 | 15 | var packageIDs []string 16 | upgradeablePackages := winget.GetUpgradeablePackages() 17 | 18 | for _, p := range upgradeablePackages { 19 | fmt.Println() 20 | fmt.Println("ID:", p.ID) 21 | fmt.Println("Current Version: " + aurora.Red(p.Version).String()) 22 | fmt.Println("Available Version: " + aurora.Green(p.Available).String()) 23 | packageIDs = append(packageIDs, p.ID) 24 | } 25 | 26 | for _, p := range packages { 27 | if !slices.Contains(packageIDs, p.ID) { 28 | continue 29 | } 30 | 31 | if p.SkipUpgrade || p.Version != "" { 32 | fmt.Println() 33 | fmt.Println(aurora.Faint("- Skipping " + p.ID)) 34 | continue 35 | } 36 | 37 | fmt.Println() 38 | fmt.Println(aurora.Faint("- Upgrading " + p.ID)) 39 | 40 | args := winget.BuildWingetUpgradeCommands(p) 41 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 42 | Command: args[0], 43 | Args: args[1:], 44 | }) 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/helpers/slack/launch.go: -------------------------------------------------------------------------------- 1 | package slack_helpers 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | ) 7 | 8 | var bangladeshTZ = time.FixedZone("GMT+6", 6*60*60) 9 | 10 | type SlackStatus string 11 | 12 | const ( 13 | SlackStatusAlways SlackStatus = "always" 14 | SlackStatusWorkTime SlackStatus = "work-hours" 15 | SlackStatusDisabled SlackStatus = "disabled" 16 | ) 17 | 18 | func isWorkTime() bool { 19 | now := time.Now().In(bangladeshTZ) 20 | weekday := now.Weekday() 21 | hour := now.Hour() 22 | 23 | if weekday == time.Friday || weekday == time.Saturday { 24 | return false 25 | } 26 | 27 | return hour >= 6 && hour < 20 28 | } 29 | 30 | func SlackLaunch(status SlackStatus) { 31 | switch status { 32 | case SlackStatusAlways: 33 | fmt.Println("> Starting Slack...") 34 | SlackApplicationStart() 35 | 36 | case SlackStatusDisabled: 37 | fmt.Println("> Stopping Slack...") 38 | SlackApplicationStop() 39 | 40 | case SlackStatusWorkTime: 41 | if isWorkTime() { 42 | fmt.Println("> Currently in work time, starting Slack...") 43 | SlackApplicationStart() 44 | } else { 45 | fmt.Println("> Currently not in work time, stopping Slack...") 46 | SlackApplicationStop() 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/helpers/symlink.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path/filepath" 7 | 8 | "github.com/logrusorgru/aurora/v4" 9 | ) 10 | 11 | type SymlinkConfig struct { 12 | Source string 13 | Target string 14 | } 15 | 16 | func GenerateSymlink(source string, target string) { 17 | fmt.Println(aurora.Faint("Symlinking: " + source)) 18 | 19 | if !IsFileExists(source) { 20 | fmt.Println(aurora.Red("UNEXPECTED: Source not found: " + source)) 21 | return 22 | } 23 | 24 | if IsFileExists(target) { 25 | removeErr := os.RemoveAll(target) 26 | if removeErr != nil { 27 | fmt.Println(aurora.Red("UNEXPECTED: Error deleting target: " + target)) 28 | return 29 | } 30 | } 31 | 32 | targetDir := filepath.Dir(target) 33 | if !IsFileExists(targetDir) { 34 | mkdirErr := os.MkdirAll(targetDir, 0755) 35 | if mkdirErr != nil { 36 | fmt.Println(aurora.Red("UNEXPECTED: Error creating target directory: " + targetDir)) 37 | return 38 | } 39 | } 40 | 41 | err := os.Symlink(source, target) 42 | if err != nil { 43 | fmt.Println(aurora.BrightRed("UNEXPECTED: Error creating symlink: " + err.Error())) 44 | return 45 | } 46 | 47 | fmt.Println(aurora.Green("-> " + target)) 48 | } 49 | -------------------------------------------------------------------------------- /src/scripts/symlink-setup/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | helpers "dotfiles/src/helpers" 5 | "encoding/json" 6 | "fmt" 7 | "os" 8 | 9 | "github.com/logrusorgru/aurora/v4" 10 | ) 11 | 12 | type SymlinkConfig struct { 13 | Source string 14 | Target string 15 | } 16 | 17 | func parseSymlinkConfig() []SymlinkConfig { 18 | jsonBytes, err := helpers.ReadDotfilesConfigJSONC("./config/symlink.jsonc") 19 | 20 | if err != nil { 21 | fmt.Println(aurora.Red("Error reading JSON file...")) 22 | return []SymlinkConfig{} 23 | } 24 | 25 | var symlinkConfigs []SymlinkConfig 26 | if err := json.Unmarshal(jsonBytes, &symlinkConfigs); err != nil { 27 | return []SymlinkConfig{} 28 | } 29 | 30 | return symlinkConfigs 31 | } 32 | 33 | func main() { 34 | helpers.EnsureAdminExecution() 35 | 36 | symlinkConfigs := parseSymlinkConfig() 37 | if len(symlinkConfigs) == 0 { 38 | fmt.Println("No symlink configurations found.") 39 | os.Exit(1) 40 | } 41 | 42 | for _, config := range symlinkConfigs { 43 | sourcePath := helpers.ResolvePath(config.Source) 44 | targetPath := helpers.ResolvePath(config.Target) 45 | 46 | fmt.Println() 47 | helpers.GenerateSymlink(sourcePath, targetPath) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/scripts/git-clone/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "dotfiles/src/helpers" 5 | "fmt" 6 | "os" 7 | "os/exec" 8 | "regexp" 9 | "strings" 10 | 11 | "github.com/logrusorgru/aurora/v4" 12 | ) 13 | 14 | func main() { 15 | if len(os.Args) < 2 { 16 | fmt.Println(aurora.Red("Usage: c [additional-arguments]")) 17 | os.Exit(1) 18 | } 19 | 20 | inputPath := os.Args[1] 21 | resolvedPath := "" 22 | 23 | re := regexp.MustCompile(`^[^/]+(/[^/]+)?$`) 24 | if re.MatchString(inputPath) { 25 | fmt.Println(aurora.Faint("Using GitHub CLI to resolve URL...")) 26 | 27 | ghCloneCmd := exec.Command("gh", "repo", "view", inputPath, "--json", "url", "-q", ".url") 28 | out, err := ghCloneCmd.Output() 29 | if err != nil { 30 | fmt.Println(aurora.Faint(aurora.Red("Failed to resolve repository with GitHub CLI"))) 31 | } else { 32 | resolvedPath = strings.TrimSpace(string(out)) 33 | fmt.Println(aurora.Faint(aurora.Green("GitHub URL: " + resolvedPath))) 34 | } 35 | } 36 | 37 | gitCloneArgs := []string{"clone"} 38 | if resolvedPath != "" { 39 | gitCloneArgs = append(gitCloneArgs, resolvedPath) 40 | } else { 41 | gitCloneArgs = append(gitCloneArgs, os.Args[1:]...) 42 | } 43 | 44 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 45 | Command: "git", 46 | Args: gitCloneArgs, 47 | Exit: true, 48 | }) 49 | } 50 | -------------------------------------------------------------------------------- /src/scripts/windows-startup/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | helpers "dotfiles/src/helpers" 5 | "encoding/json" 6 | "fmt" 7 | "os" 8 | ) 9 | 10 | type LaunchConfig struct { 11 | Name string 12 | Path string 13 | Args []string 14 | Skip bool 15 | Admin bool 16 | } 17 | 18 | func main() { 19 | data, err := helpers.ReadDotfilesConfigJSONC("./config/launch.jsonc") 20 | if err != nil { 21 | fmt.Println("Error reading JSON file...") 22 | os.Exit(1) 23 | } 24 | 25 | var launchConfigs []LaunchConfig 26 | if err := json.Unmarshal(data, &launchConfigs); err != nil { 27 | fmt.Println("Error unmarshalling JSON into LaunchConfig...") 28 | os.Exit(1) 29 | } 30 | 31 | for _, config := range launchConfigs { 32 | if config.Skip { 33 | fmt.Println("Skipping", config.Name) 34 | continue 35 | } 36 | 37 | resolvedCommand := helpers.ResolvePath(config.Path) 38 | fmt.Println("Starting: (", config.Admin, ")", config.Name, resolvedCommand) 39 | 40 | if config.Admin { 41 | err := helpers.DetachedElevate(resolvedCommand, config.Args...) 42 | if err != nil { 43 | fmt.Println("Error elevating", config.Name) 44 | continue 45 | } 46 | } else { 47 | err := helpers.DetachedExec(resolvedCommand, config.Args...) 48 | if err != nil { 49 | fmt.Println("Error executing", config.Name) 50 | continue 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/constants/constants.go: -------------------------------------------------------------------------------- 1 | package constants 2 | 3 | const SOURCE_DIR = "./src" 4 | const BUILD_DIR = "./.build" 5 | 6 | const SCRIPTS_SOURCE_DIR = SOURCE_DIR + "/scripts" 7 | const SCRIPTS_BUILD_BIN_DIR = BUILD_DIR + "/bin" 8 | 9 | type Script struct { 10 | Exe string 11 | StartMenuName string 12 | } 13 | 14 | var SCRIPTS_MAP = map[string]Script{ 15 | "git-clone": { 16 | Exe: "c", 17 | }, 18 | 19 | "git-checkout": { 20 | Exe: "gc", 21 | }, 22 | 23 | "git-pull": { 24 | Exe: "gp", 25 | }, 26 | 27 | "git-pull-rebase": { 28 | Exe: "gpr", 29 | }, 30 | 31 | "git-pull-merge": { 32 | Exe: "gpm", 33 | }, 34 | 35 | "gh-repo-view": { 36 | Exe: "ghv", 37 | }, 38 | 39 | "gh-repo-view-web": { 40 | Exe: "ghw", 41 | }, 42 | 43 | "gh-pr-create": { 44 | Exe: "ghp", 45 | }, 46 | 47 | "file-sys-case": { 48 | Exe: "fscs", 49 | }, 50 | 51 | "gpg-unlock": { 52 | StartMenuName: "GPG Unlock", 53 | }, 54 | 55 | "clean-code-snippets": { 56 | StartMenuName: "Clean Code Snippets", 57 | }, 58 | 59 | "msys-setup": { 60 | StartMenuName: "MSYS2 Setup", 61 | }, 62 | 63 | "symlink-setup": { 64 | StartMenuName: "Symlink Setup", 65 | }, 66 | 67 | "slack-status": { 68 | StartMenuName: "Slack Status", 69 | }, 70 | 71 | "winget-install": { 72 | StartMenuName: "WinGet Install", 73 | }, 74 | 75 | "winget-upgrade": { 76 | StartMenuName: "WinGet Upgrade", 77 | }, 78 | } 79 | -------------------------------------------------------------------------------- /src/compile-go/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | constants "dotfiles/src/constants" 5 | "dotfiles/src/helpers" 6 | "fmt" 7 | "os" 8 | "path/filepath" 9 | 10 | "github.com/logrusorgru/aurora/v4" 11 | ) 12 | 13 | func main() { 14 | cwd, err := os.Getwd() 15 | if err != nil { 16 | panic(err) 17 | } 18 | 19 | sourceDir := filepath.Join(cwd, constants.SCRIPTS_SOURCE_DIR) 20 | outputDir := filepath.Join(cwd, constants.SCRIPTS_BUILD_BIN_DIR) 21 | 22 | os.RemoveAll(outputDir) 23 | if !helpers.IsFileExists(outputDir) { 24 | os.MkdirAll(outputDir, 0755) 25 | } 26 | 27 | entries, err := os.ReadDir(sourceDir) 28 | if err != nil { 29 | panic(err) 30 | } 31 | 32 | for _, entry := range entries { 33 | if !entry.IsDir() { 34 | continue 35 | } 36 | 37 | entryName := entry.Name() 38 | outputName := constants.SCRIPTS_MAP[entryName].Exe 39 | if outputName == "" { 40 | outputName = entryName 41 | } 42 | 43 | sourcePath := filepath.Join(sourceDir, entryName, "main.go") 44 | outputPath := filepath.Join(outputDir, outputName+".exe") 45 | 46 | if !helpers.IsFileExists(sourcePath) { 47 | fmt.Println(aurora.Red("Source file not found: " + sourcePath)) 48 | continue 49 | } 50 | 51 | fmt.Println(aurora.Faint("> Building with Go: " + entryName)) 52 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 53 | Command: "go", 54 | Args: []string{"build", "-o", outputPath, sourcePath}, 55 | }) 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /config/symlink.jsonc: -------------------------------------------------------------------------------- 1 | [ 2 | // Shell Configs 3 | { 4 | "source": "./config/shell/fish-config.sh", 5 | "target": "$USERPROFILE/.config/fish/config.fish" 6 | }, 7 | { 8 | "source": "./config/shell/bash-config.sh", 9 | "target": "$USERPROFILE/.bashrc" 10 | }, 11 | { 12 | "source": "./config/shell/zsh-config.sh", 13 | "target": "$USERPROFILE/.zshrc" 14 | }, 15 | 16 | // Terminal Configs 17 | { 18 | "source": "./config/mise.toml", 19 | "target": "$USERPROFILE/.config/mise/config.toml" 20 | }, 21 | { 22 | "source": "./config/starship.toml", 23 | "target": "$USERPROFILE/.config/starship.toml" 24 | }, 25 | { 26 | "source": "./config/fastfetch.jsonc", 27 | "target": "$USERPROFILE/.config/fastfetch/config.jsonc" 28 | }, 29 | { 30 | "source": "./config/windows-terminal.json", 31 | "target": "$LOCALAPPDATA/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState/settings.json" 32 | }, 33 | 34 | // Zed Code Editor 35 | { 36 | "source": "./config/zed", 37 | "target": "$APPDATA/zed" 38 | }, 39 | 40 | // VS Code -> Cursor Configs 41 | { 42 | "source": "$APPDATA/Code/User/settings.json", 43 | "target": "$APPDATA/Cursor/User/settings.json" 44 | }, 45 | { 46 | "source": "$APPDATA/Code/User/keybindings.json", 47 | "target": "$APPDATA/Cursor/User/keybindings.json" 48 | }, 49 | { 50 | "source": "$APPDATA/Code/User/snippets", 51 | "target": "$APPDATA/Cursor/User/snippets" 52 | } 53 | ] 54 | -------------------------------------------------------------------------------- /src/install-start-menu/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "dotfiles/src/constants" 5 | "dotfiles/src/helpers" 6 | "fmt" 7 | "os" 8 | "os/exec" 9 | "path/filepath" 10 | "strings" 11 | ) 12 | 13 | var escape = func(s string) string { return strings.ReplaceAll(s, "'", "''") } 14 | 15 | func main() { 16 | 17 | proxyPausePath, err := exec.LookPath("proxy-pause") 18 | if err != nil { 19 | fmt.Println("proxy-pause not found in PATH") 20 | os.Exit(1) 21 | } 22 | 23 | startMenuDir := filepath.Join(os.Getenv("APPDATA"), "Microsoft", "Windows", "Start Menu", "Programs", "dotfiles") 24 | if helpers.IsFileExists(startMenuDir) { 25 | fmt.Println("Removing", startMenuDir) 26 | os.RemoveAll(startMenuDir) 27 | } 28 | os.MkdirAll(startMenuDir, 0755) 29 | 30 | for scriptName, script := range constants.SCRIPTS_MAP { 31 | if script.StartMenuName == "" { 32 | continue 33 | } 34 | 35 | fmt.Println("> Installing", scriptName, script.StartMenuName) 36 | 37 | shortcutPath := filepath.Join(startMenuDir, script.StartMenuName+".lnk") 38 | targetCommand := `"` + proxyPausePath + `"` 39 | arguments := `"` + scriptName + `"` 40 | 41 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 42 | Command: "powershell", 43 | Args: []string{ 44 | "-NoProfile", 45 | "-NonInteractive", 46 | "-Command", 47 | "$s='" + escape(targetCommand) + "';$a='" + escape(arguments) + "';$t='" + escape(shortcutPath) + "';$ws=New-Object -ComObject WScript.Shell;$sc=$ws.CreateShortcut($t);$sc.TargetPath=$s;$sc.Arguments=$a;$sc.Save()", 48 | }, 49 | }) 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/helpers/fs.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "os" 7 | "path/filepath" 8 | "strings" 9 | 10 | "github.com/logrusorgru/aurora/v4" 11 | "github.com/tidwall/jsonc" 12 | ) 13 | 14 | func ResolvePath(input string) string { 15 | if strings.HasPrefix(input, ".") { 16 | homeDir, err := os.UserHomeDir() 17 | if err != nil { 18 | fmt.Println(aurora.Red("Error: failed to get user home directory: " + err.Error())) 19 | os.Exit(1) 20 | } 21 | 22 | dotfilesPath := filepath.Join(homeDir, ".dotfiles") 23 | 24 | if _, err := os.Stat(dotfilesPath); err == nil { 25 | input = filepath.Join(dotfilesPath, input) 26 | } else { 27 | fmt.Println(aurora.Red("Error: .dotfiles directory not found.")) 28 | fmt.Println(aurora.Yellow("Please run __install-dotfiles.cmd to install the dotfiles.")) 29 | os.Exit(1) 30 | } 31 | } 32 | 33 | return os.ExpandEnv(input) 34 | } 35 | 36 | func ReadDotfilesConfigJSONC(path string) ([]byte, error) { 37 | resolvedPath := ResolvePath(path) 38 | fmt.Println(aurora.Faint("JSON: " + resolvedPath)) 39 | 40 | f, err := os.Open(resolvedPath) 41 | if err != nil { 42 | fmt.Println(aurora.Red("JSON: failed to open file")) 43 | return nil, err 44 | } 45 | defer f.Close() 46 | 47 | data, err := io.ReadAll(f) 48 | if err != nil { 49 | fmt.Println(aurora.Red("JSON: failed to read file")) 50 | return nil, err 51 | } 52 | 53 | return jsonc.ToJSON(data), nil 54 | } 55 | 56 | func IsFileExists(path string) bool { 57 | fi, err := os.Lstat(path) 58 | if err != nil { 59 | return false 60 | } 61 | 62 | _ = fi 63 | return true 64 | } 65 | -------------------------------------------------------------------------------- /src/scripts/gpg-unlock/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "dotfiles/src/helpers" 5 | "fmt" 6 | "os" 7 | "os/exec" 8 | "path/filepath" 9 | "strings" 10 | ) 11 | 12 | func main() { 13 | helpers.EnsureAdminExecution() 14 | fmt.Println("Ensured admin privileges") 15 | 16 | out, err := exec.Command("ps", "aux").Output() 17 | if err == nil { 18 | fmt.Println("Listed processes, scanning for gpg/keyboxd") 19 | for _, kw := range []string{"gpg", "keyboxd"} { 20 | for _, line := range strings.Split(string(out), "\n") { 21 | if line == "" || !strings.Contains(line, kw) || strings.Contains(line, "grep") { 22 | continue 23 | } 24 | for _, f := range strings.Fields(line) { 25 | digits := true 26 | for i := 0; i < len(f); i++ { 27 | if f[i] < '0' || f[i] > '9' { 28 | digits = false 29 | break 30 | } 31 | } 32 | if digits { 33 | fmt.Println("Killing PID", f, "for", kw) 34 | exec.Command("kill", "-9", f).Run() 35 | break 36 | } 37 | } 38 | } 39 | } 40 | } 41 | 42 | home := os.Getenv("HOME") 43 | if home == "" { 44 | home = os.Getenv("USERPROFILE") 45 | if home == "" { 46 | home = "." 47 | } 48 | } 49 | fmt.Println("Using gnupg dir at", filepath.Join(home, ".gnupg")) 50 | 51 | entries, err := os.ReadDir(filepath.Join(home, ".gnupg")) 52 | if err == nil { 53 | for _, e := range entries { 54 | if e.Type().IsRegular() && filepath.Ext(e.Name()) == ".lock" { 55 | fmt.Println("Removing lock file", e.Name()) 56 | os.Remove(filepath.Join(home, ".gnupg", e.Name())) 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/helpers/exec.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | "os" 7 | "os/exec" 8 | "strings" 9 | ) 10 | 11 | func sudoAvailable() bool { 12 | _, err := exec.LookPath("sudo") 13 | return err == nil 14 | } 15 | 16 | func isRunningAsAdmin() bool { 17 | cmd := exec.Command("powershell", "-NoProfile", "-NonInteractive", 18 | "(New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)") 19 | 20 | var out bytes.Buffer 21 | cmd.Stdout = &out 22 | 23 | err := cmd.Run() 24 | if err != nil { 25 | fmt.Println("Failed to check if running as admin.") 26 | os.Exit(1) 27 | } 28 | 29 | return strings.TrimSpace(out.String()) == "True" 30 | } 31 | 32 | func EnsureAdminExecution() { 33 | if isRunningAsAdmin() { 34 | return 35 | } 36 | 37 | exe, exeErr := os.Executable() 38 | if exeErr != nil { 39 | fmt.Println("Failed to get executable path.") 40 | os.Exit(1) 41 | } 42 | 43 | if sudoAvailable() { 44 | cmd := exec.Command("sudo", exe) 45 | cmd.Stdout = os.Stdout 46 | cmd.Stderr = os.Stderr 47 | 48 | err := cmd.Run() 49 | if err != nil { 50 | fmt.Println("Failed to run sudo.") 51 | os.Exit(1) 52 | } 53 | 54 | os.Exit(0) 55 | } 56 | 57 | fmt.Println("Relaunching with elevated privileges...") 58 | 59 | cmd := exec.Command("powershell", "-NoProfile", "-NonInteractive", "-Command", "Start-Process -FilePath '"+exe+"' -Verb RunAs") 60 | err := cmd.Run() 61 | if err != nil { 62 | fmt.Println("Failed to relaunch with elevated privileges.") 63 | os.Exit(1) 64 | } 65 | 66 | os.Exit(0) 67 | } 68 | -------------------------------------------------------------------------------- /src/compile-ahk/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path/filepath" 7 | "strings" 8 | 9 | constants "dotfiles/src/constants" 10 | helpers "dotfiles/src/helpers" 11 | ) 12 | 13 | const ahkScriptPrefix = "AHK-" 14 | 15 | func main() { 16 | srcDir := helpers.ResolvePath(constants.SOURCE_DIR + "/compile-ahk") 17 | buildOutputDir := helpers.ResolvePath(constants.BUILD_DIR + "/ahk") 18 | 19 | ahkScriptsDir := filepath.Join(srcDir, "scripts") 20 | ahk2ExeBin := filepath.Join(srcDir, "bin", "Ahk2Exe.exe") 21 | ahkCompilerBin := filepath.Join(srcDir, "bin", "AutoHotkey64.exe") 22 | 23 | entries, err := os.ReadDir(ahkScriptsDir) 24 | if err != nil { 25 | panic(err) 26 | } 27 | 28 | if err := os.MkdirAll(buildOutputDir, 0755); err != nil { 29 | panic(err) 30 | } 31 | 32 | for _, entry := range entries { 33 | if entry.IsDir() { 34 | continue 35 | } 36 | if !strings.HasSuffix(entry.Name(), ".ahk") { 37 | continue 38 | } 39 | 40 | fileName := strings.TrimSuffix(entry.Name(), ".ahk") 41 | inPath := filepath.Join(ahkScriptsDir, entry.Name()) 42 | outPath := filepath.Join(buildOutputDir, ahkScriptPrefix+fileName+".exe") 43 | 44 | iconPath := filepath.Join(ahkScriptsDir, fileName+".ico") 45 | spawnArgs := []string{"/base", ahkCompilerBin, "/in", inPath, "/out", outPath} 46 | if _, err := os.Stat(iconPath); err == nil { 47 | spawnArgs = append(spawnArgs, "/icon", iconPath) 48 | } 49 | 50 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 51 | Command: ahk2ExeBin, 52 | Args: spawnArgs, 53 | }) 54 | 55 | fmt.Printf("Compiled: %s\n", entry.Name()) 56 | } 57 | 58 | fmt.Println("Compilation complete") 59 | } 60 | -------------------------------------------------------------------------------- /__install-dotfiles.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | 4 | net session >nul 2>&1 5 | if %errorLevel% NEQ 0 ( 6 | echo FAIL: Administrator privileges required. 7 | echo Relaunching with elevated privileges... 8 | powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs" 9 | exit /b 10 | ) 11 | 12 | set "CURRENT_DIR=%~dp0" 13 | set "CURRENT_DIR=%CURRENT_DIR:~0,-1%" 14 | set "DOTFILES_DIR=%USERPROFILE%\.dotfiles" 15 | 16 | :: Remove existing .dotfiles directory/link 17 | if exist "%DOTFILES_DIR%" ( 18 | echo Removing existing .dotfiles directory/link... 19 | rmdir /S /Q "%DOTFILES_DIR%" 2>nul 20 | if exist "%DOTFILES_DIR%" ( 21 | del /F /Q "%DOTFILES_DIR%" 2>nul 22 | ) 23 | ) 24 | 25 | :: Create symbolic link 26 | mklink /D "%DOTFILES_DIR%" "%CURRENT_DIR%" 27 | if %errorLevel% NEQ 0 ( 28 | echo FAIL: Could not create symbolic link. 29 | echo Press any key to exit... 30 | pause >nul 31 | exit /b 1 32 | ) 33 | 34 | :: Set up PATH environment variable 35 | echo. 36 | echo Setting up PATH environment variable... 37 | set "DOTFILES_BIN=%DOTFILES_DIR%\.build\bin" 38 | 39 | echo %PATH% | find /i "%DOTFILES_BIN%" >nul 40 | if %errorLevel% EQU 0 ( 41 | echo OK: %DOTFILES_BIN% already in PATH. 42 | ) else ( 43 | setx Path "%DOTFILES_BIN%;%PATH%" /M >nul 44 | 45 | if %errorLevel% EQU 0 ( 46 | echo OK: PATH updated successfully. 47 | ) else ( 48 | echo FAIL: Could not update PATH. 49 | echo Press any key to exit... 50 | pause >nul 51 | exit /b 1 52 | ) 53 | ) 54 | 55 | echo. 56 | echo SUCCESS: Dotfiles installation completed. 57 | pause -------------------------------------------------------------------------------- /src/scripts/git-checkout/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "dotfiles/src/helpers" 5 | "fmt" 6 | "os" 7 | "os/exec" 8 | "strings" 9 | 10 | "github.com/logrusorgru/aurora/v4" 11 | ) 12 | 13 | func main() { 14 | branch := "" 15 | if len(os.Args) > 1 { 16 | branch = os.Args[1] 17 | } 18 | 19 | if branch == "" { 20 | fmt.Println(aurora.Red("Branch name required")) 21 | os.Exit(1) 22 | } 23 | 24 | if strings.HasPrefix(branch, "-") { 25 | fmt.Println(aurora.Red("Invalid branch name: " + branch)) 26 | os.Exit(1) 27 | } 28 | 29 | remote := "" 30 | if out, err := exec.Command("git", "remote").Output(); err == nil { 31 | s := strings.TrimSpace(string(out)) 32 | if s != "" { 33 | remote = strings.Split(s, "\n")[0] 34 | } 35 | } 36 | 37 | if isLocalBranchExists(branch) || isRemoteBranchExists(remote, branch) { 38 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 39 | Command: "git", 40 | Args: append([]string{"checkout"}, os.Args[1:]...), 41 | Exit: true, 42 | }) 43 | } else { 44 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 45 | Command: "git", 46 | Args: append([]string{"checkout", "-b"}, os.Args[1:]...), 47 | Exit: true, 48 | }) 49 | } 50 | } 51 | 52 | func isLocalBranchExists(branch string) bool { 53 | return helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 54 | Command: "git", 55 | Args: []string{"rev-parse", "--verify", "--quiet", "refs/heads/" + branch}, 56 | }) == nil 57 | } 58 | 59 | func isRemoteBranchExists(remote string, branch string) bool { 60 | return helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 61 | Command: "git", 62 | Args: []string{"rev-parse", "--verify", "--quiet", "refs/remotes/" + remote + "/" + branch}, 63 | }) == nil 64 | } 65 | -------------------------------------------------------------------------------- /src/helpers/slack/runtime.go: -------------------------------------------------------------------------------- 1 | package slack_helpers 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "os/exec" 7 | "path/filepath" 8 | "runtime" 9 | "strings" 10 | 11 | helpers "dotfiles/src/helpers" 12 | ) 13 | 14 | func IsSlackRunning() bool { 15 | err := helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 16 | Command: "powershell", 17 | Args: []string{"-NoProfile", "-Command", "Get-Process -Name 'slack' -ErrorAction SilentlyContinue"}, 18 | }) 19 | 20 | return err == nil 21 | } 22 | 23 | func GetSlackRuntimePath() (string, error) { 24 | slackPath := filepath.Join(os.Getenv("LOCALAPPDATA"), "slack") 25 | slackBaseExe := filepath.Join(slackPath, "slack.exe") 26 | 27 | out, err := exec.Command("powershell", "-NoProfile", "-Command", "(Get-Item '"+slackBaseExe+"').VersionInfo.ProductVersion").Output() 28 | if err != nil { 29 | return "", err 30 | } 31 | 32 | productVersion := strings.TrimSpace(string(out)) 33 | runtimePath := filepath.Join(slackPath, "app-"+productVersion, "slack.exe") 34 | if _, err := os.Stat(runtimePath); err != nil { 35 | return "", err 36 | } 37 | 38 | return runtimePath, nil 39 | } 40 | 41 | func SlackApplicationStart() { 42 | if IsSlackRunning() { 43 | return 44 | } 45 | 46 | runtimePath, err := GetSlackRuntimePath() 47 | if err != nil { 48 | fmt.Println("Error: Failed to get application runtime path") 49 | return 50 | } 51 | 52 | err = helpers.DetachedExec(runtimePath, "--startup") 53 | if err != nil { 54 | fmt.Println("Error: Failed to start Slack") 55 | } 56 | } 57 | 58 | func SlackApplicationStop() { 59 | if !IsSlackRunning() { 60 | return 61 | } 62 | 63 | if runtime.GOOS == "windows" { 64 | cmd := exec.Command("taskkill", "/IM", "slack.exe", "/F", "/T") 65 | cmd.Run() 66 | } else { 67 | cmd := exec.Command("pkill", "slack") 68 | cmd.Run() 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/helpers/winsdk/admin.go: -------------------------------------------------------------------------------- 1 | package winsdk 2 | 3 | import ( 4 | "os" 5 | "os/exec" 6 | "path/filepath" 7 | ) 8 | 9 | func ConvertExeToRunAsAdmin(exe string) error { 10 | manifest := ` 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | ` 35 | 36 | manifestPath := filepath.Join(filepath.Dir(exe), "admin.manifest") 37 | if err := os.WriteFile(manifestPath, []byte(manifest), 0644); err != nil { 38 | return err 39 | } 40 | 41 | cmd := exec.Command("mt.exe", 42 | "-manifest", manifestPath, 43 | "-outputresource:"+exe+";#1", 44 | ) 45 | 46 | err := cmd.Run() 47 | os.Remove(manifestPath) 48 | return err 49 | } 50 | -------------------------------------------------------------------------------- /src/scripts/git-clean/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bufio" 5 | "dotfiles/src/helpers" 6 | "fmt" 7 | "os" 8 | "os/exec" 9 | "strings" 10 | 11 | "github.com/logrusorgru/aurora/v4" 12 | ) 13 | 14 | func main() { 15 | current := "" 16 | if out, err := exec.Command("git", "branch", "--show-current").Output(); err == nil { 17 | current = strings.TrimSpace(string(out)) 18 | } 19 | 20 | branchesOut, _ := exec.Command("git", "branch", `--format=%(refname:short)`).Output() 21 | lines := strings.Split(strings.TrimRight(string(branchesOut), "\r\n"), "\n") 22 | 23 | var branches []string 24 | for _, b := range lines { 25 | b = strings.TrimSpace(b) 26 | if b == "" { 27 | continue 28 | } 29 | if current != "" && strings.Contains(b, current) { 30 | continue 31 | } 32 | 33 | branches = append(branches, b) 34 | } 35 | 36 | if len(branches) == 0 { 37 | fmt.Println(aurora.Green("No other branches to delete")) 38 | return 39 | } 40 | 41 | colorfulBranches := []string{} 42 | for _, b := range branches { 43 | colorfulBranches = append(colorfulBranches, aurora.Red(string(b)).Bold().String()) 44 | } 45 | 46 | fmt.Println(aurora.Yellow("Branches to delete: "), strings.Join(colorfulBranches, ", ")) 47 | fmt.Print(aurora.Faint("Press [Enter] to confirm, or any other key to cancel: ")) 48 | 49 | line, _ := bufio.NewReader(os.Stdin).ReadString('\n') 50 | if strings.TrimRight(line, "\r\n") != "" { 51 | fmt.Println(aurora.Green("Cancelled branch deletion")) 52 | return 53 | } 54 | 55 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 56 | Command: "git", 57 | Args: []string{"prune", "--progress"}, 58 | }) 59 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 60 | Command: "git", 61 | Args: append([]string{"branch", "-D"}, branches...), 62 | Exit: true, 63 | }) 64 | 65 | fmt.Println(aurora.Green("Branches deleted")) 66 | } 67 | -------------------------------------------------------------------------------- /src/helpers/env.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "fmt" 5 | "os/exec" 6 | "strings" 7 | ) 8 | 9 | type Scope string 10 | 11 | const ( 12 | ScopeUser Scope = "User" 13 | ScopeMachine Scope = "Machine" 14 | ) 15 | 16 | func execPsCommand(command string) (string, error) { 17 | cmd := exec.Command("powershell", "-c", command) 18 | output, err := cmd.Output() 19 | 20 | if err != nil { 21 | return "", fmt.Errorf("powershell command failed: %v", err) 22 | } 23 | 24 | return strings.TrimSpace(string(output)), nil 25 | } 26 | 27 | func ReadEnv(scope Scope, name string) (string, error) { 28 | return execPsCommand( 29 | fmt.Sprintf(`[System.Environment]::GetEnvironmentVariable("%s", [System.EnvironmentVariableTarget]::%s)`, name, scope), 30 | ) 31 | } 32 | 33 | func WriteEnv(scope Scope, name, value string) (string, error) { 34 | return execPsCommand( 35 | fmt.Sprintf(`[System.Environment]::SetEnvironmentVariable("%s", "%s", [System.EnvironmentVariableTarget]::%s)`, name, value, scope), 36 | ) 37 | } 38 | 39 | func AddToEnvPath(scope Scope, paths ...string) (string, error) { 40 | existingPath, err := ReadEnv(scope, "PATH") 41 | if err != nil { 42 | return "", err 43 | } 44 | 45 | existingPathArray := strings.Split(existingPath, ";") 46 | var filteredPaths []string 47 | for _, p := range existingPathArray { 48 | if p != "" { 49 | filteredPaths = append(filteredPaths, p) 50 | } 51 | } 52 | 53 | pathSet := make(map[string]bool) 54 | var uniquePaths []string 55 | 56 | for _, p := range filteredPaths { 57 | if !pathSet[p] { 58 | pathSet[p] = true 59 | uniquePaths = append(uniquePaths, p) 60 | } 61 | } 62 | 63 | for _, p := range paths { 64 | if !pathSet[p] { 65 | pathSet[p] = true 66 | uniquePaths = append(uniquePaths, p) 67 | } 68 | } 69 | 70 | newPath := strings.Join(uniquePaths, ";") 71 | return WriteEnv(scope, "PATH", newPath) 72 | } 73 | -------------------------------------------------------------------------------- /src/scripts/msys-setup/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | helpers "dotfiles/src/helpers" 5 | "fmt" 6 | "os" 7 | "path/filepath" 8 | "regexp" 9 | ) 10 | 11 | func main() { 12 | helpers.EnsureAdminExecution() 13 | 14 | const MSYS_PATH = "C:\\msys64" 15 | NSSWITCH_CONFIG_PATH := filepath.Join(MSYS_PATH, "etc", "nsswitch.conf") 16 | 17 | MSYS_INIS := []string{ 18 | "msys2.ini", 19 | "clang32.ini", 20 | "clang64.ini", 21 | "clangarm64.ini", 22 | "mingw32.ini", 23 | "mingw64.ini", 24 | "ucrt64.ini", 25 | } 26 | 27 | MSYS_BINS := []string{ 28 | "usr/bin", 29 | "mingw64/bin", 30 | "mingw32/bin", 31 | "ucrt64/bin", 32 | "clang32/bin", 33 | "clang64/bin", 34 | "clangarm64/bin", 35 | } 36 | 37 | reIni := regexp.MustCompile(`(?m)^#MSYS2_PATH_TYPE=inherit`) 38 | for _, ini := range MSYS_INIS { 39 | iniPath := filepath.Join(MSYS_PATH, ini) 40 | if !helpers.IsFileExists(iniPath) { 41 | fmt.Println("File not found: %s\n", iniPath) 42 | continue 43 | } 44 | 45 | content, err := os.ReadFile(iniPath) 46 | if err != nil { 47 | continue 48 | } 49 | 50 | updated := reIni.ReplaceAll(content, []byte("MSYS2_PATH_TYPE=inherit")) 51 | _ = os.WriteFile(iniPath, updated, 0644) 52 | fmt.Println("Updated: %s\n", ini) 53 | } 54 | 55 | if content, err := os.ReadFile(NSSWITCH_CONFIG_PATH); err == nil { 56 | reNss := regexp.MustCompile(`(?m)^(db_home|db_shell|db_gecos):\s*.*$`) 57 | updated := reNss.ReplaceAllString(string(content), "$1: windows") 58 | _ = os.WriteFile(NSSWITCH_CONFIG_PATH, []byte(updated), 0644) 59 | fmt.Println("Updated: nsswitch.conf") 60 | } 61 | 62 | _, _ = helpers.WriteEnv(helpers.ScopeMachine, "MSYS2_PATH_TYPE", "inherit") 63 | 64 | var existingBins []string 65 | for _, rel := range MSYS_BINS { 66 | full := filepath.Join(MSYS_PATH, rel) 67 | if info, err := os.Stat(full); err == nil && info.IsDir() { 68 | existingBins = append(existingBins, full) 69 | } 70 | } 71 | _, _ = helpers.AddToEnvPath(helpers.ScopeMachine, existingBins...) 72 | } 73 | -------------------------------------------------------------------------------- /config/fastfetch.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/master/doc/json_schema.json", 3 | "display": { 4 | "color": "reset_bright_green", 5 | "percent": { 6 | "color": { 7 | "red": "reset_black", 8 | "green": "reset_black", 9 | "yellow": "reset_black" 10 | } 11 | } 12 | }, 13 | "logo": { 14 | "padding": { 15 | "left": 1, 16 | "right": 5 17 | }, 18 | "type": "auto", 19 | "source": "Windows" 20 | }, 21 | "modules": [ 22 | { 23 | "type": "title", 24 | "format": "{#reset_underline_bright_blue}{user-name}{#reset_dim_white}@{#reset_underline_bright_blue}{host-name}" 25 | }, 26 | { 27 | "type": "command", 28 | "outputColor": "dim_white", 29 | "param": "+'%-I:%M:%S %p, %A %y/%m/%d'", 30 | "shell": "date", 31 | "key": " " 32 | }, 33 | "break", 34 | { 35 | "type": "uptime", 36 | "key": "Uptime " 37 | }, 38 | { 39 | "type": "os", 40 | "key": "System ", 41 | "format": "{pretty-name}" 42 | }, 43 | "break", 44 | { 45 | "type": "memory", 46 | "key": " RAM ", 47 | "format": "{used} / {total} {percentage}" 48 | }, 49 | { 50 | "type": "cpu", 51 | "key": " CPU ", 52 | "format": "{name~-9} ({cores-physical}C/{cores-logical}T) {#reset_black}{freq-max}" 53 | }, 54 | "break", 55 | { 56 | "type": "disk", 57 | "key": " {mountpoint} ", 58 | "format": "{size-used} / {size-total} {size-percentage}" 59 | }, 60 | "break", 61 | /* { 62 | "type": "sound", 63 | "key": " Sound ", 64 | "format": "{volume-percentage-bar} {volume-percentage}", 65 | "percent": { 66 | "type": ["bar", "num", "num-color"] 67 | } 68 | }, */ 69 | { 70 | "type": "display", 71 | "key": "󰍹 Monitor ", 72 | "format": "{width}x{height} @ {refresh-rate}Hz", 73 | "order": "desc" 74 | }, 75 | "break" 76 | ] 77 | } 78 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= 2 | github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= 3 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= 4 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= 5 | github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= 6 | github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 7 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 8 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 9 | github.com/logrusorgru/aurora/v4 v4.0.0 h1:sRjfPpun/63iADiSvGGjgA1cAYegEWMPCJdUpJYn9JA= 10 | github.com/logrusorgru/aurora/v4 v4.0.0/go.mod h1:lP0iIa2nrnT/qoFXcOZSrZQpJ1o6n2CUf/hyHi2Q4ZQ= 11 | github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= 12 | github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= 13 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 14 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 15 | github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= 16 | github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= 17 | github.com/tidwall/jsonc v0.3.2 h1:ZTKrmejRlAJYdn0kcaFqRAKlxxFIC21pYq8vLa4p2Wc= 18 | github.com/tidwall/jsonc v0.3.2/go.mod h1:dw+3CIxqHi+t8eFSpzzMlcVYxKp08UP5CD8/uSFCyJE= 19 | golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b h1:MQE+LT/ABUuuvEZ+YQAMSXindAdUh7slEmAkup74op4= 20 | golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 21 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 22 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 23 | -------------------------------------------------------------------------------- /src/scripts/slack-status/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path/filepath" 7 | "strings" 8 | 9 | slack_helpers "dotfiles/src/helpers/slack" 10 | 11 | "github.com/logrusorgru/aurora/v4" 12 | "github.com/manifoldco/promptui" 13 | ) 14 | 15 | func getSlackStatusFilePath() string { 16 | homeDir, _ := os.UserHomeDir() 17 | return filepath.Join(homeDir, ".slack-status") 18 | } 19 | 20 | func readSlackStatus() slack_helpers.SlackStatus { 21 | data, err := os.ReadFile(getSlackStatusFilePath()) 22 | if err != nil { 23 | return slack_helpers.SlackStatusWorkTime 24 | } 25 | 26 | status := strings.TrimSpace(string(data)) 27 | return slack_helpers.SlackStatus(status) 28 | } 29 | 30 | func writeSlackStatus(status slack_helpers.SlackStatus) { 31 | renderSlackStatus("Updating slack status to", status) 32 | os.WriteFile(getSlackStatusFilePath(), []byte(status), 0644) 33 | slack_helpers.SlackLaunch(status) 34 | } 35 | 36 | func renderSlackStatus(label string, status slack_helpers.SlackStatus) { 37 | 38 | switch status { 39 | case slack_helpers.SlackStatusAlways: 40 | fmt.Println("> " + label + ": " + aurora.Green("Always On").String()) 41 | case slack_helpers.SlackStatusWorkTime: 42 | fmt.Println("> " + label + ": " + aurora.Yellow("Work Time").String()) 43 | case slack_helpers.SlackStatusDisabled: 44 | fmt.Println("> " + label + ": " + aurora.Red("Disabled").String()) 45 | } 46 | } 47 | 48 | func main() { 49 | initialStatus := readSlackStatus() 50 | renderSlackStatus("Current Slack Status", initialStatus) 51 | 52 | prompt := promptui.Select{ 53 | Label: "Select when to start Slack", 54 | Items: []string{"Always", "Work Time", "Disabled"}, 55 | HideHelp: true, 56 | HideSelected: true, 57 | Templates: &promptui.SelectTemplates{ 58 | Active: "> " + aurora.BrightGreen("{{ . | green }}").String(), 59 | }, 60 | } 61 | 62 | result, _, err := prompt.Run() 63 | if err != nil { 64 | return 65 | } 66 | 67 | switch result { 68 | case 0: 69 | writeSlackStatus(slack_helpers.SlackStatusAlways) 70 | case 1: 71 | writeSlackStatus(slack_helpers.SlackStatusWorkTime) 72 | case 2: 73 | writeSlackStatus(slack_helpers.SlackStatusDisabled) 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/scripts/proxy-vbs/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "dotfiles/src/helpers" 5 | "fmt" 6 | "os" 7 | "os/exec" 8 | "strings" 9 | ) 10 | 11 | func main() { 12 | if len(os.Args) < 3 { 13 | fmt.Println("Usage: proxy-vbs ") 14 | return 15 | } 16 | 17 | mode := os.Args[1] 18 | executable := os.Args[2] 19 | 20 | if mode != "user" && mode != "admin" { 21 | fmt.Println("Mode must be 'user' or 'admin'") 22 | return 23 | } 24 | 25 | absPath, err := exec.LookPath(executable) 26 | if err != nil { 27 | fmt.Println("Executable not found in PATH:", executable) 28 | return 29 | } 30 | 31 | fmt.Printf("Resolved executable: %s (mode: %s)\n", absPath, mode) 32 | 33 | program := strings.ReplaceAll(absPath, `"`, `""`) 34 | 35 | var vbscript string 36 | if mode == "admin" { 37 | vbscript = formatProgramForVBSAsAdmin(program) 38 | } else { 39 | vbscript = formatProgramForVBS(program, os.Args[3:]) 40 | } 41 | 42 | fmt.Println(vbscript) 43 | 44 | tempFile, err := os.CreateTemp("", "*.vbs") 45 | if err != nil { 46 | fmt.Println("Error creating temp file:", err) 47 | return 48 | } 49 | defer os.Remove(tempFile.Name()) 50 | 51 | if _, err := tempFile.WriteString(vbscript); err != nil { 52 | fmt.Println("Error writing to temp file:", err) 53 | return 54 | } 55 | tempFile.Close() 56 | 57 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 58 | Command: "cscript", 59 | Args: []string{tempFile.Name()}, 60 | Exit: true, 61 | }) 62 | 63 | } 64 | 65 | func formatProgramForVBS(program string, programArgs []string) string { 66 | literal := fmt.Sprintf(`"""%s"""`, program) 67 | if len(programArgs) > 0 { 68 | literal = fmt.Sprintf(`"""%s"" %s"`, program, strings.Join(programArgs, ",")) 69 | } 70 | lines := []string{ 71 | "Set WshShell = CreateObject(\"WScript.Shell\")", 72 | fmt.Sprintf("WshShell.Run %s, 0, False", literal), 73 | "Set WshShell = Nothing", 74 | } 75 | return strings.Join(lines, "\n") 76 | } 77 | 78 | // TODO: Add support for program arguments 79 | func formatProgramForVBSAsAdmin(program string) string { 80 | lines := []string{ 81 | "Set UAC = CreateObject(\"Shell.Application\")", 82 | fmt.Sprintf("UAC.ShellExecute \"%s\", \"\", \"\", \"runas\", 0", program), 83 | "Set UAC = Nothing", 84 | } 85 | return strings.Join(lines, "\n") 86 | } 87 | -------------------------------------------------------------------------------- /src/helpers/pause.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "bufio" 5 | "fmt" 6 | "math" 7 | "os" 8 | "runtime" 9 | "strconv" 10 | "syscall" 11 | "time" 12 | "unsafe" 13 | 14 | "github.com/logrusorgru/aurora/v4" 15 | ) 16 | 17 | const TOTAL_WAIT_SECONDS = 5 18 | 19 | func PressAnyKeyOrWaitToExit() { 20 | fmt.Println() 21 | fmt.Printf("%s", aurora.Faint("Press any key to exit, or wait "+strconv.Itoa(TOTAL_WAIT_SECONDS)+" seconds...")) 22 | 23 | done := make(chan struct{}, 1) 24 | var h uintptr 25 | var orig uint32 26 | 27 | if runtime.GOOS == "windows" { 28 | kernel32 := syscall.NewLazyDLL("kernel32.dll") 29 | getStdHandle := kernel32.NewProc("GetStdHandle") 30 | getConsoleMode := kernel32.NewProc("GetConsoleMode") 31 | setConsoleMode := kernel32.NewProc("SetConsoleMode") 32 | 33 | const STD_INPUT_HANDLE = uintptr(^uint32(10) + 1) 34 | const ENABLE_ECHO_INPUT = 0x0004 35 | const ENABLE_LINE_INPUT = 0x0002 36 | 37 | h, _, _ = getStdHandle.Call(STD_INPUT_HANDLE) 38 | 39 | var mode uint32 40 | _, _, _ = getConsoleMode.Call(h, uintptr(unsafe.Pointer(&mode))) 41 | orig = mode 42 | mode &^= (ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT) 43 | _, _, _ = setConsoleMode.Call(h, uintptr(mode)) 44 | 45 | go func() { 46 | b := make([]byte, 1) 47 | _, _ = os.Stdin.Read(b) 48 | done <- struct{}{} 49 | }() 50 | } else { 51 | go func() { 52 | reader := bufio.NewReader(os.Stdin) 53 | _, _ = reader.ReadByte() 54 | done <- struct{}{} 55 | }() 56 | } 57 | 58 | deadline := time.Now().Add(TOTAL_WAIT_SECONDS * time.Second) 59 | ticker := time.NewTicker(time.Second) 60 | defer ticker.Stop() 61 | 62 | for { 63 | select { 64 | case <-done: 65 | if runtime.GOOS == "windows" { 66 | kernel32 := syscall.NewLazyDLL("kernel32.dll") 67 | setConsoleMode := kernel32.NewProc("SetConsoleMode") 68 | _, _, _ = setConsoleMode.Call(h, uintptr(orig)) 69 | } 70 | fmt.Println() 71 | os.Exit(0) 72 | case <-ticker.C: 73 | remaining := int(math.Ceil(time.Until(deadline).Seconds())) 74 | if remaining <= 0 { 75 | if runtime.GOOS == "windows" { 76 | kernel32 := syscall.NewLazyDLL("kernel32.dll") 77 | setConsoleMode := kernel32.NewProc("SetConsoleMode") 78 | _, _, _ = setConsoleMode.Call(h, uintptr(orig)) 79 | } 80 | fmt.Println() 81 | os.Exit(0) 82 | } 83 | 84 | fmt.Printf("\r%s", aurora.Faint("Press any key to exit, or wait "+strconv.Itoa(remaining)+" seconds...")) 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/compile-ahk/scripts/VirtualDesktop-W10.ahk: -------------------------------------------------------------------------------- 1 | #NoTrayIcon 2 | 3 | Initilized := false 4 | F23:: HandleAutoDesktopSwitch 5 | 6 | HandleAutoDesktopSwitch() { 7 | global Initilized, CurrentDesktop 8 | If (!Initilized) { 9 | Initilized := true 10 | Return Send("^#{Right}") 11 | } 12 | 13 | mapDesktopsFromRegistry() 14 | If (CurrentDesktop >= DesktopCount) { 15 | CurrentDesktop := 1 16 | } Else { 17 | CurrentDesktop++ 18 | } 19 | 20 | switchDesktopByNumber(CurrentDesktop) 21 | } 22 | 23 | mapDesktopsFromRegistry() { 24 | global DesktopCount, CurrentDesktop 25 | DesktopCount := 1 26 | 27 | IdLength := 32 28 | SessionId := getSessionId() 29 | If (SessionId) { 30 | CurrentDesktopId := RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SessionInfo\" SessionId "\VirtualDesktops", "CurrentVirtualDesktop") 31 | If (CurrentDesktopId) { 32 | IdLength := StrLen(CurrentDesktopId) 33 | } 34 | } 35 | 36 | DesktopList := RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VirtualDesktops", "VirtualDesktopIDs") 37 | If (DesktopList) { 38 | DesktopListLength := StrLen(DesktopList) 39 | DesktopCount := DesktopListLength / IdLength 40 | } 41 | 42 | i := 0 43 | While (CurrentDesktopId And i < DesktopCount) { 44 | StartPos := (i * IdLength) + 1 45 | DesktopIter := SubStr(DesktopList, StartPos, IdLength) 46 | If (DesktopIter = CurrentDesktopId) { 47 | CurrentDesktop := i + 1 48 | Break 49 | } 50 | i++ 51 | } 52 | } 53 | 54 | getSessionId() { 55 | ProcessId := DllCall("GetCurrentProcessId", "UInt") 56 | If (ProcessId = 0) { 57 | OutputDebug("Error getting current process id.") 58 | Return 0 59 | } 60 | SessionId := 0 61 | Result := DllCall("ProcessIdToSessionId", "UInt", ProcessId, "UInt*", &SessionId) 62 | If (Result = 0) { 63 | OutputDebug("Error getting session id.") 64 | Return 0 65 | } 66 | 67 | Return SessionId 68 | } 69 | 70 | switchDesktopByNumber(TargetDesktop) { 71 | global CurrentDesktop 72 | mapDesktopsFromRegistry() 73 | 74 | If (TargetDesktop > DesktopCount Or TargetDesktop < 1) { 75 | Return OutputDebug("[invalid] target: " TargetDesktop " current: " CurrentDesktop) 76 | } 77 | 78 | SleepTime := 100 79 | TargetDiff := TargetDesktop - CurrentDesktop 80 | If (TargetDiff != 0) { 81 | SleepTime := Round(100 / Max(TargetDiff, TargetDiff * -1, 1)) 82 | } 83 | 84 | While (CurrentDesktop < TargetDesktop) { 85 | Send "^#{Right}" 86 | Sleep(SleepTime) 87 | CurrentDesktop++ 88 | } 89 | 90 | While (CurrentDesktop > TargetDesktop) { 91 | Send "^#{Left}" 92 | Sleep(SleepTime) 93 | CurrentDesktop-- 94 | } 95 | } -------------------------------------------------------------------------------- /src/scripts/clean-code-snippets/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | helpers "dotfiles/src/helpers" 5 | "fmt" 6 | "io/fs" 7 | "os" 8 | "os/exec" 9 | "path/filepath" 10 | "runtime" 11 | "strings" 12 | ) 13 | 14 | type Editor struct { 15 | Name string 16 | Alias string 17 | Path string 18 | ExtensionsPath string 19 | } 20 | 21 | func findBinPath(bin string) string { 22 | cmd := "which" 23 | if runtime.GOOS == "windows" { 24 | cmd = "where" 25 | } 26 | out, err := exec.Command(cmd, bin).Output() 27 | if err != nil { 28 | return "" 29 | } 30 | lines := strings.Split(string(out), "\n") 31 | for _, line := range lines { 32 | trimmed := strings.TrimSpace(line) 33 | if trimmed != "" { 34 | return trimmed 35 | } 36 | } 37 | return "" 38 | } 39 | 40 | func getFiles(root string) ([]string, error) { 41 | var files []string 42 | err := filepath.WalkDir(root, func(path string, d fs.DirEntry, err error) error { 43 | if err != nil { 44 | return nil 45 | } 46 | if !d.IsDir() && strings.HasSuffix(strings.ToLower(path), ".code-snippets") { 47 | files = append(files, path) 48 | } 49 | return nil 50 | }) 51 | return files, err 52 | } 53 | 54 | func main() { 55 | editors := []Editor{ 56 | { 57 | Name: "VSCode", 58 | Alias: "code", 59 | ExtensionsPath: "../../resources/app/extensions", 60 | }, 61 | { 62 | Name: "VSCode Insiders", 63 | Alias: "code-insiders", 64 | ExtensionsPath: "../../resources/app/extensions", 65 | }, 66 | { 67 | Name: "Cursor", 68 | Alias: "cursor", 69 | ExtensionsPath: "../../../../resources/app/extensions", 70 | }, 71 | } 72 | 73 | for _, editor := range editors { 74 | binPath := findBinPath(editor.Alias) 75 | if binPath == "" { 76 | continue 77 | } 78 | 79 | binDir := filepath.Dir(binPath) 80 | extPath := filepath.Clean(binDir + editor.ExtensionsPath) 81 | 82 | if !helpers.IsFileExists(extPath) { 83 | fmt.Println("Extensions path not found for ", editor.Name) 84 | fmt.Println("Path: ", binDir) 85 | fmt.Println("Ext: ", editor.ExtensionsPath) 86 | fmt.Println("Resolved: ", extPath) 87 | fmt.Println() 88 | continue 89 | } 90 | 91 | files, err := getFiles(extPath) 92 | if err != nil { 93 | fmt.Println("Failed reading files: ", err) 94 | continue 95 | } 96 | 97 | for _, file := range files { 98 | err := os.WriteFile(file, []byte("{}"), 0644) 99 | if err != nil { 100 | fmt.Println("Failed clearing ", file, ": ", err) 101 | continue 102 | } 103 | fmt.Println(editor.Name, " Cleared: ", filepath.Base(file)) 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /src/scripts/git-nuke/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bufio" 5 | "dotfiles/src/helpers" 6 | "fmt" 7 | "os" 8 | "os/exec" 9 | "strings" 10 | 11 | "github.com/logrusorgru/aurora/v4" 12 | ) 13 | 14 | func main() { 15 | fmt.Println(aurora.Red("This will reset the entire repository to the latest remote branch.")) 16 | fmt.Println("Write 'yes' and press [Enter] to confirm.") 17 | fmt.Print("> ") 18 | 19 | confirm, _ := bufio.NewReader(os.Stdin).ReadString('\n') 20 | confirm = strings.TrimRight(confirm, "\r\n") 21 | if confirm != "yes" { 22 | fmt.Println(aurora.Green("Reset aborted")) 23 | return 24 | } 25 | 26 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 27 | Command: "git", 28 | Args: []string{"fetch", "--all"}, 29 | }) 30 | 31 | remoteURL := "" 32 | if out, err := exec.Command("git", "remote", "get-url", "origin").Output(); err == nil { 33 | remoteURL = strings.TrimSpace(string(out)) 34 | } 35 | currentBranch := "" 36 | if out, err := exec.Command("git", "branch", "--show-current").Output(); err == nil { 37 | currentBranch = strings.TrimSpace(string(out)) 38 | } 39 | 40 | fmt.Printf("> Branch: %s\n", currentBranch) 41 | fmt.Printf("> Remote: %s\n", remoteURL) 42 | 43 | remoteBranchesOut, _ := exec.Command("git", "branch", "-r", `--format=%(refname:short)`).Output() 44 | remoteBranches := strings.Split(strings.TrimRight(string(remoteBranchesOut), "\r\n"), "\n") 45 | for _, rb := range remoteBranches { 46 | rb = strings.TrimSpace(rb) 47 | if rb == "" { 48 | continue 49 | } 50 | i := strings.IndexByte(rb, '/') 51 | if i <= 0 || i == len(rb)-1 { 52 | continue 53 | } 54 | rb = rb[i+1:] 55 | if rb == currentBranch { 56 | continue 57 | } 58 | 59 | fmt.Printf("> Deleting remote branch: %s\n", rb) 60 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 61 | Command: "git", 62 | Args: []string{"push", "origin", "--delete", rb}, 63 | }) 64 | } 65 | 66 | fmt.Println(aurora.Red("> Deleting git folder...")) 67 | os.RemoveAll(".git") 68 | 69 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 70 | Command: "git", 71 | Args: []string{"init", "--initial-branch=" + currentBranch}, 72 | }) 73 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 74 | Command: "git", 75 | Args: []string{"remote", "add", "origin", remoteURL}, 76 | }) 77 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 78 | Command: "git", 79 | Args: []string{"add", "."}, 80 | }) 81 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 82 | Command: "git", 83 | Args: []string{"commit", "-m", "Initial commit"}, 84 | }) 85 | helpers.ExecNativeCommand(helpers.ExecCommandOptions{ 86 | Command: "git", 87 | Args: []string{"push", "--force", "--set-upstream", "origin", currentBranch}, 88 | Exit: true, 89 | }) 90 | } 91 | -------------------------------------------------------------------------------- /src/ps1/remove-apps.ps1: -------------------------------------------------------------------------------- 1 | Write-Output 'Removing Windows Apps...' 2 | 3 | $appxPackagesToRemove = @( 4 | 'Microsoft.Wallet', 5 | 'Microsoft.Windows.DevHome', 6 | 'Microsoft.StorePurchaseApp', 7 | 'Microsoft.BioEnrollment', 8 | 'Microsoft.Windows.CloudExperienceHost', 9 | 'Microsoft.Windows.ContentDeliveryManager', 10 | 'Microsoft.Windows.PeopleExperienceHost', 11 | 'Microsoft.Windows.OOBENetworkCaptivePortal', 12 | 'Microsoft.Windows.OOBENetworkConnectionFlow', 13 | 'Microsoft.Windows.CapturePicker', 14 | 'Microsoft.Windows.SecureAssessmentBrowser', 15 | 'Microsoft.MicrosoftEdgeDevToolsClient', 16 | 'Microsoft.Windows.XGpuEjectDialog', 17 | 'Microsoft.XboxGameCallableUI', 18 | 'NcsiUwpApp' 19 | ) 20 | 21 | $packagesToRemove = @( 22 | 'Microsoft.Microsoft3DViewer', 23 | 'Microsoft.BingSearch', 24 | 'Microsoft.WindowsCamera', 25 | 'Microsoft.Windows.Photos', 26 | 'Microsoft.WindowsCalculator', 27 | 'Microsoft.Windows.DevHome', 28 | 'Clipchamp.Clipchamp', 29 | 'Microsoft.WindowsAlarms', 30 | 'Microsoft.549981C3F5F10', 31 | 'MicrosoftCorporationII.MicrosoftFamily', 32 | 'Microsoft.WindowsFeedbackHub', 33 | 'Microsoft.GetHelp', 34 | 'microsoft.windowscommunicationsapps', 35 | 'Microsoft.WindowsMaps', 36 | 'Microsoft.ZuneVideo', 37 | 'Microsoft.BingNews', 38 | 'Microsoft.MicrosoftOfficeHub', 39 | 'Microsoft.Office.OneNote', 40 | 'Microsoft.OutlookForWindows', 41 | 'Microsoft.Paint', 42 | 'Microsoft.MSPaint', 43 | 'Microsoft.People', 44 | 'Microsoft.PowerAutomateDesktop', 45 | 'MicrosoftCorporationII.QuickAssist', 46 | 'Microsoft.SkypeApp', 47 | 'Microsoft.MicrosoftSolitaireCollection', 48 | 'Microsoft.MicrosoftStickyNotes', 49 | 'MSTeams', 50 | 'Microsoft.Getstarted', 51 | 'Microsoft.Todos', 52 | 'Microsoft.WindowsSoundRecorder', 53 | 'Microsoft.BingWeather', 54 | 'Microsoft.ZuneMusic', 55 | 'Microsoft.Xbox*', 56 | 'Microsoft.GamingApp', 57 | 'Microsoft.YourPhone', 58 | 'Microsoft.MicrosoftEdge*', 59 | 'Microsoft.OneDrive', 60 | 'Microsoft.549981C3F5F10', 61 | 'Microsoft.MixedReality.Portal', 62 | 'Microsoft.Windows.Ai.Copilot.Provider', 63 | 'Microsoft.WindowsMeetNow', 64 | 'Microsoft.WindowsStore', 65 | 'Microsoft.ScreenSketch', 66 | 'Microsoft.SnippingTool', 67 | 'Microsoft.XboxGameCallableUI', 68 | 'Microsoft.Windows.NarratorQuickStart', 69 | 'Microsoft.Windows.PeopleExperienceHost', 70 | 'Microsoft.Windows.ParentalControls', 71 | 'Microsoft.Windows.CloudExperienceHost', 72 | 'Microsoft.MicrosoftEdgeDevToolsClient', 73 | 'AppUp.IntelGraphicsExperience' 74 | ) 75 | 76 | $packagesToRemove += $appxPackagesToRemove 77 | 78 | Get-AppxProvisionedPackage -Online | 79 | ForEach-Object { 80 | $packageName = $_.DisplayName 81 | if ($packagesToRemove | Where-Object { $packageName -Like $_ }) { 82 | Write-Output "Removing $packageName..." 83 | Remove-AppxProvisionedPackage -AllUsers -Online -PackageName $_.PackageName 84 | } 85 | } 86 | 87 | Get-AppxPackage | 88 | ForEach-Object { 89 | $packageName = $_.Name 90 | if ($appxPackagesToRemove | Where-Object { $packageName -Like $_ }) { 91 | Write-Output "Removing $packageName..." 92 | Remove-AppxPackage -Package $_.PackageFullName 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /config/uup-dump/10/CustomAppsList.txt: -------------------------------------------------------------------------------- 1 | ### Common Apps / Client editions all 2 | Microsoft.WindowsNotepad_8wekyb3d8bbwe 3 | Microsoft.DesktopAppInstaller_8wekyb3d8bbwe 4 | # Microsoft.Windows.Photos_8wekyb3d8bbwe 5 | # Microsoft.WindowsTerminal_8wekyb3d8bbwe 6 | # Microsoft.WindowsCalculator_8wekyb3d8bbwe 7 | # Microsoft.ScreenSketch_8wekyb3d8bbwe 8 | # Microsoft.WindowsStore_8wekyb3d8bbwe 9 | # Microsoft.StorePurchaseApp_8wekyb3d8bbwe 10 | # Microsoft.SecHealthUI_8wekyb3d8bbwe 11 | # Microsoft.WindowsCamera_8wekyb3d8bbwe 12 | # Microsoft.Paint_8wekyb3d8bbwe 13 | # MicrosoftWindows.Client.WebExperience_cw5n1h2txyewy 14 | # Microsoft.WindowsAlarms_8wekyb3d8bbwe 15 | # Microsoft.WindowsMaps_8wekyb3d8bbwe 16 | # Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe 17 | # microsoft.windowscommunicationsapps_8wekyb3d8bbwe 18 | # Microsoft.People_8wekyb3d8bbwe 19 | # Microsoft.BingNews_8wekyb3d8bbwe 20 | # Microsoft.BingWeather_8wekyb3d8bbwe 21 | # Microsoft.MicrosoftSolitaireCollection_8wekyb3d8bbwe 22 | # Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe 23 | # Microsoft.WindowsFeedbackHub_8wekyb3d8bbwe 24 | # Microsoft.GetHelp_8wekyb3d8bbwe 25 | # Microsoft.Getstarted_8wekyb3d8bbwe 26 | # Microsoft.Todos_8wekyb3d8bbwe 27 | # Microsoft.XboxSpeechToTextOverlay_8wekyb3d8bbwe 28 | # Microsoft.XboxGameOverlay_8wekyb3d8bbwe 29 | # Microsoft.XboxIdentityProvider_8wekyb3d8bbwe 30 | # Microsoft.PowerAutomateDesktop_8wekyb3d8bbwe 31 | # Microsoft.549981C3F5F10_8wekyb3d8bbwe 32 | # MicrosoftCorporationII.QuickAssist_8wekyb3d8bbwe 33 | # MicrosoftCorporationII.MicrosoftFamily_8wekyb3d8bbwe 34 | # Microsoft.OutlookForWindows_8wekyb3d8bbwe 35 | # MicrosoftTeams_8wekyb3d8bbwe 36 | # Microsoft.Windows.DevHome_8wekyb3d8bbwe 37 | # Microsoft.BingSearch_8wekyb3d8bbwe 38 | # Microsoft.ApplicationCompatibilityEnhancements_8wekyb3d8bbwe 39 | # MicrosoftWindows.CrossDevice_cw5n1h2txyewy 40 | # MSTeams_8wekyb3d8bbwe 41 | 42 | ### Media Apps / Client non-N editions 43 | # Microsoft.ZuneMusic_8wekyb3d8bbwe 44 | # Microsoft.ZuneVideo_8wekyb3d8bbwe 45 | # Microsoft.YourPhone_8wekyb3d8bbwe 46 | # Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe 47 | # Microsoft.GamingApp_8wekyb3d8bbwe 48 | # Microsoft.XboxGamingOverlay_8wekyb3d8bbwe 49 | # Microsoft.Xbox.TCUI_8wekyb3d8bbwe 50 | # Clipchamp.Clipchamp_yxz26nhyzhsrt 51 | 52 | ### Media Codecs / Client non-N editions, Team edition 53 | Microsoft.WebMediaExtensions_8wekyb3d8bbwe 54 | Microsoft.RawImageExtension_8wekyb3d8bbwe 55 | Microsoft.HEIFImageExtension_8wekyb3d8bbwe 56 | Microsoft.HEVCVideoExtension_8wekyb3d8bbwe 57 | Microsoft.VP9VideoExtensions_8wekyb3d8bbwe 58 | Microsoft.WebpImageExtension_8wekyb3d8bbwe 59 | Microsoft.AVCEncoderVideoExtension_8wekyb3d8bbwe 60 | Microsoft.MPEG2VideoExtension_8wekyb3d8bbwe 61 | # Microsoft.DolbyAudioExtensions_8wekyb3d8bbwe 62 | 63 | ### Surface Hub Apps / Team edition 64 | # Microsoft.Whiteboard_8wekyb3d8bbwe 65 | # microsoft.microsoftskydrive_8wekyb3d8bbwe 66 | # Microsoft.MicrosoftTeamsforSurfaceHub_8wekyb3d8bbwe 67 | # MicrosoftCorporationII.MailforSurfaceHub_8wekyb3d8bbwe 68 | # Microsoft.MicrosoftPowerBIForWindows_8wekyb3d8bbwe 69 | # Microsoft.SkypeApp_kzf8qxf38zg5c 70 | # Microsoft.Office.Excel_8wekyb3d8bbwe 71 | # Microsoft.Office.PowerPoint_8wekyb3d8bbwe 72 | # Microsoft.Office.Word_8wekyb3d8bbwe 73 | -------------------------------------------------------------------------------- /config/winget-apps.jsonc: -------------------------------------------------------------------------------- 1 | [ 2 | // Most Important 3 | { 4 | "ID": "Piriform.CCleaner", 5 | "Name": "CCleaner", 6 | "Version": "6.39", 7 | "InteractiveInstall": true, 8 | "InteractiveUpgrade": true 9 | }, 10 | { 11 | "ID": "9MSMLRH6LZF3", 12 | "Name": "Windows Notepad" 13 | }, 14 | { 15 | "ID": "9WZDNCRFHVN5", 16 | "Name": "Windows Calculator" 17 | }, 18 | { 19 | "ID": "Microsoft.WindowsTerminal", 20 | "Name": "Windows Terminal" 21 | }, 22 | { 23 | "ID": "Google.Chrome", 24 | "Name": "Chrome" 25 | }, 26 | 27 | // Programming & Development Tools 28 | { 29 | "ID": "jdx.mise", 30 | "Name": "Mise" 31 | }, 32 | { 33 | "ID": "Git.Git", 34 | "Name": "Git", 35 | "InteractiveInstall": true 36 | }, 37 | { 38 | "ID": "GitHub.cli", 39 | "Name": "GitHub CLI" 40 | }, 41 | { 42 | "ID": "Microsoft.VisualStudioCode", 43 | "Name": "VSCode", 44 | "InteractiveInstall": true 45 | }, 46 | { 47 | "ID": "Anysphere.Cursor", 48 | "Name": "Cursor", 49 | "InteractiveInstall": true, 50 | "SkipUpgrade": true 51 | }, 52 | { 53 | "ID": "ZedIndustries.Zed", 54 | "Name": "Zed" 55 | }, 56 | { 57 | "ID": "Postman.Postman", 58 | "Name": "Postman" 59 | }, 60 | { 61 | "ID": "Starship.Starship", 62 | "Name": "Starship" 63 | }, 64 | { 65 | "ID": "MSYS2.MSYS2", 66 | "Name": "MSYS2" 67 | }, 68 | { 69 | "ID": "Docker.DockerDesktop", 70 | "Name": "Docker Desktop", 71 | "InteractiveInstall": true, 72 | "InteractiveUpgrade": true, 73 | "SkipInstall": true 74 | }, 75 | { 76 | "ID": "Microsoft.VisualStudio.BuildTools", 77 | "Name": "Visual Studio Build Tools", 78 | "InteractiveInstall": true, 79 | "InteractiveUpgrade": true, 80 | "SkipInstall": true 81 | }, 82 | 83 | // Media Tools 84 | { 85 | "ID": "ShareX.ShareX", 86 | "Name": "ShareX", 87 | "InteractiveInstall": true, 88 | "InteractiveUpgrade": true 89 | }, 90 | { 91 | "ID": "Daum.PotPlayer", 92 | "Name": "PotPlayer", 93 | "InteractiveInstall": true, 94 | "InteractiveUpgrade": true 95 | }, 96 | { 97 | "ID": "9NBLGGH68TW4", 98 | "Name": "Pictureflect Photo Viewer" 99 | }, 100 | { 101 | "ID": "ThioJoe.SvgThumbnailExtension", 102 | "Name": "SVG Thumbnail" 103 | }, 104 | { 105 | "ID": "Obsidian.Obsidian", 106 | "Name": "Obsidian" 107 | }, 108 | { 109 | "ID": "OBSProject.OBSStudio", 110 | "Name": "OBS Studio" 111 | }, 112 | 113 | // Others 114 | { 115 | "ID": "SlackTechnologies.Slack", 116 | "Name": "Slack" 117 | }, 118 | { 119 | "ID": "UnifiedIntents.UnifiedRemote", 120 | "Name": "Unified Remote" 121 | }, 122 | { 123 | "ID": "REALiX.HWiNFO", 124 | "Name": "HwInfo" 125 | }, 126 | { 127 | "ID": "PowerSoftware.AnyBurn", 128 | "Name": "AnyBurn" 129 | }, 130 | { 131 | "ID": "RARLab.WinRAR", 132 | "Name": "WinRAR" 133 | }, 134 | { 135 | "ID": "RamenSoftware.Windhawk", 136 | "Name": "Windhawk" 137 | }, 138 | { 139 | "ID": "qBittorrent.qBittorrent", 140 | "Name": "qBittorrent", 141 | "SkipInstall": true 142 | } 143 | ] 144 | -------------------------------------------------------------------------------- /config/zed/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "agent": { 3 | "dock": "left", 4 | "model_parameters": [] 5 | }, 6 | "git_panel": { 7 | "status_style": "icon", 8 | "dock": "right" 9 | }, 10 | "format_on_save": "off", 11 | "formatter": "prettier", 12 | "gutter": { 13 | "min_line_number_digits": 0, 14 | "runnables": false, 15 | "folds": true, 16 | "breakpoints": false, 17 | "line_numbers": true 18 | }, 19 | "inline_code_actions": false, 20 | "git": { 21 | "git_gutter": "hide", 22 | "inline_blame": { 23 | "enabled": false 24 | } 25 | }, 26 | "restore_on_startup": "none", 27 | "prettier": { 28 | 29 | }, 30 | "icon_theme": "Material Icon Theme", 31 | "tab_bar": { 32 | "show_nav_history_buttons": false 33 | }, 34 | "title_bar": { 35 | "show_sign_in": false, 36 | "show_menus": false, 37 | "show_branch_icon": true 38 | }, 39 | "active_pane_modifiers": {}, 40 | "debugger": {}, 41 | "search": {}, 42 | "diagnostics": {}, 43 | "status_bar": { 44 | "active_language_button": true 45 | }, 46 | "disable_ai": true, 47 | "inlay_hints": { 48 | "show_background": false 49 | }, 50 | "indent_guides": { 51 | "background_coloring": "disabled" 52 | }, 53 | "toolbar": { 54 | "agent_review": false, 55 | "quick_actions": false, 56 | "breadcrumbs": false 57 | }, 58 | "auto_update": false, 59 | "session": {}, 60 | "terminal": { 61 | "shell": { 62 | "program": "fish" 63 | }, 64 | "line_height": { 65 | "custom": 1.45 66 | }, 67 | "blinking": "on", 68 | "minimum_contrast": 0, 69 | "cursor_shape": "bar", 70 | "working_directory": "current_project_directory" 71 | }, 72 | "telemetry": { 73 | "diagnostics": false, 74 | "metrics": false 75 | }, 76 | "project_panel": { 77 | "dock": "right", 78 | "git_status": true, 79 | "auto_fold_dirs": false 80 | }, 81 | "base_keymap": "VSCode", 82 | "tabs": { 83 | "close_position": "right", 84 | "file_icons": true, 85 | "git_status": false, 86 | "show_close_button": "hidden" 87 | }, 88 | "multi_cursor_modifier": "cmd_or_ctrl", 89 | "vertical_scroll_margin": 2.0, 90 | "scroll_beyond_last_line": "off", 91 | "minimap": { 92 | "show": "never" 93 | }, 94 | "selection_highlight": false, 95 | "cursor_blink": true, 96 | "autosave": "on_focus_change", 97 | "buffer_font_family": "FiraCode Nerd Font", 98 | "use_on_type_format": true, 99 | "show_whitespaces": "selection", 100 | "remove_trailing_whitespace_on_save": false, 101 | "tab_size": 2, 102 | "edit_predictions": { 103 | "disabled_globs": [ 104 | "**/.env", 105 | "**/.env.*", 106 | "**/credentials.json", 107 | "**/credentials.*.json", 108 | "**/secret.json", 109 | "**/secrets.json", 110 | "**/*.key", 111 | "**/*.pem", 112 | "**/*.pfx", 113 | "**/*.p12", 114 | "**/*.crt", 115 | "**/*.cer", 116 | "**/id_rsa", 117 | "**/id_dsa", 118 | "**/.ssh/id_*", 119 | "**/.*", 120 | "**/*.lock", 121 | "**/pnpm-lock.yaml", 122 | "**/package-lock.json" 123 | ] 124 | }, 125 | "ui_font_size": 16, 126 | "buffer_font_size": 15.300000190734863, 127 | "theme": "One Dark Pro" 128 | } 129 | -------------------------------------------------------------------------------- /__git-gpg.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | 4 | :: Enable ANSI color support 5 | for /f "tokens=2 delims=[]" %%I in ('ver') do set winver=%%I 6 | for /f "tokens=2,3,4 delims=. " %%I in ("%winver%") do ( 7 | if %%I geq 10 ( 8 | :: Windows 10+ supports ANSI escape sequences 9 | reg add HKEY_CURRENT_USER\Console /v VirtualTerminalLevel /t REG_DWORD /d 1 /f >nul 2>&1 10 | ) 11 | ) 12 | 13 | :: Set console size (width=80, height=45) 14 | mode con cols=80 lines=45 15 | 16 | :: Check if GPG is installed 17 | where gpg >nul 2>&1 18 | if !errorlevel! neq 0 ( 19 | echo Error: GPG not installed 20 | exit /b 1 21 | ) 22 | 23 | :: Check if Git is installed 24 | where git >nul 2>&1 25 | if !errorlevel! neq 0 ( 26 | echo Error: Git not installed 27 | exit /b 1 28 | ) 29 | 30 | :: Get Git configuration 31 | for /f "tokens=*" %%i in ('git config --get user.name 2^>nul') do set "git_name=%%i" 32 | for /f "tokens=*" %%i in ('git config --get user.email 2^>nul') do set "git_email=%%i" 33 | 34 | if "%git_email%"=="" ( 35 | echo Error: Git user.email or user.name not configured 36 | echo Please run: git config --global user.name "Your Name" 37 | echo Please run: git config --global user.email "your@email.com" 38 | exit /b 1 39 | ) 40 | 41 | if "%git_name%"=="" ( 42 | echo Error: Git user.email or user.name not configured 43 | echo Please run: git config --global user.name "Your Name" 44 | echo Please run: git config --global user.email "your@email.com" 45 | exit /b 1 46 | ) 47 | 48 | echo Git user name : %git_name% 49 | echo Git user email : %git_email% 50 | 51 | :: Check if GPG keys exist 52 | gpg --list-secret-keys --keyid-format LONG 2>nul | findstr "sec" >nul 53 | if !errorlevel! neq 0 ( 54 | :: Create temporary batch file for GPG key generation 55 | set "batch_file=%temp%\gpg_batch_%random%.txt" 56 | ( 57 | echo Key-Type: RSA 58 | echo Key-Length: 4096 59 | echo Key-Usage: sign 60 | echo Name-Real: %git_name% 61 | echo Name-Email: %git_email% 62 | echo Expire-Date: 0 63 | echo %%no-protection 64 | echo %%commit 65 | ) > "!batch_file!" 66 | 67 | gpg --batch --generate-key "!batch_file!" 68 | del "!batch_file!" 69 | 70 | if !errorlevel! neq 0 ( 71 | exit /b 1 72 | ) 73 | ) 74 | 75 | :: Get GPG key ID 76 | set "gpg_key_id=" 77 | for /f "tokens=*" %%i in ('gpg --list-secret-keys --keyid-format LONG 2^>nul') do ( 78 | echo %%i | findstr "sec" >nul 79 | if !errorlevel! equ 0 ( 80 | for /f "tokens=2 delims=/" %%j in ("%%i") do ( 81 | for /f "tokens=1 delims= " %%k in ("%%j") do ( 82 | set "gpg_key_id=%%k" 83 | goto :found_key 84 | ) 85 | ) 86 | ) 87 | ) 88 | :found_key 89 | 90 | if "%gpg_key_id%"=="" ( 91 | exit /b 1 92 | ) 93 | 94 | :: Configure Git with GPG 95 | git config --global user.signingkey %gpg_key_id% 96 | git config --global commit.gpgsign true 97 | for /f "tokens=*" %%i in ('where gpg') do git config --global gpg.program "%%i" 98 | 99 | echo GPG key ID : %gpg_key_id% 100 | 101 | echo GPG key generated and configured for Git. 102 | 103 | echo. 104 | echo. 105 | gpg --armor --export %gpg_key_id% 106 | echo. 107 | echo. 108 | 109 | pause 110 | -------------------------------------------------------------------------------- /src/helpers/winget/helpers.go: -------------------------------------------------------------------------------- 1 | package winget 2 | 3 | import ( 4 | helpers "dotfiles/src/helpers" 5 | "encoding/json" 6 | "os/exec" 7 | "strings" 8 | ) 9 | 10 | type WingetPackage struct { 11 | ID string 12 | Name string 13 | Version string 14 | 15 | InteractiveInstall bool 16 | InteractiveUpgrade bool 17 | 18 | SkipInstall bool 19 | SkipUpgrade bool 20 | } 21 | 22 | type WingetUpgradeablePackage struct { 23 | ID string 24 | Version string 25 | Available string 26 | } 27 | 28 | func GetWingetPackages() []WingetPackage { 29 | jsonBytes, err := helpers.ReadDotfilesConfigJSONC("./config/winget-apps.jsonc") 30 | if err != nil { 31 | return []WingetPackage{} 32 | } 33 | 34 | var pkgs []WingetPackage 35 | if err := json.Unmarshal(jsonBytes, &pkgs); err != nil { 36 | return []WingetPackage{} 37 | } 38 | 39 | return pkgs 40 | } 41 | 42 | func BuildWingetInstallCommands(p WingetPackage) []string { 43 | parts := []string{"winget", "install", p.ID} 44 | 45 | if p.Version != "" { 46 | parts = append(parts, "--version", p.Version) 47 | } 48 | 49 | if p.InteractiveInstall { 50 | parts = append(parts, "--interactive") 51 | } else { 52 | parts = append(parts, "--silent") 53 | } 54 | 55 | return append(parts, "--verbose", "--accept-package-agreements", "--accept-source-agreements", "--no-upgrade") 56 | } 57 | 58 | func BuildWingetUpgradeCommands(p WingetPackage) []string { 59 | parts := []string{"winget", "upgrade", p.ID} 60 | 61 | if p.Version != "" { 62 | parts = append(parts, "--version", p.Version) 63 | } 64 | 65 | if p.InteractiveUpgrade { 66 | parts = append(parts, "--interactive") 67 | } else { 68 | parts = append(parts, "--silent") 69 | } 70 | 71 | return append(parts, "--verbose", "--accept-package-agreements", "--accept-source-agreements") 72 | } 73 | 74 | func GetUpgradeablePackages() []WingetUpgradeablePackage { 75 | var upgradeablePackages []WingetUpgradeablePackage 76 | 77 | cmd := exec.Command("winget", "upgrade") 78 | output, err := cmd.CombinedOutput() 79 | if err != nil { 80 | return upgradeablePackages 81 | } 82 | 83 | trimmedOutput := strings.TrimSpace(string(output)) 84 | cleanedOutput := strings.ReplaceAll(trimmedOutput, "\r\n", "\n") 85 | lines := strings.Split(cleanedOutput, "\n") 86 | 87 | headingLine := strings.TrimSpace(lines[0]) 88 | if headingLine == "" { 89 | return upgradeablePackages 90 | } 91 | 92 | dataLines := lines[2 : len(lines)-1] 93 | if len(dataLines) == 0 { 94 | return upgradeablePackages 95 | } 96 | 97 | nameIndex := strings.Index(headingLine, "Name") 98 | idStartIndex := strings.Index(headingLine, "Id") - nameIndex 99 | versionStartIndex := strings.Index(headingLine, "Version") - nameIndex 100 | availableStartIndex := strings.Index(headingLine, "Available") - nameIndex 101 | sourceStartIndex := strings.Index(headingLine, "Source") - nameIndex 102 | 103 | for _, line := range dataLines { 104 | line = strings.TrimSpace(line) 105 | 106 | upgradeablePackages = append(upgradeablePackages, WingetUpgradeablePackage{ 107 | ID: strings.TrimSpace(line[idStartIndex:versionStartIndex]), 108 | Version: strings.TrimSpace(line[versionStartIndex:availableStartIndex]), 109 | Available: strings.TrimSpace(line[availableStartIndex:sourceStartIndex]), 110 | }) 111 | } 112 | 113 | return upgradeablePackages 114 | } 115 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | image 2 | 3 | # Development Setup for Windows 4 | 5 | This repository contains automation and configuration for provisioning a Windows developer workstation. It includes shell configs, PowerShell/Batch helpers, AutoHotkey tooling, and small Go utilities. 6 | 7 | ## Features & Capabilities 8 | 9 | - **Windows Configuration** 10 | PowerShell scripts to apply system settings and remove/disable unwanted defaults. 11 | 12 | - **Apps, Packages, and Runtimes Management** 13 | Winget install/upgrade helpers driven by `config/winget-apps.jsonc`. 14 | 15 | - **Shell Experience** 16 | Configured Bash/Fish/Zsh + Starship, Windows Terminal settings, and common aliases. 17 | 18 | - **Code Editor Configuration** 19 | Editor configs (e.g. Zed), plus helpers (e.g. code snippet cleanup). 20 | 21 | - **Communication Optimization** 22 | Slack helpers (startup + status). 23 | 24 | - **System Performance** 25 | Debloat/tuning scripts under `src/ps1/` (review before running). 26 | 27 | ## Getting Started 28 | 29 | ### Prerequisites 30 | 31 | - Windows 10 or Windows 11 32 | - Git (installed to clone the repository) 33 | - Go (to compile the utilities; see `go.mod` for the version) 34 | - MSYS2 (optional, for `pacman`-managed shells/tools) 35 | 36 | ### Installation Guide 37 | 38 | 1. **Clone the Repository:** 39 | 40 | ```shell 41 | git clone https://github.com/NazmusSayad/.dotfiles.git 42 | ``` 43 | 44 | 2. **Install Dotfiles (symlink + PATH):** 45 | Run `__install-dotfiles.cmd` as Administrator. This links the repo to `%USERPROFILE%\.dotfiles` and adds `%USERPROFILE%\.dotfiles\.build\bin` to the system PATH. 46 | 47 | 3. **Compile utilities:** 48 | Run `__compile.cmd`. This compiles: 49 | 50 | - Go utilities from `src/scripts/*` and `src/functions/*` into `.build/bin/*.exe` 51 | - AutoHotkey scripts via `src/compile-ahk/` into `.build/ahk/` 52 | 53 | 4. **Optional setup scripts:** 54 | 55 | - `__install-config.cmd`: Git + pnpm config. 56 | - `__git-gpg.cmd`: Generate/configure a GPG key for Git signing (prints the armored public key). 57 | - `__install-msys2.cmd`: Install shells/tools via MSYS2 `pacman`. 58 | - `__install-start-menu.cmd`: Install start-menu entries (via `go run ./src/install-start-menu/main.go`). 59 | - `__windows-setup.cmd`: Runs every PowerShell script in `src/ps1/` (admin required; reboots at the end). 60 | 61 | 5. **Use the tools:** 62 | After compilation and PATH setup, the compiled tools are available as `*.exe` in `.build/bin/` (folder name becomes the exe name), e.g.: 63 | 64 | - `winget-install.exe`, `winget-upgrade.exe` 65 | - `symlink-setup.exe` 66 | - `slack-status.exe`, `slack-startup.exe` 67 | - Git helpers like `gclean.exe`, `greset.exe`, `gp.exe`, etc. 68 | 69 | ## Repository Structure 70 | 71 | - `.build/`: Build output (binaries and compiled AHK). 72 | - `config/`: Configuration files for shells, standard apps, and `winget` packages. 73 | - `src/`: Go utilities and PowerShell scripts. 74 | - `src/functions/`: Small command-like Go utilities (compiled to `.build/bin/*.exe`). 75 | - `src/scripts/`: Higher-level Go scripts (compiled to `.build/bin/*.exe`). 76 | - `src/ps1/`: Windows debloating and configuration scripts. 77 | - `src/compile-go/`: Compiles Go utilities into `.build/bin/`. 78 | - `src/compile-ahk/`: Compiles bundled AHK scripts into `.build/ahk/`. 79 | - `__*`: Installation and utility scripts. 80 | 81 | ## ⚠️ Disclaimer 82 | 83 | This repository contains scripts that modify system settings and remove default applications. Review all scripts (especially those in `src/ps1/`) before running them to ensure they align with your requirements. 84 | -------------------------------------------------------------------------------- /config/uup-dump/11/CustomAppsList.txt: -------------------------------------------------------------------------------- 1 | ### This file allows you to customize which Microsoft Store Apps are installed 2 | ### during the UUP to ISO conversion process. 3 | ### 4 | ### For changes done to this file to be applied, the CustomList option in the 5 | ### ConvertConfig.ini file needs to be set to 1. 6 | ### 7 | ### This customization is supported only in builds 22563 and later. 8 | 9 | ### Choose the wanted apps from below by removing # prefix 10 | 11 | ### Common Apps / Client editions all 12 | Microsoft.DesktopAppInstaller_8wekyb3d8bbwe 13 | # Microsoft.WindowsStore_8wekyb3d8bbwe 14 | # Microsoft.StorePurchaseApp_8wekyb3d8bbwe 15 | Microsoft.SecHealthUI_8wekyb3d8bbwe 16 | # Microsoft.Windows.Photos_8wekyb3d8bbwe 17 | # Microsoft.WindowsCamera_8wekyb3d8bbwe 18 | # Microsoft.WindowsNotepad_8wekyb3d8bbwe 19 | # Microsoft.Paint_8wekyb3d8bbwe 20 | # Microsoft.WindowsTerminal_8wekyb3d8bbwe 21 | # MicrosoftWindows.Client.WebExperience_cw5n1h2txyewy 22 | # Microsoft.WindowsAlarms_8wekyb3d8bbwe 23 | # Microsoft.WindowsCalculator_8wekyb3d8bbwe 24 | # Microsoft.WindowsMaps_8wekyb3d8bbwe 25 | # Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe 26 | # Microsoft.ScreenSketch_8wekyb3d8bbwe 27 | # microsoft.windowscommunicationsapps_8wekyb3d8bbwe 28 | # Microsoft.People_8wekyb3d8bbwe 29 | # Microsoft.BingNews_8wekyb3d8bbwe 30 | # Microsoft.BingWeather_8wekyb3d8bbwe 31 | # Microsoft.MicrosoftSolitaireCollection_8wekyb3d8bbwe 32 | # Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe 33 | # Microsoft.WindowsFeedbackHub_8wekyb3d8bbwe 34 | # Microsoft.GetHelp_8wekyb3d8bbwe 35 | # Microsoft.Getstarted_8wekyb3d8bbwe 36 | # Microsoft.Todos_8wekyb3d8bbwe 37 | # Microsoft.XboxSpeechToTextOverlay_8wekyb3d8bbwe 38 | # Microsoft.XboxGameOverlay_8wekyb3d8bbwe 39 | # Microsoft.XboxIdentityProvider_8wekyb3d8bbwe 40 | # Microsoft.PowerAutomateDesktop_8wekyb3d8bbwe 41 | # Microsoft.549981C3F5F10_8wekyb3d8bbwe 42 | # MicrosoftCorporationII.QuickAssist_8wekyb3d8bbwe 43 | # MicrosoftCorporationII.MicrosoftFamily_8wekyb3d8bbwe 44 | # Clipchamp.Clipchamp_yxz26nhyzhsrt 45 | # Microsoft.OutlookForWindows_8wekyb3d8bbwe 46 | # MicrosoftTeams_8wekyb3d8bbwe 47 | # Microsoft.Windows.DevHome_8wekyb3d8bbwe 48 | # Microsoft.BingSearch_8wekyb3d8bbwe 49 | # Microsoft.ApplicationCompatibilityEnhancements_8wekyb3d8bbwe 50 | # MicrosoftWindows.CrossDevice_cw5n1h2txyewy 51 | # MSTeams_8wekyb3d8bbwe 52 | # Microsoft.MicrosoftPCManager_8wekyb3d8bbwe 53 | # Microsoft.StartExperiencesApp_8wekyb3d8bbwe 54 | # Microsoft.WidgetsPlatformRuntime_8wekyb3d8bbwe 55 | 56 | ### Media Apps / Client non-N editions 57 | # Microsoft.ZuneMusic_8wekyb3d8bbwe 58 | # Microsoft.ZuneVideo_8wekyb3d8bbwe 59 | # Microsoft.YourPhone_8wekyb3d8bbwe 60 | # Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe 61 | # Microsoft.GamingApp_8wekyb3d8bbwe 62 | # Microsoft.XboxGamingOverlay_8wekyb3d8bbwe 63 | # Microsoft.Xbox.TCUI_8wekyb3d8bbwe 64 | 65 | ### Media Codecs / Client non-N editions, Team edition 66 | Microsoft.WebMediaExtensions_8wekyb3d8bbwe 67 | Microsoft.RawImageExtension_8wekyb3d8bbwe 68 | Microsoft.HEIFImageExtension_8wekyb3d8bbwe 69 | Microsoft.HEVCVideoExtension_8wekyb3d8bbwe 70 | Microsoft.VP9VideoExtensions_8wekyb3d8bbwe 71 | Microsoft.WebpImageExtension_8wekyb3d8bbwe 72 | Microsoft.AVCEncoderVideoExtension_8wekyb3d8bbwe 73 | Microsoft.MPEG2VideoExtension_8wekyb3d8bbwe 74 | Microsoft.AV1VideoExtension_8wekyb3d8bbwe 75 | # Microsoft.DolbyAudioExtensions_8wekyb3d8bbwe 76 | 77 | ### Surface Hub Apps / Team edition 78 | # Microsoft.Whiteboard_8wekyb3d8bbwe 79 | # microsoft.microsoftskydrive_8wekyb3d8bbwe 80 | # Microsoft.MicrosoftTeamsforSurfaceHub_8wekyb3d8bbwe 81 | # MicrosoftCorporationII.MailforSurfaceHub_8wekyb3d8bbwe 82 | # Microsoft.MicrosoftPowerBIForWindows_8wekyb3d8bbwe 83 | # Microsoft.SkypeApp_kzf8qxf38zg5c 84 | # Microsoft.Office.Excel_8wekyb3d8bbwe 85 | # Microsoft.Office.PowerPoint_8wekyb3d8bbwe 86 | # Microsoft.Office.Word_8wekyb3d8bbwe 87 | -------------------------------------------------------------------------------- /src/ps1/disable-services.ps1: -------------------------------------------------------------------------------- 1 | Write-Output 'Set Services to Manual: Turns a bunch of system services to manual that do not need to be running all the time.' 2 | 3 | $servicesToDisable = @( 4 | 'AJRouter', 5 | 'Spooler', 6 | 'AppVClient', 7 | 'AssignedAccessManagerSvc', 8 | 'DiagTrack', 9 | 'DialogBlockingService', 10 | 'RemoteAccess', 11 | 'RemoteRegistry', 12 | 'UevAgentService', 13 | 'shpamsvc', 14 | 'ssh-agent', 15 | 'tzautoupdate', 16 | 'uhssvc', 17 | 'Fax', 18 | 'DusmSvc', 19 | 'MapsBroker', 20 | 'RetailDemo', 21 | 'wscsvc', 22 | 'SEMgrSvc', 23 | 'NetTcpPortSharing', 24 | 'icssvc', 25 | 'ALG', 26 | 'DoSvc', 27 | 'wmiApSrv', 28 | 'RasAuto', 29 | 'SCPolicySvc', 30 | 'ScDeviceEnum', 31 | 'SCardSvr', 32 | 'SessionEnv', 33 | 'EntAppSvc', 34 | 'wcncsvc', 35 | 'XblAuthManager', 36 | 'XblGameSave', 37 | 'XboxGipSvc', 38 | 'XboxNetApiSvc', 39 | 'lmhosts', 40 | 'seclogon', 41 | 'WpcMonSvc', 42 | 'UmRdpService', 43 | 'TermService', 44 | 'TabletInputService', 45 | 'wisvc', 46 | 'WerSvc', 47 | 'StiSvc', 48 | 'dmwappushservice', 49 | 'MicrosoftEdge*', 50 | 'CDPUserSvc*', 51 | 'IEEtwCollectorService', 52 | 'OneSyncSvc_*', 53 | 'WSAIFabricSvc', 54 | 'SSDPSRV', 55 | 'PrintDeviceConfigurationService', 56 | 'ShellHWDetection', 57 | 'BthAvctpSvc', 58 | 'HvHost', 59 | 'whesvc' 60 | ) 61 | 62 | $servicesToManual = @( 63 | 'AppIDSvc', 64 | 'AppMgmt', 65 | 'AppReadiness', 66 | 'AppXSvc', 67 | 'Appinfo', 68 | 'AxInstSV', 69 | 'BDESVC', 70 | 'BITS', 71 | 'BTAGService', 72 | 'BcastDVRUserService_*', 73 | 'Browser', 74 | 'CDPSvc', 75 | 'COMSysApp', 76 | 'CaptureService_*', 77 | 'CertPropSvc', 78 | 'ClipSVC', 79 | 'ConsentUxUserSvc_*', 80 | 'CredentialEnrollmentManagerUserSvc_*', 81 | 'CscService', 82 | 'DcpSvc', 83 | 'DevQueryBroker', 84 | 'DeviceAssociationBrokerSvc_*', 85 | 'DeviceAssociationService', 86 | 'DeviceInstall', 87 | 'DevicePickerUserSvc_*', 88 | 'DevicesFlowUserSvc_*', 89 | 'DisplayEnhancementService', 90 | 'DmEnrollmentSvc', 91 | 'DsSvc', 92 | 'DsmSvc', 93 | 'EFS', 94 | 'EapHost', 95 | 'FDResPub', 96 | 'FrameServer', 97 | 'FrameServerMonitor', 98 | 'GraphicsPerfSvc', 99 | 'HomeGroupListener', 100 | 'HomeGroupProvider', 101 | 'IKEEXT', 102 | 'InstallService', 103 | 'InventorySvc', 104 | 'IpxlatCfgSvc', 105 | 'KtmRm', 106 | 'LicenseManager', 107 | 'LxpSvc', 108 | 'MSDTC', 109 | 'MSiSCSI', 110 | 'McpManagementService', 111 | 'MessagingService_*', 112 | 'MixedRealityOpenXRSvc', 113 | 'MsKeyboardFilter', 114 | 'NPSMSvc_*', 115 | 'NaturalAuthentication', 116 | 'NcaSvc', 117 | 'NcbService', 118 | 'NcdAutoSetup', 119 | 'NetSetupSvc', 120 | 'Netman', 121 | 'NgcCtnrSvc', 122 | 'NgcSvc', 123 | 'NlaSvc', 124 | 'P9RdrService_*', 125 | 'PNRPAutoReg', 126 | 'PNRPsvc', 127 | 'PcaSvc', 128 | 'PeerDistSvc', 129 | 'PenService_*', 130 | 'PerfHost', 131 | 'PhoneSvc', 132 | 'PimIndexMaintenanceSvc_*', 133 | 'PlugPlay', 134 | 'PolicyAgent', 135 | 'PrintNotify', 136 | 'PrintWorkflowUserSvc_*', 137 | 'PushToInstall', 138 | 'QWAVE', 139 | 'RasMan', 140 | 'RmSvc', 141 | 'RpcLocator', 142 | 'SDRSVC', 143 | 'SNMPTRAP', 144 | 'SNMPTrap', 145 | 'SecurityHealthService', 146 | 'Sense', 147 | 'SensorDataService', 148 | 'SensorService', 149 | 'SensrSvc', 150 | 'SharedAccess', 151 | 'SharedRealitySvc', 152 | 'SmsRouter', 153 | 'SstpSvc', 154 | 'StateRepository', 155 | 'StorSvc', 156 | 'TapiSrv', 157 | 'TextInputManagementService', 158 | 'TieringEngineService', 159 | 'TimeBroker', 160 | 'TimeBrokerSvc', 161 | 'TokenBroker', 162 | 'TroubleshootingSvc', 163 | 'TrustedInstaller', 164 | 'UI0Detect', 165 | 'UdkUserSvc_*', 166 | 'UnistoreSvc_*', 167 | 'UserDataSvc_*', 168 | 'UsoSvc', 169 | 'VSS', 170 | 'VacSvc', 171 | 'W32Time', 172 | 'WEPHOSTSVC', 173 | 'WFDSConMgrSvc', 174 | 'WMPNetworkSvc', 175 | 'WManSvc', 176 | 'WPDBusEnum', 177 | 'WSService', 178 | 'WSearch', 179 | 'WaaSMedicSvc', 180 | 'WalletService', 181 | 'WarpJITSvc', 182 | 'WbioSrvc', 183 | 'WcsPlugInService', 184 | 'WdNisSvc', 185 | 'WdiServiceHost', 186 | 'WdiSystemHost', 187 | 'WebClient', 188 | 'Wecsvc', 189 | 'WiaRpc', 190 | 'WinHttpAutoProxySvc', 191 | 'WinRM', 192 | 'WpnService', 193 | 'WwanSvc', 194 | 'autotimesvc', 195 | 'bthserv', 196 | 'camsvc', 197 | 'cbdhsvc_*', 198 | 'cloudidsvc', 199 | 'dcsvc', 200 | 'defragsvc', 201 | 'diagnosticshub.standardcollector.service', 202 | 'diagsvc', 203 | 'dot3svc', 204 | 'embeddedmode', 205 | 'fdPHost', 206 | 'fhsvc', 207 | 'hidserv', 208 | 'lfsvc', 209 | 'lltdsvc', 210 | 'msiserver', 211 | 'netprofm', 212 | 'p2pimsvc', 213 | 'p2psvc', 214 | 'perceptionsimulation', 215 | 'pla', 216 | 'smphost', 217 | 'spectrum', 218 | 'sppsvc', 219 | 'svsvc', 220 | 'swprv', 221 | 'upnphost', 222 | 'vds', 223 | 'vm3dservice', 224 | 'vmicguestinterface', 225 | 'vmicheartbeat', 226 | 'vmickvpexchange', 227 | 'vmicrdv', 228 | 'vmicshutdown', 229 | 'vmictimesync', 230 | 'vmicvmsession', 231 | 'vmicvss', 232 | 'vmvss', 233 | 'wbengine', 234 | 'webthreatdefsvc', 235 | 'wercplsupport', 236 | 'wlidsvc', 237 | 'wlpasvc', 238 | 'workfolderssvc', 239 | 'wuauserv', 240 | 'wudfsvc' 241 | ) 242 | 243 | Get-Service | 244 | ForEach-Object { 245 | $serviceName = $_.Name 246 | 247 | if ($servicesToManual | Where-Object { $serviceName -Like $_ }) { 248 | Write-Output "Manual: $serviceName..." 249 | Set-Service -Name $serviceName -StartupType Manual -ErrorAction Continue 250 | } 251 | 252 | if ($servicesToDisable | Where-Object { $serviceName -Like $_ }) { 253 | Write-Output "Disable: $serviceName..." 254 | Set-Service -Name $serviceName -StartupType Disabled -ErrorAction Continue 255 | } 256 | } -------------------------------------------------------------------------------- /config/windows-terminal.json: -------------------------------------------------------------------------------- 1 | { 2 | "$help": "https://aka.ms/terminal-documentation", 3 | "$schema": "https://aka.ms/terminal-profiles-schema", 4 | "actions": 5 | [ 6 | { 7 | "command": 8 | { 9 | "action": "clearBuffer", 10 | "clear": "all" 11 | }, 12 | "id": "User.clearBuffer" 13 | }, 14 | { 15 | "command": "find", 16 | "id": "User.find" 17 | }, 18 | { 19 | "command": "duplicateTab", 20 | "id": "User.duplicateTab" 21 | }, 22 | { 23 | "command": "paste", 24 | "id": "User.paste" 25 | }, 26 | { 27 | "command": 28 | { 29 | "action": "copy", 30 | "singleLine": false 31 | }, 32 | "id": "User.copy.224984B4" 33 | } 34 | ], 35 | "alwaysShowNotificationIcon": false, 36 | "autoHideWindow": false, 37 | "compatibility.enableUnfocusedAcrylic": false, 38 | "compatibility.textMeasurement": "console", 39 | "copyFormatting": "none", 40 | "copyOnSelect": false, 41 | "defaultProfile": "{a58a681c-27da-4f40-9abf-3d300517889b}", 42 | "focusFollowMouse": true, 43 | "initialCols": 112, 44 | "initialRows": 32, 45 | "keybindings": 46 | [ 47 | { 48 | "id": "User.clearBuffer", 49 | "keys": "ctrl+l" 50 | }, 51 | { 52 | "id": null, 53 | "keys": "ctrl+numpad_minus" 54 | }, 55 | { 56 | "id": "User.find", 57 | "keys": "ctrl+f" 58 | }, 59 | { 60 | "id": null, 61 | "keys": "alt+right" 62 | }, 63 | { 64 | "id": null, 65 | "keys": "ctrl+shift+w" 66 | }, 67 | { 68 | "id": null, 69 | "keys": "ctrl+shift+k" 70 | }, 71 | { 72 | "id": null, 73 | "keys": "ctrl+shift+d" 74 | }, 75 | { 76 | "id": "User.copy.224984B4", 77 | "keys": "ctrl+c" 78 | }, 79 | { 80 | "id": "User.duplicateTab", 81 | "keys": "ctrl+n" 82 | }, 83 | { 84 | "id": "Terminal.ClosePane", 85 | "keys": "ctrl+w" 86 | }, 87 | { 88 | "id": null, 89 | "keys": "ctrl+alt+left" 90 | }, 91 | { 92 | "id": null, 93 | "keys": "alt+shift+minus" 94 | }, 95 | { 96 | "id": null, 97 | "keys": "alt+shift+plus" 98 | }, 99 | { 100 | "id": null, 101 | "keys": "alt+space" 102 | }, 103 | { 104 | "id": null, 105 | "keys": "ctrl+shift+f" 106 | }, 107 | { 108 | "id": null, 109 | "keys": "ctrl+comma" 110 | }, 111 | { 112 | "id": "User.paste", 113 | "keys": "ctrl+v" 114 | }, 115 | { 116 | "id": null, 117 | "keys": "ctrl+numpad_plus" 118 | }, 119 | { 120 | "id": null, 121 | "keys": "alt+down" 122 | }, 123 | { 124 | "id": null, 125 | "keys": "ctrl+shift+t" 126 | }, 127 | { 128 | "id": null, 129 | "keys": "ctrl+shift+4" 130 | }, 131 | { 132 | "id": null, 133 | "keys": "alt+left" 134 | }, 135 | { 136 | "id": null, 137 | "keys": "alt+up" 138 | }, 139 | { 140 | "id": "Terminal.OpenNewTab", 141 | "keys": "ctrl+t" 142 | }, 143 | { 144 | "id": null, 145 | "keys": "ctrl+shift+1" 146 | }, 147 | { 148 | "id": null, 149 | "keys": "ctrl+shift+2" 150 | }, 151 | { 152 | "id": null, 153 | "keys": "ctrl+shift+5" 154 | }, 155 | { 156 | "id": null, 157 | "keys": "ctrl+shift+comma" 158 | }, 159 | { 160 | "id": null, 161 | "keys": "ctrl+shift+3" 162 | }, 163 | { 164 | "id": "Terminal.SelectAll", 165 | "keys": "ctrl+a" 166 | }, 167 | { 168 | "id": null, 169 | "keys": "ctrl+shift+6" 170 | }, 171 | { 172 | "id": null, 173 | "keys": "ctrl+insert" 174 | }, 175 | { 176 | "id": null, 177 | "keys": "ctrl+shift+7" 178 | }, 179 | { 180 | "id": null, 181 | "keys": "ctrl+shift+home" 182 | }, 183 | { 184 | "id": null, 185 | "keys": "ctrl+shift+8" 186 | }, 187 | { 188 | "id": null, 189 | "keys": "ctrl+shift+9" 190 | }, 191 | { 192 | "id": null, 193 | "keys": "ctrl+alt+comma" 194 | }, 195 | { 196 | "id": null, 197 | "keys": "ctrl+shift+space" 198 | }, 199 | { 200 | "id": null, 201 | "keys": "ctrl+shift+period" 202 | }, 203 | { 204 | "id": null, 205 | "keys": "ctrl+shift+pgdn" 206 | }, 207 | { 208 | "id": null, 209 | "keys": "ctrl+shift+pgup" 210 | }, 211 | { 212 | "id": null, 213 | "keys": "ctrl+numpad0" 214 | }, 215 | { 216 | "id": null, 217 | "keys": "ctrl+shift+m" 218 | }, 219 | { 220 | "id": null, 221 | "keys": "ctrl+alt+9" 222 | }, 223 | { 224 | "id": null, 225 | "keys": "ctrl+alt+2" 226 | }, 227 | { 228 | "id": null, 229 | "keys": "ctrl+alt+7" 230 | }, 231 | { 232 | "id": null, 233 | "keys": "ctrl+alt+4" 234 | }, 235 | { 236 | "id": null, 237 | "keys": "ctrl+alt+6" 238 | }, 239 | { 240 | "id": null, 241 | "keys": "win+sc(41)" 242 | }, 243 | { 244 | "id": null, 245 | "keys": "ctrl+alt+1" 246 | }, 247 | { 248 | "id": null, 249 | "keys": "alt+shift+left" 250 | }, 251 | { 252 | "id": null, 253 | "keys": "ctrl+alt+3" 254 | }, 255 | { 256 | "id": null, 257 | "keys": "ctrl+alt+5" 258 | }, 259 | { 260 | "id": null, 261 | "keys": "alt+shift+right" 262 | }, 263 | { 264 | "id": null, 265 | "keys": "ctrl+alt+8" 266 | }, 267 | { 268 | "id": null, 269 | "keys": "ctrl+shift+down" 270 | }, 271 | { 272 | "id": null, 273 | "keys": "ctrl+shift+end" 274 | }, 275 | { 276 | "id": null, 277 | "keys": "alt+shift+down" 278 | }, 279 | { 280 | "id": null, 281 | "keys": "alt+shift+up" 282 | }, 283 | { 284 | "id": null, 285 | "keys": "ctrl+shift+up" 286 | }, 287 | { 288 | "id": null, 289 | "keys": "ctrl+shift+a" 290 | }, 291 | { 292 | "id": null, 293 | "keys": "enter" 294 | }, 295 | { 296 | "id": null, 297 | "keys": "shift+insert" 298 | } 299 | ], 300 | "launchMode": "default", 301 | "minimizeToNotificationArea": false, 302 | "newTabMenu": 303 | [ 304 | { 305 | "type": "remainingProfiles" 306 | } 307 | ], 308 | "newTabPosition": "afterCurrentTab", 309 | "profiles": 310 | { 311 | "defaults": 312 | { 313 | "closeOnExit": "always", 314 | "colorScheme": "OnnoKicu", 315 | "font": 316 | { 317 | "cellHeight": "1.65", 318 | "face": "FiraCode Nerd Font", 319 | "size": 11.5 320 | }, 321 | "historySize": 999999999, 322 | "intenseTextStyle": "all" 323 | }, 324 | "list": 325 | [ 326 | { 327 | "commandline": "fish.exe", 328 | "guid": "{a58a681c-27da-4f40-9abf-3d300517889b}", 329 | "hidden": false, 330 | "icon": "%USERPROFILE%\\.dotfiles\\assets\\fish.ico", 331 | "name": "Fish" 332 | }, 333 | { 334 | "commandline": "bash.exe", 335 | "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed4b}", 336 | "hidden": false, 337 | "icon": "%USERPROFILE%\\.dotfiles\\assets\\bash.ico", 338 | "name": "Bash" 339 | }, 340 | { 341 | "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", 342 | "hidden": false, 343 | "name": "Command Prompt", 344 | "startingDirectory": null 345 | }, 346 | { 347 | "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", 348 | "hidden": false, 349 | "name": "Windows PowerShell", 350 | "startingDirectory": null 351 | } 352 | ] 353 | }, 354 | "schemes": 355 | [ 356 | { 357 | "background": "#1E2227", 358 | "black": "#4A4F5A", 359 | "blue": "#61AFEF", 360 | "brightBlack": "#616A7B", 361 | "brightBlue": "#93CFFF", 362 | "brightCyan": "#82D2DC", 363 | "brightGreen": "#C2DEAD", 364 | "brightPurple": "#E0A8F1", 365 | "brightRed": "#FE808A", 366 | "brightWhite": "#FFFFFF", 367 | "brightYellow": "#D1A47A", 368 | "cursorColor": "#FFFFFF", 369 | "cyan": "#56B6C2", 370 | "foreground": "#ABB2BF", 371 | "green": "#97C775", 372 | "name": "OnnoKicu", 373 | "purple": "#C678DD", 374 | "red": "#EE5D69", 375 | "selectionBackground": "#FFFF00", 376 | "white": "#CCCCCC", 377 | "yellow": "#B68353" 378 | } 379 | ], 380 | "searchWebDefaultQueryUrl": "https://www.google.com/search?q=%22%s%22", 381 | "showTabsFullscreen": false, 382 | "snapToGridOnResize": true, 383 | "tabSwitcherMode": "mru", 384 | "tabWidthMode": "equal", 385 | "theme": "dark", 386 | "themes": [], 387 | "warning.confirmCloseAllTabs": false, 388 | "windowingBehavior": "useNew" 389 | } -------------------------------------------------------------------------------- /src/ps1/settings-machine.ps1: -------------------------------------------------------------------------------- 1 | Write-Output 'Setting LocalMachine Registry Settings...' 2 | 3 | # Disable Windows Spotlight and set the normal Windows Picture as the desktop background 4 | # Disable Windows Spotlight on the lock screen 5 | reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsSpotlightOnLockScreen /t REG_DWORD /d 1 /f 6 | # Disable Windows Spotlight suggestions, tips, tricks, and more on the lock screen 7 | reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f 8 | # Disable Windows Spotlight on Settings 9 | reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsSpotlightActiveUser /t REG_DWORD /d 1 /f 10 | 11 | # Prevents Dev Home Installation 12 | reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\DevHomeUpdate" /f 13 | 14 | # Prevents New Outlook for Windows Installation 15 | reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\OutlookUpdate" /f 16 | 17 | # Prevents Chat Auto Installation & Removes Chat Icon 18 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v ConfigureChatAutoInstall /t REG_DWORD /d 0 /f 19 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Chat" /v "ChatIcon" /t REG_DWORD /d 3 /f 20 | 21 | # Start Menu Customization 22 | reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f 23 | reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_ProviderSet /t REG_DWORD /d 1 /f 24 | reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_WinningProvider /t REG_SZ /d B5292708-1619-419B-9923-E5D9F3925E71 /f 25 | reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f 26 | reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins_LastWrite /t REG_DWORD /d 1 /f 27 | # Enables the "Settings" and "File Explorer" Icon in the Start Menu 28 | reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v AllowPinnedFolderSettings /t REG_DWORD /d 00000001 /f 29 | reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v AllowPinnedFolderSettings_ProviderSet /t REG_DWORD /d 00000001 /f 30 | reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v AllowPinnedFolderFileExplorer /t REG_DWORD /d 00000001 /f 31 | reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v AllowPinnedFolderFileExplorer_ProviderSet /t REG_DWORD /d 00000001 /f 32 | 33 | # Enable Long File Paths with Up to 32,767 Characters 34 | reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f 35 | 36 | # Disables News and Interests 37 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f 38 | 39 | # Disables Windows Consumer Features Like App Promotions etc. 40 | reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 0 /f 41 | 42 | # Disables Bitlocker Auto Encryption on Windows 11 24H2 and Onwards 43 | reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\BitLocker" /v "PreventDeviceEncryption" /t REG_DWORD /d 1 /f 44 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\EnhancedStorageDevices" /v TCGSecurityActivationDisabled /t REG_DWORD /d 1 /f 45 | 46 | # Disables Cortana 47 | reg.exe add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f 48 | 49 | # Disables Activity History 50 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v EnableActivityFeed /t REG_DWORD /d 0 /f 51 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v PublishUserActivities /t REG_DWORD /d 0 /f 52 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v UploadUserActivities /t REG_DWORD /d 0 /f 53 | 54 | # Disables Location Tracking 55 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" /v Value /t REG_SZ /d Deny /f 56 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v SensorPermissionState /t REG_DWORD /d 0 /f 57 | reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" /v Status /t REG_DWORD /d 0 /f 58 | reg.exe add "HKLM\SYSTEM\Maps" /v AutoUpdateEnabled /t REG_DWORD /d 0 /f 59 | 60 | # Disables Telemetry 61 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f 62 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f 63 | 64 | # Disables Windows Ink Workspace 65 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\WindowsInkWorkspace" /v AllowWindowsInkWorkspace /t REG_DWORD /d 0 /f 66 | 67 | # Disables Feedback Notifications 68 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v DoNotShowFeedbackNotifications /t REG_DWORD /d 1 /f 69 | 70 | # Disables the Advertising ID for All Users 71 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" /v DisabledByGroupPolicy /t REG_DWORD /d 1 /f 72 | 73 | # Disables Windows Error Reporting 74 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v Disabled /t REG_DWORD /d 1 /f 75 | 76 | # Disables Delivery Optimization 77 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v DODownloadMode /t REG_DWORD /d 0 /f 78 | 79 | # Disables Remote Assistance 80 | reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Remote Assistance" /v fAllowToGetHelp /t REG_DWORD /d 0 /f 81 | 82 | # Hides the Meet Now Button on the Taskbar 83 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v HideSCAMeetNow /t REG_DWORD /d 1 /f 84 | 85 | # Gives Multimedia Applications like Games and Video Editing a Higher Priority 86 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /v AlwaysOn /t REG_DWORD /d 1 /f 87 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /v NoLazyMode /t REG_DWORD /d 1 /f 88 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /v SystemResponsiveness /t REG_DWORD /d 0 /f 89 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" /v NetworkThrottlingIndex /t REG_DWORD /d 4294967295 /f 90 | 91 | # Optimize Windows for Gaming 92 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v Affinity /t REG_DWORD /d 0 /f 93 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v Priority /t REG_DWORD /d 6 /f 94 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v "GPU Priority" /t REG_DWORD /d 12 /f 95 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v "SFIO Priority" /t REG_SZ /d "High" /f 96 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v "Latency Sensitive" /t REG_SZ /d "True" /f 97 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" /v "Scheduling Category" /t REG_SZ /d "High" /f 98 | 99 | # Optimize Windows for Gaming 100 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\DisplayPostProcessing" /v Affinity /t REG_DWORD /d 0 /f 101 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\DisplayPostProcessing" /v Priority /t REG_DWORD /d 6 /f 102 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\DisplayPostProcessing" /v "GPU Priority" /t REG_DWORD /d 12 /f 103 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\DisplayPostProcessing" /v "SFIO Priority" /t REG_SZ /d "High" /f 104 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\DisplayPostProcessing" /v "Latency Sensitive" /t REG_SZ /d "True" /f 105 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\DisplayPostProcessing" /v "Scheduling Category" /t REG_SZ /d "High" /f 106 | 107 | # Fix Managed by your organization in Edge 108 | reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /f 109 | 110 | # Set Registry Keys to Disable Wifi-Sense 111 | reg.exe add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" /v Value /t REG_DWORD /d 0 /f 112 | reg.exe add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" /v Value /t REG_DWORD /d 0 /f 113 | 114 | # Disables Storage Sense 115 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" /v 01 /t REG_DWORD /d 0 /f 116 | 117 | # Disable Xbox GameDVR 118 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\GameDVR" /v AllowGameDVR /t REG_DWORD /d 0 /f 119 | 120 | # Disable Tablet Mode 121 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" /v TabletMode /t REG_DWORD /d 0 /f 122 | 123 | # Always go to desktop mode on sign-in 124 | reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" /v SignInMode /t REG_DWORD /d 1 /f 125 | 126 | # Disables OneDrive Automatic Backups of Important Folders (Documents, Pictures etc.) 127 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\OneDrive" /v KFMBlockOptIn /t REG_DWORD /d 1 /f 128 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v DisableFileSyncNGSC /t REG_DWORD /d 1 /f 129 | 130 | # Disables the "Push To Install" feature in Windows 131 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\PushToInstall" /v "DisablePushToInstall" /t REG_DWORD /d 1 /f 132 | 133 | # Disables Consumer Account State Content 134 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableConsumerAccountStateContent" /t REG_DWORD /d 1 /f 135 | 136 | # Disables Cloud Optimized Content 137 | reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableCloudOptimizedContent" /t REG_DWORD /d 1 /f 138 | 139 | # DELETES SCHEDULED TASKS REGISTRY KEYS 140 | # Deleting Application Compatibility Appraiser 141 | reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{0600DD45-FAF2-4131-A006-0B17509B9F78}" /f 142 | # Deleting Customer Experience Improvement Program 143 | reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{4738DE7A-BCC1-4E2D-B1B0-CADB044BFA81}" /f 144 | reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{6FAC31FA-4A85-4E64-BFD5-2154FF4594B3}" /f 145 | reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{FC931F16-B50A-472E-B061-B6F79A71EF59}" /f 146 | # Deleting Program Data Updater 147 | reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{0671EB05-7D95-4153-A32B-1426B9FE61DB}" /f 148 | # Deleting autochk proxy 149 | reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{87BF85F4-2CE1-4160-96EA-52F554AA28A2}" /f 150 | reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{8A9C643C-3D74-4099-B6BD-9C6D170898B1}" /f 151 | # Deleting QueueReporting 152 | reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{E3176A65-4E44-4ED3-AA73-3283660ACB9C}" /f 153 | 154 | # Cursor Policy 155 | reg.exe add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Cursor" /v ExtensionGalleryServiceUrl /t REG_SZ /d "https://marketplace.visualstudio.com/_apis/public/gallery" /f 156 | 157 | # Enable Windows Sudo 158 | sudo config --enable default -------------------------------------------------------------------------------- /src/ps1/settings-user.ps1: -------------------------------------------------------------------------------- 1 | Write-Output 'Setting CurrentUser Registry Settings...' 2 | 3 | # Disabling the Delivery of Personalized or Suggested Content Like App Suggestions, Tips, and Advertisements in Windows 4 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d 0 /f 5 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "FeatureManagementEnabled" /t REG_DWORD /d 0 /f 6 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OEMPreInstalledAppsEnabled" /t REG_DWORD /d 0 /f 7 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d 0 /f 8 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEverEnabled" /t REG_DWORD /d 0 /f 9 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d 0 /f 10 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "RotatingLockScreenEnabled" /t REG_DWORD /d 0 /f 11 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "RotatingLockScreenOverlayEnabled" /t REG_DWORD /d 0 /f 12 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 0 /f 13 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d 0 /f 14 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-310093Enabled" /t REG_DWORD /d 0 /f 15 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338387Enabled" /t REG_DWORD /d 0 /f 16 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d 0 /f 17 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d 0 /f 18 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d 0 /f 19 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353698Enabled" /t REG_DWORD /d 0 /f 20 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353694Enabled" /t REG_DWORD /d 0 /f 21 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353696Enabled" /t REG_DWORD /d 0 /f 22 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d 0 /f 23 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Privacy" /v TailoredExperiencesWithDiagnosticDataEnabled /t REG_DWORD /d 0 /f 24 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Privacy" /v IsMiEnabled /t REG_DWORD /d 0 /f 25 | reg.exe delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager\Subscriptions" /f 26 | reg.exe delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager\SuggestedApps" /f 27 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech_OneCore\Settings\OnlineSpeechPrivacy" /v "HasAccepted" /t REG_DWORD /d 0 /f 28 | 29 | # Removes Copilot 30 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Runonce" /v "UninstallCopilot" /t REG_SZ /d "" /f 31 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f 32 | 33 | # Removes Store Banner in Notepad 34 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Notepad" /v ShowStoreBanner /t REG_DWORD /d 0 /f 35 | 36 | # Removes OneDrive 37 | reg.exe delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f 38 | 39 | # Align the taskbar to the left on Windows 11 40 | reg.exe add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarAl /t REG_DWORD /d 0 /f 41 | 42 | # Hides Search Icon on Taskbar 43 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v SearchboxTaskbarMode /t REG_DWORD /d 0 /f 44 | 45 | # Start Menu Customizations 46 | # Disables Recently Added Apps and Recommendations in the Start Menu 47 | reg.exe add "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer" /v HideRecentlyAddedApps /t REG_DWORD /d 1 /f 48 | reg.exe add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_IrisRecommendations /t REG_DWORD /d 0 /f 49 | 50 | # Hides or Removes People from Taskbar 51 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" /v PeopleBand /t REG_DWORD /d 0 /f 52 | 53 | # Hides Task View Button on Taskbar 54 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowTaskViewButton /t REG_DWORD /d 0 /f 55 | 56 | # Hides and Removes News and Interests from PC and Taskbar 57 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds" /v ShellFeedsTaskbarViewMode /t REG_DWORD /d 2 /f 58 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds" /v ShellFeedsEnabled /t REG_DWORD /d 0 /f 59 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" /v EnableFeeds /t REG_DWORD /d 0 /f 60 | 61 | # Disables User Account Sync 62 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Privacy" /v SettingSyncEnabled /t REG_DWORD /d 0 /f 63 | 64 | # Disables Location Services 65 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Privacy" /v LocationServicesEnabled /t REG_DWORD /d 0 /f 66 | 67 | # Disables Input Personalization Settings 68 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Personalization\Settings" /v AcceptedPrivacyPolicy /t REG_DWORD /d 0 /f 69 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\InputPersonalization" /v RestrictImplicitTextCollection /t REG_DWORD /d 1 /f 70 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\InputPersonalization" /v RestrictImplicitInkCollection /t REG_DWORD /d 1 /f 71 | 72 | # Disables Automatic Feedback Sampling 73 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Feedback" /v AutoSample /t REG_DWORD /d 0 /f 74 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Feedback" /v ServiceEnabled /t REG_DWORD /d 0 /f 75 | 76 | # Disables Recent Documents Tracking 77 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackDocs /t REG_DWORD /d 0 /f 78 | 79 | # Disable "Let websites provide locally relevant content by accessing my language list" 80 | reg.exe add "HKEY_CURRENT_USER\Control Panel\International\User Profile" /v HttpAcceptLanguageOptOut /t REG_DWORD /d 1 /f 81 | 82 | # Disables "Let Windows track app launches to improve Start and search results" 83 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 0 /f 84 | 85 | # Disables App Diagnostics 86 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\AppDiagnostics" /v AppDiagnosticsEnabled /t REG_DWORD /d 0 /f 87 | 88 | # Disables Delivery Optimization 89 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization" /v DODownloadMode /t REG_DWORD /d 0 /f 90 | 91 | # Disables Tablet Mode 92 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" /v TabletMode /t REG_DWORD /d 0 /f 93 | 94 | # Disables Use Sign-In Info for User Account 95 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication" /v UseSignInInfo /t REG_DWORD /d 0 /f 96 | 97 | # Disables Maps Auto Download 98 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Maps" /v AutoDownload /t REG_DWORD /d 0 /f 99 | 100 | # Disables Telemetry and Ads 101 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Siuf\Rules" /v NumberOfSIUFInPeriod /t REG_DWORD /d 0 /f 102 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v DisableTailoredExperiencesWithDiagnosticData /t REG_DWORD /d 1 /f 103 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f 104 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSyncProviderNotifications /t REG_DWORD /d 0 /f 105 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f 106 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" /v "HarvestContacts" /t REG_DWORD /d 0 /f 107 | 108 | # Manages and displays the status of ongoing operations, such as file copy, move, delete, etc. 109 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" /v EnthusiastMode /t REG_DWORD /d 1 /f 110 | 111 | # Set File Explorer to Open This PC instead of Quick Access 112 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v LaunchTo /t REG_DWORD /d 1 /f 113 | 114 | # Hides the Meet Now Button on the Taskbar 115 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v HideSCAMeetNow /t REG_DWORD /d 1 /f 116 | 117 | # Disables the Second Out-Of-Box Experience 118 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\UserProfileEngagement" /v ScoobeSystemSettingEnabled /t REG_DWORD /d 0 /f 119 | 120 | # Set Registry Keys to Enable End Task With Right Click 121 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarDeveloperSettings /t REG_DWORD /d 1 /f 122 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarEndTask /t REG_DWORD /d 1 /f 123 | 124 | # Disable Xbox GameDVR 125 | reg.exe add "HKEY_CURRENT_USER\System\GameConfigStore" /v GameDVR_FSEBehavior /t REG_DWORD /d 2 /f 126 | reg.exe add "HKEY_CURRENT_USER\System\GameConfigStore" /v GameDVR_FSEBehaviorMode /t REG_DWORD /d 2 /f 127 | reg.exe add "HKEY_CURRENT_USER\System\GameConfigStore" /v GameDVR_Enabled /t REG_DWORD /d 0 /f 128 | reg.exe add "HKEY_CURRENT_USER\System\GameConfigStore" /v GameDVR_DXGIHonorFSEWindowsCompatible /t REG_DWORD /d 1 /f 129 | reg.exe add "HKEY_CURRENT_USER\System\GameConfigStore" /v GameDVR_HonorUserFSEBehaviorMode /t REG_DWORD /d 1 /f 130 | reg.exe add "HKEY_CURRENT_USER\System\GameConfigStore" /v GameDVR_EFSEFeatureFlags /t REG_DWORD /d 0 /f 131 | 132 | # Disables Bing Search in Start Menu 133 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v CortanaConsent /t REG_DWORD /d 0 /f 134 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v BingSearchEnabled /t REG_DWORD /d 0 /f 135 | 136 | # Enables NumLock on Startup 137 | reg.exe add "HKEY_CURRENT_USER\Control Panel\Keyboard" /v InitialKeyboardIndicators /t REG_SZ /d 2 /f 138 | 139 | # Disables Sticky Keys 140 | reg.exe add "HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d "506" /f 141 | reg.exe add "HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys" /v HotkeyFlags /t REG_SZ /d "58" /f 142 | 143 | # Enables Show File Extensions 144 | reg.exe add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f 145 | 146 | # Enables Dark Mode 147 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v AppsUseLightTheme /t REG_DWORD /d 0 /f 148 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v ColorPrevalence /t REG_DWORD /d 0 /f 149 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v EnableTransparency /t REG_DWORD /d 1 /f 150 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v SystemUsesLightTheme /t REG_DWORD /d 0 /f 151 | 152 | # Hides the Language Switcher on the Taskbar 153 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\CTF\LangBar" /v ShowStatus /t REG_DWORD /d 3 /f 154 | 155 | # WINDOWS 10 TASKBAR CUSTOMIZATIONS 156 | # Makes Taskbar Small in Windows 10 157 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarSmallIcons" /t REG_DWORD /d 1 /f 158 | 159 | # Restore context menu 160 | reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve 161 | 162 | # Enable Fast Startup 163 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v "StartupDelayInMSec" /t REG_DWORD /d 10 /f 164 | reg.exe add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v "WaitForIdleState" /t REG_DWORD /d 0 /f 165 | --------------------------------------------------------------------------------