This script looks for dominant colors from a randomly selected image and uses that to theme your Qtile and Alacritty setup.
- Theme color generation from a randomly selected wall in a given directory
- Auto-updates the config files: The
config.pyfor Qtile andalacritty.ymlfor Alacritty. - The randomly selected image is also updated as the wallpaper using
nitrogen
- Python 3.x
colorthieflibrary (pip install colorthief)nitrogen(for setting the wallpaper)- A system using Qtile as the window manager and Alacritty as the terminal emulator
- Main Script: The Python script that performs all the operations.
- /home/Dew/.github/walls/.walls/: Directory containing images for wallpaper.
- /home/Dew/.config/qtile/config.py: Configuration file for Qtile, updated with the new color scheme.
- /home/Dew/.config/alacritty/alacritty.yml: Configuration file for Alacritty, updated with the new background color.
- Clone this repository to your local machine.
- Ensure you have
colortheifinstalled:pip install colorthief
- Ensure you have Qtile and Alacritty configured on your system.
- The script selects a random image from the specified directory.
- It generates a color palette from the image using the
ColorThieflibrary. - The script calculates the intensity of the colors and chooses a background color based on brightness.
- It updates the configuration files for Qtile and Alacritty to use the new color scheme:
bgColorsandfgColorsfor Qtile are updated.- The
backgroundcolor in Alacritty is updated.
- The script sets the chosen image as the wallpaper using the
nitrogentool. - A backup of the original configuration files is created (with the
.bakextension).
- Run the script, and it will automatically:
- Pick a random image.
- Generate the color palette.
- Update configuration files for Qtile and Alacritty.
- Set the chosen image as the wallpaper.
python irisShift.pyBefore modifying the configuration files, backups are created with the .bak extension. If something goes wrong, you can manually restore the original files from the backups.