Объясни понятным языком: winwal A wrapper around pywal for Windows. Art from…
- User
Объясни понятным языком:
winwal
A wrapper around pywal for Windows.
[image: Cycle Image Demo] Art from wallpaperhub
Dependencies
Only 1 backend is needed to get started, but each backend will provide slightly different color schemes.
pywal supports more backends, but I have not tried figuring them all out on Windows yet.
Use
pipto install:For
walBackend, install ImageMagick and add to path:choco install -y imagemagickWindows on ARM64 Please install the static version of ImageMagick from their downloads to avoid issues.
For schemer2 backend, install Go and run:
go install github.com/thefryscorer/schemer2@latestPowerShell-Core
winget install -e Microsoft.PowerShellNote: PowerShell versions less that 6 don't support JSON with comments
winget install Python pip install pywal colorthief colorz haishokuInstalling
Clone the repository and update your powershell profile to have:
Import-Module .\path\to\winwal.psm1To open your profile with code:
code $profileUsing
To update wal cache Windows Terminal Color Scheme using the current wallpaper:
Update-WalThemeTo use a different backend with the current wallpaper:
Update-WalTheme -Backend haishokuTo update wal cache, Windows Terminal Color Scheme, and set the desktop wallpaper:
Update-WalTheme -Image .\path\to\new\background.jpgTo update Windows Terminal Color Scheme with existing wal cache:
Update-WalTerminalTo update pwsh prompt (not Windows Terminal):
Update-WalCommandPromptNotes:
Update-WalCommandPromptwill download ColorTool and use it to set the new default color schemes.Keep WSL in sync
I have pywal installed in WSL and create a symbolic link in WSL so I only have to update in Windows and it gets mirrored in WSL:
ln -s /mnt/c/Users/username/.cache/wal ~/.cache/walThere's also instructions in pywal on setting up your dot files that need to be followed (look for .bashrc instructions).
VS Code Plugins Used
Recommended PowerShell Modules
[image: Terminal]
- Terminal-Icons (requires using a nerd font)
- oh-my-posh
- Assistant
Winwal is a tool designed for Windows users that acts as a wrapper around another program called pywal. The primary purpose of pywal is to generate color schemes based on the colors extracted from an image, typically your desktop wallpaper. This means that your terminal and other applications can automatically change their color themes to match the current wallpaper, creating a more integrated and visually appealing experience.
Here's a simple breakdown of what the document explains:
What is Winwal?
- Winwal allows Windows users to utilize pywal, which was originally designed for Unix-like systems.
- It helps in generating color schemes from your wallpaper and applies them to various applications like Windows Terminal and PowerShell.
Dependencies and Installation
To get Winwal working, you need to install several dependencies:
- Pywal: The core program that generates the color schemes.
- Backends for Color Extraction (you only need one, but you can install multiple for different results):
- colorthief
- colorz
- haishoku
- ImageMagick: Required if you're using the
walbackend in pywal.- Install via Chocolatey:
choco install -y imagemagick - Note for ARM64 Users: Install the static version directly from the ImageMagick downloads page to avoid issues.
- Install via Chocolatey:
- Schemer2 (optional backend):
- Requires Go programming language.
- Install Schemer2 with:
go install github.com/thefryscorer/schemer2@latest
- PowerShell Core: Version 6 or higher is needed because older versions don't support JSON with comments.
- Install via Winget:
winget install -e Microsoft.PowerShell
- Install via Winget:
- Python and Pip Packages:
- Install Python:
winget install Python - Install required Python packages:
pip install pywal colorthief colorz haishoku
- Install Python:
Setting Up Winwal
- Clone the Winwal Repository: Download the winwal script/module from its repository.
- Update Your PowerShell Profile:
- Open your PowerShell profile in an editor (like Visual Studio Code):
code $profile - Add the following line to import Winwal:
Import-Module .\path\to\winwal.psm1
- Open your PowerShell profile in an editor (like Visual Studio Code):
Using Winwal
- Update Theme Based on Current Wallpaper:
Update-WalTheme - Use a Different Backend for Color Extraction:
Update-WalTheme -Backend haishoku - Set a New Desktop Wallpaper and Update Theme:
Update-WalTheme -Image .\path\to\new\background.jpg - Update Windows Terminal Color Scheme with Existing Cache:
Update-WalTerminal - Update PowerShell Prompt Colors:
Update-WalCommandPrompt- Note: This command will download ColorTool and use it to set new default color schemes for the console.
Syncing with WSL (Windows Subsystem for Linux)
If you're using WSL, you can keep your Linux environment's color scheme in sync with Windows:
- Create a symbolic link in WSL to point to the Windows pywal cache:
ln -s /mnt/c/Users/username/.cache/wal ~/.cache/wal - Follow the additional setup instructions for pywal in your Linux environment (like updating your
.bashrcfile).
Enhancing Your Visual Experience
-
VS Code Extensions:
- wal-theme: Integrates pywal color schemes into VS Code.
- GlassIt-VSC: Adds transparency effects to VS Code.
-
Recommended PowerShell Modules:
- Terminal-Icons: Shows file and folder icons in the terminal (requires a Nerd Font).
- oh-my-posh: A prompt theming engine for PowerShell to customize the appearance of your command prompt.
In Summary
Winwal enhances your Windows experience by:
- Automatically generating color schemes from your desktop wallpaper.
- Applying these color schemes to your terminal, PowerShell prompt, and supported applications.
- Providing a cohesive and aesthetically pleasing environment that adapts to your wallpaper.
By following the installation and usage instructions, you can personalize your system and make your workflow more enjoyable with dynamic theming that reflects your current wallpaper's color palette.