wal color theme
Link: https://github.com/dylanaraps/pywal
The repository was archived. But the functions sill work.
Original name call wal, then it change to call pywal.
It is a tool for generate and change color-schemes for system or some software
Use this command to checkout all the avaliable themes
wal --theme
The most interesting command is it can pass image file and base on image tone to get match theme scheme.
So I used this command to switch the background image from folder randomly and generate color scheme:
wal -i ~/wallpaper
It will show the change on your terminal immediately.
Here is my wrapper script that randomly select themes I like.
#!/bin/bash # Check if 'wal' is not installed if ! command -v wal &> /dev/null; then echo "Error: 'wal' is not installed. Please install pywal first." exit 1 fi wal_log="/tmp/wal-theme" # List of available themes themes=( "3024" "ashes" "base16-atelier-forest" "base16-atelier-savanna" "base16-black-metal-bathory" "base16-black-metal-burzum" "base16-black-metal-khold" "base16-black-metal-mayhem" "base16-bright" "base16-chalk" "base16-gruvbox-medium" "base16-harmonic" "base16-irblack" "base16-materia" "base16-monokia" "base16-nord" "sexy-colorfulcolors" "sexy-hund" "base16-rebecca" "sexy-material" "sexy-orangish" "sexy-sexcolors" "sexy-rydgel" "sexy-theme2" "sexy-belge" "sexy-belge" "tempus_future" "tempus_rift" "tempus_summer" "tempus_winter" "vscode" "solarized -l" ) random_theme="${themes[RANDOM % ${#themes[@]}]}" echo "$(date '+%Y-%m-%d %H:%M:%S'): $random_theme" >> $wal_log notify-send "Switch color scheme: $random_theme" -t 2000 wal --theme "$random_theme"