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.py
for Qtile andalacritty.yml
for Alacritty. - The randomly selected image is also updated as the wallpaper using
nitrogen
- Python 3.x
colorthief
library (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
colortheif
installed: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
ColorThief
library. - 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:
bgColors
andfgColors
for Qtile are updated.- The
background
color in Alacritty is updated.
- The script sets the chosen image as the wallpaper using the
nitrogen
tool. - A backup of the original configuration files is created (with the
.bak
extension).
- 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.py
Before 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.