### Install Winfetch using PSGallery Source: https://github.com/lptstr/winfetch/wiki/Installation Use this command to install Winfetch from the PowerShell Gallery. This is the recommended method for fast execution and tab-completion. ```powershell Install-Script winfetch ``` -------------------------------- ### Install Winfetch using Scoop Source: https://github.com/lptstr/winfetch/wiki/Installation Install Winfetch using the Scoop package manager. ```powershell scoop install winfetch ``` -------------------------------- ### Install Winfetch using Chocolatey Source: https://github.com/lptstr/winfetch/wiki/Installation Install Winfetch using the Chocolatey package manager. The -y flag automatically confirms the installation. ```powershell choco install winfetch -y ``` -------------------------------- ### Clone Winfetch repository using Git Source: https://github.com/lptstr/winfetch/wiki/Installation Clone the Winfetch repository to your local machine using Git. This is the first step for manual installation. ```bash $ git clone git@github.com:lptstr/winfetch.git ``` -------------------------------- ### Configure Custom Package Managers Source: https://github.com/lptstr/winfetch/wiki/Configuration To display packages from custom package managers, add their names to the `$CustomPkgs` array and create a corresponding `info_pkgs_` function that returns the package count. This example configures 'cargo'. ```powershell $CustomPkgs = @("cargo") function info_pkg_cargo { return (cargo install --list | Where-Object {$_ -like "*:`}).Length } ``` -------------------------------- ### Disable Information Field Example Source: https://github.com/lptstr/winfetch/wiki/Configuration To disable an information field, add a '#' character at the beginning of the line in the configuration file. ```powershell "disk" # ENABLED # "battery" # DISABLED ``` -------------------------------- ### Add Custom Info Segment Function Source: https://github.com/lptstr/winfetch/wiki/Configuration Define a function prefixed with 'info_' to create a custom info segment. The function must return a hashtable with 'title' and 'content' properties. This example shows how to add a 'Time' segment. ```powershell function info_custom_time { return @{ title = "Time" content = (Get-Date) } } @( ... "motherboard" "custom_time" # use custom info line "uptime" ... ) ``` -------------------------------- ### Download Winfetch batch file for legacy systems Source: https://github.com/lptstr/winfetch/wiki/Installation Use bitsadmin in cmd.exe to download the winfetch.bat file for systems that cannot run PowerShell 5+. ```batch bitsadmin /transfer winfetchjob /download /priority foreground "https://raw.githubusercontent.com/lptstr/winfetch/legacy/winfetch.bat" "C:\your\path\here\winfetch.bat" ``` -------------------------------- ### Default Winfetch Configuration File Source: https://github.com/lptstr/winfetch/wiki/Configuration This is the structure of the default configuration file. Uncomment lines to enable specific features or customize settings like image display, logo, and info segments. ```powershell # ===== WINFETCH CONFIGURATION ===== # $image = "~/winfetch.png" # $noimage = $true # Display image using ASCII characters # $ascii = $true # Set the version of Windows to derive the logo from. # $logo = "Windows 10" # Specify width for image/logo # $imgwidth = 24 # Specify minimum alpha value for image pixels to be visible # $alphathreshold = 50 # Custom ASCII Art # This should be an array of strings, with positive # height and width equal to $imgwidth defined above. # $CustomAscii = @( # "⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣾⣿⣦⠀ ⠀" # "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣶⣶⣾⣷⣶⣆⠸⣿⣿⡟⠀ ⠀" # "⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣷⡈⠻⠿⠟⠻⠿⢿⣷⣤⣤⣄⠀⠀ ⠀" # "⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣦⠀ ⠀" # "⠀⠀⠀⢀⣤⣤⡘⢿⣿⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⣿⡇ ⠀" # "⠀⠀⠀⣿⣿⣿⡇⢸⣿⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢈⣉⣉⡁ ⠀" # "⠀⠀⠀⠈⠛⠛⢡⣾⣿⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⡇ ⠀" # "⠀⠀⠀⠀⠀⠀⠀⠻⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⠟⠀ ⠀" # "⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⡿⢁⣴⣶⣦⣴⣶⣾⡿⠛⠛⠋⠀⠀ ⠀" # "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠿⠿⢿⡿⠿⠏⢰⣿⣿⣧⠀⠀ ⠀" # "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢿⣿⠟⠀⠀ ⠀" # ) # Make the logo blink # $blink = $true # Display all built-in info segments. # $all = $true # Add a custom info line # function info_custom_time { # return @{ # title = "Time" # content = (Get-Date) # } # } # Configure which disks are shown # $ShowDisks = @("C:", "D:") # Show all available disks # $ShowDisks = @("*") # Configure which package managers are shown # disabling unused ones will improve speed # $ShowPkgs = @("winget", "scoop", "choco") # Use the following option to specify custom package managers. # Create a function with that name as suffix, and which returns # the number of packages. Two examples are shown here: # $CustomPkgs = @("cargo", "just-install") # function info_pkg_cargo { # return (cargo install --list | Where-Object {$_ -like "*:").Length # } # function info_pkg_just-install { # return (just-install list).Length # } # Configure how to show info for levels # Default is for text only. # 'bar' is for bar only. # 'textbar' is for text + bar. # 'bartext' is for bar + text. # $cpustyle = 'bar' # $memorystyle = 'textbar' # $diskstyle = 'bartext' # $batterystyle = 'bartext' # Remove the '#' from any of the lines in # the following to **enable** their output. @( "title" "dashes" "os" "computer" "kernel" "motherboard" # "custom_time" # use custom info line "uptime" # "ps_pkgs" # takes some time "pkgs" "pwsh" "resolution" "terminal" # "theme" "cpu" "gpu" # "cpu_usage" "memory" "disk" # "battery" # "locale" # "weather" # "local_ip" # "public_ip" "blank" "colorbar" ) ``` -------------------------------- ### Benchmark Command for Winfetch and Neofetch Source: https://github.com/lptstr/winfetch/wiki/Winfetch-vs-Neofetch This command uses hyperfine to benchmark the execution time of Neofetch and Winfetch. It runs 10 iterations with a 3-second warm-up period for each command. ```bash ❯ hyperfine -w 3 "neofetch" "powershell -file .\winfetch.ps1" ``` -------------------------------- ### Download development version of Winfetch Source: https://github.com/lptstr/winfetch/wiki/Installation Use PowerShell's Invoke-WebRequest to download the development version of the winfetch.ps1 script and save it to a specified path. ```powershell # download development version Invoke-WebRequest "https://raw.githubusercontent.com/lptstr/winfetch/master/winfetch.ps1" -OutFile ~\.local\bin\winfetch.ps1 -UseBasicParsing ``` -------------------------------- ### Generate Default Configuration Source: https://github.com/lptstr/winfetch/wiki/Configuration Use this command to generate the default configuration file if it does not exist or to reset your configuration to default. ```powershell winfetch -genconf ``` -------------------------------- ### Move winfetch.ps1 to PATH Source: https://github.com/lptstr/winfetch/wiki/Installation Move the winfetch.ps1 script to a directory included in your system's PATH for easy execution. ```bash $ mv .\winfetch.ps1 ~\.local\bin\ ``` -------------------------------- ### Execute Winfetch directly from URL Source: https://github.com/lptstr/winfetch/wiki/Installation Execute the winfetch script directly from its URL using PowerShell without saving it to disk. This downloads the content, removes the first character (likely a BOM), and pipes it to Invoke-Expression. ```powershell (Invoke-WebRequest "https://raw.githubusercontent.com/lptstr/winfetch/master/winfetch.ps1" -UseBasicParsing).Content.Remove(0,1) | Invoke-Expression ``` -------------------------------- ### Download specific version of Winfetch Source: https://github.com/lptstr/winfetch/wiki/Installation Use PowerShell's Invoke-WebRequest to download a specific version of the winfetch.ps1 script and save it to a specified path. ```powershell # download a specific version Invoke-WebRequest "https://raw.githubusercontent.com/lptstr/winfetch/v2.0.0/winfetch.ps1" -OutFile ~\.local\bin\winfetch.ps1 -UseBasicParsing ``` -------------------------------- ### Reset Git repository to latest release Source: https://github.com/lptstr/winfetch/wiki/Installation After cloning, navigate to the repository directory and reset it to the latest release tag. ```bash cd winfetch git reset --hard v0.0.0 ``` -------------------------------- ### Enable ANSI Colors in Windows Registry Source: https://github.com/lptstr/winfetch/wiki/ANSI-Colors For Windows 10 versions 1511 through 1903, enable ANSI colors by setting the VirtualTerminalLevel registry value to 1. ```reg [HKEY_CURRENT_USER\Console] "VirtualTerminalLevel"=dword:00000001 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.