{"id":13596099,"url":"https://github.com/dylanaraps/wal","last_synced_at":"2025-04-09T16:31:30.256Z","repository":{"id":61044872,"uuid":"75848188","full_name":"dylanaraps/wal","owner":"dylanaraps","description":"🎨 Generate and change colorschemes on the fly. Deprecated, use pywal instead. --\u003e","archived":true,"fork":false,"pushed_at":"2017-07-07T10:09:55.000Z","size":129,"stargazers_count":729,"open_issues_count":4,"forks_count":35,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-11-06T19:40:52.569Z","etag":null,"topics":["changing-colorschemes","colorscheme","terminal-emulators","wal"],"latest_commit_sha":null,"homepage":"https://github.com/dylanaraps/pywal","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dylanaraps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-07T15:18:30.000Z","updated_at":"2024-10-22T12:16:04.000Z","dependencies_parsed_at":"2022-10-09T04:00:29.405Z","dependency_job_id":null,"html_url":"https://github.com/dylanaraps/wal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanaraps%2Fwal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanaraps%2Fwal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanaraps%2Fwal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanaraps%2Fwal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dylanaraps","download_url":"https://codeload.github.com/dylanaraps/wal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248067767,"owners_count":21042352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["changing-colorschemes","colorscheme","terminal-emulators","wal"],"created_at":"2024-08-01T16:02:08.032Z","updated_at":"2025-04-09T16:31:29.907Z","avatar_url":"https://github.com/dylanaraps.png","language":"Shell","funding_links":[],"categories":["Shell","Tweaks","Tools and Plugins"],"sub_categories":["Windows"],"readme":"## NOTE: Development focus has been shifted to `pywal`.\n\n`pywal` is a Python 3 version of `wal` written by me. It's faster, the code is cleaner, it actually has tests(!) and it supports more export formats. `pywal` can also be installed easily on any distro by using `pip install pywal`.\n\nFor a list of differences between `pywal` and `wal`, take a look at this wiki page: **[What's different in pywal?](https://github.com/dylanaraps/pywal/wiki/What's-different-in-pywal%3F)**\n\nRepo link: **https://github.com/dylanaraps/pywal**\n\n\n# wal\n\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.md) [![Build Status](https://travis-ci.org/dylanaraps/wal.svg?branch=master)](https://travis-ci.org/dylanaraps/wal)\n\n\n`wal` is a script that takes an image (or a directory of images), generates a colorscheme (using `imagemagick`) and then changes all of your open terminal's colorschemes to the new colors on the fly. `wal` then caches each generated colorscheme so that cycling through wallpapers while changing colorschemes is instantaneous. `wal` finally merges the new colorscheme into the Xresources db so that any new terminal emulators you open use the new colorscheme.\n\n`wal` can also change the colors in some other programs, check out the [Customization](#customization) section below.\n\n**NOTE:** `wal` is not perfect and won't work with some images.\n\n[Albums of examples (Warning large)](https://dylanaraps.com/pages/rice)\n\n![screen](http://i.imgur.com/4aLsvvW.png)\n\n\n## Table of Contents\n\n\u003c!-- vim-markdown-toc GFM --\u003e\n* [Requirements](#requirements)\n    * [Dependencies](#dependencies)\n    * [Terminal Emulator](#terminal-emulator)\n* [Installation](#installation)\n* [Setup](#setup)\n    * [Applying the theme to new terminals.](#applying-the-theme-to-new-terminals)\n    * [Making the colorscheme persist on reboot.](#making-the-colorscheme-persist-on-reboot)\n* [Usage](#usage)\n* [Plugins](#plugins)\n    * [Hyper Terminal](#hyper-terminal)\n* [Customization](#customization)\n    * [i3](#i3)\n    * [rofi](#rofi)\n    * [vim](#vim)\n    * [Emacs](#emacs)\n    * [polybar](#polybar)\n    * [iTerm2](#iterm2)\n    * [Shell Variables](#shell-variables)\n    * [SCSS variables](#scss-variables)\n    * [Firefox variables](#firefox-variables)\n    * [PuTTY](#putty)\n    * [Scripting](#scripting)\n    * [Custom Switcher](#custom-switcher)\n    * [Terminal.sexy](#terminalsexy)\n\n\u003c!-- vim-markdown-toc --\u003e\n\n\n## Requirements\n\n\n### Dependencies\n\n- `bash`\n- `imagemagick`\n    - Colorscheme generation\n- `xfce`, `gnome`, `cinnamon`, `mate`\n    - Desktop wallpaper setting.\n- `feh`, `nitrogen`, `bgs`, `hsetroot`, `habak`\n    - Universal wallpaper setting.\n- `xprop`\n    - Used to detect which DE wallpaper setter to use.\n    - Only required if you're running a DE.\n\n\n### Terminal Emulator\n\nTo use `wal` your terminal emulator must support a special type of escape sequence. The command below can be used as a test to see if `wal` will work with your setup.\n\nRun the command below, does the background color of your terminal become red?\n\n```sh\nprintf \"%b\" \"\\033]11;#ff0000\\007\"\n```\n\nIf your terminal's background color is now red, your terminal will work with `wal`.\n\n\n## Installation\n\nJust grab the script (`wal`) and add it to your path.\n\n\n## Setup\n\n**NOTE:** If you get junk in your terminal, add `-t` to all of the `wal` commands.\n\n### Applying the theme to new terminals.\n\n`wal` only applies the new colors to the currently open terminals. Any new terminal windows you open won't be using the new theme unless you add a single line to your shell's start up file. (`.bashrc`, `.zshrc` etc.) The `-r` flags tells `wal` to find the current colorscheme inside the cache and then set it for the new terminal.\n\nAdd this line to your shell startup file. (`.bashrc`, `.zshrc` or etc.)\n\n```sh\n# Import colorscheme from 'wal'\n(wal -r \u0026)\n```\n\nHere's how the extra syntax above works:\n\n```sh\n\u0026   # Run the process in the background.\n( ) # Hide shell job control messages.\n```\n\n### Making the colorscheme persist on reboot.\n\nOn reboot your new colorscheme won't be set or in use. To fix this you have to add a line to your `.xinitrc` or whatever file starts programs on your system. This `wal` command will set your wallpaper to the wallpaper that was set last boot and also apply the colorscheme again.\n\nWithout this you'll be themeless until you run `wal` again on boot.\n\n```sh\n# Add this to your .xinitrc or whatever file starts programs on startup.\nwal -i \"$(\u003c \"${HOME}/.cache/wal/wal\")\"\n```\n\n\n## Usage\n\nRun `wal` and point it to either a directory (`wal -i \"path/to/dir\"`) or an image (`wal -i \"/path/to/img.jpg\"`) and that's all. `wal` will change your wallpaper for you and also set your terminal colors.\n\n```sh\nUsage: wal [OPTION] -i '/path/to/dir'\nExample: wal -i '${HOME}/Pictures/Wallpapers/'\n         wal -i '${HOME}/Pictures/1.jpg'\n\nFlags:\n  -a                      Set terminal background transparency. *Only works in URxvt*\n  -c                      Delete all cached colorschemes.\n  -f '/path/to/colors'    Load colors directly from a colorscheme file.\n  -h                      Display this help page.\n  -i '/path/to/dir'       Which image to use.\n     '/path/to/img.jpg'\n  -n                      Skip setting the wallpaper.\n  -o 'script_name'        External script to run after 'wal'.\n  -q                      Quiet mode, don't print anything.\n  -r                      Reload current colorscheme.\n  -t                      Fix artifacts in VTE Terminals. (Termite, xfce4-terminal)\n  -x                      Use extended 16-color palette.\n\n```\n\n\n## Plugins\n\nListed below are plugins for other programs that add support for `wal` colors.\n\n### Hyper Terminal\n\nhttps://github.com/dneustadt/hyper-wal\n\n\n\n## Customization\n\nI've written another script \\[1\\] for personal use only that updates my `lemonbar`, `dunst` and `startpage` colors with the new ones from `wal` when run.\n\nWhat I've done is bind both `wal` and my custom script to the same key so that after `wal` has done its thing my custom script applies the colors to the rest of my environment.\n\n```sh\n# i3 config.\n# ...\n\n# Cycle wallpapers and apply new colorscheme.\nbindsym $mod+w exec \"wal -i $HOME/Pictures/Wallpapers -o wal-set\"\n```\n\nNow whenever I press `Win+w` a random wallpaper is chosen and all of the programs on my system start using the new colors immediately.\n\nI've also set `wal` and my custom script to start with X. This means that when I boot my PC a random wallpaper is chosen and colors are generated + applied to all of my programs.\n\n```sh\n# .xinitrc\nwal -i \"$HOME/Pictures/Wallpapers\" -o wal-set\nexec i3\n```\n\nHave a look at my script to see how `wal` is used and how the programs get reloaded with the new colors.\n\n\\[1\\] https://github.com/dylanaraps/bin/blob/master/wal-set\n\n**NOTE:** `wal` stores the exported files in `$HOME/.cache/wal/`\n\n\n### i3\n\nTo use `wal` with i3 you have to make some modifications to your i3 config file.\n\ni3 can read colors from `Xresources` into config variables! This allows us to change i3's colors dynamically. On run `wal` will detect that you're running i3 and reload your config for you. If you've set it up correctly i3 will then use your new colorscheme.\n\nExample:\n\n```sh\n# Set colors from Xresources\n# Change 'color7' and 'color2' to whatever colors you want i3 to use\n# from the generated scheme.\n# NOTE: The '#f0f0f0' in the lines below is the color i3 will use if\n# it fails to get colors from Xresources for some reason.\nset_from_resource $fg i3wm.color7 #f0f0f0\nset_from_resource $bg i3wm.color2 #f0f0f0\n\n# class                 border  backgr. text indicator child_border\nclient.focused          $bg     $bg     $fg  $bg       $bg\nclient.focused_inactive $bg     $bg     $fg  $bg       $bg\nclient.unfocused        $bg     $bg     $fg  $bg       $bg\nclient.urgent           $bg     $bg     $fg  $bg       $bg\nclient.placeholder      $bg     $bg     $fg  $bg       $bg\n\nclient.background       $bg\n\n# PROTIP: You can also dynamically set dmenu's colors this way:\nbindsym $mod+d exec dmenu_run -nb \"$fg\" -nf \"$bg\" -sb \"$bg\" -sf \"$fg\"\n```\n\n\n### rofi\n\n`wal` updates rofi's colors for you out of the box, automatically.\n\n\n### vim\n\nInside this repo there's a colorscheme I created for vim that uses your terminal colors. It was made to work with the colors `wal` generates and you can install it using any vim package manager.\n\nExample:\n\n```vim\n! Using plug\nPlug 'dylanaraps/wal'\n\ncolorscheme wal\n```\n\n### Emacs\n\nInstall [this package](https://github.com/cqql/xresources-theme), which will make Emacs use your X environment's colors instead of its default colors.\n\n### polybar\n\nPolybar can read colors from `Xresources` to set the bar's colors.\n\nExample:\n\n```vim\nfg = ${xrdb:color7}\nbg = ${xrdb:color2}\n```\n\n### iTerm2\n\nThere's a script called `wal2iterm` in `contrib/wal2iterm` which converts the generated colors to an importable iTerm2 colorscheme.\n\nThe themes are stored in the `wal` cache directory. (`${HOME}/.cache/wal/itermcolors`).\n\nExample:\n\n```sh\nwal -i \"IMAGE\" -o \"/path/to/wal2iterm/wal2iterm\"\n```\n\n\n### Shell Variables\n\n`wal` also exports the colorscheme as a list of shell variables that you can source for use in scripts and the shell.\n\nExample:\n\n```sh\n# Add this line to your .bashrc or a shell script.\nsource \"$HOME/.cache/wal/colors.sh\"\n\n```\n\nIn the shell:\n\n```sh\n# Once the file is sourced you can use the colors like this:\n\ndylan ~ \u003eecho \"$color0\"\n#282A23\n\ndylan ~ \u003eecho \"$color0 $color5\"\n#282A23 #BCC3CE\n\n# lemonbar example\nlemonbar -B \"$color7\" -F \"$color0\"\n```\n\n\n### SCSS variables\n\n`wal` also exports the colorscheme as SCSS variables for use in webpages. I'm using this feature to update my startpage with the new colors dynamically.\n\nExample:\n\n```scss\n// Example .scss file\n\n// Import Colors\n@import '/home/dylan/.cache/wal/colors.scss';\n\nbody {\n    background: $color0;\n    color: $color7;\n}\n```\n\n### Firefox variables\n\n`wal` also exports the colors as Firefox CSS variables for use with Stylish or userChrome.css.\n\nExample Firefox CSS:\n\n```css\n/* Import the CSS file.\n   NOTE: This must be at line 1 of your Firefox stylesheet. */\n@import url('file:///home/dylan/.cache/wal/firefox.css')\n\n/* Use the variables */\n#nav-bar {\n    background-color: var(--color3) !important;\n    color: var(--color7) !important;\n}\n\n```\n\n### PuTTY\n\n`wal` also exports the colors so they can be used with PuTTY. After running `wal`, a file will be created (`$HOME/.cache/wal/colors.reg`) that can be executed on a Windows machine to create a new PuTTY session with the generated colors. Once the file is executed, you can select `Wal` from the *Saved Sessions* list.\n\n\n### Scripting\n\n`wal` also exports the colors in a plain text format. This is helpful when you want use the plain colors in another script. See the script in `contrib/wal2iterm` for an example.\n\nThe file is called `colors` and just contains the hex values one per line in the order of 0-15.\n\nExample `colors` file:\n\n```\n#0C2B32\n#9C7648\n#B78742\n#B4884D\n#AC8C64\n#D19D62\n#61828A\n#F0DEC0\n#666666\n#9C7648\n#B78742\n#B4884D\n#AC8C64\n#D19D62\n#61828A\n#F0DEC0\n```\n\nExample usage in a script:\n\n```sh\n# Create an array with the plain hex colors ordered 0-15.\nc=($(\u003c \"${cache_dir}/colors\"))\n\n# Remove the leading '#' if needed.\nc=(\"${c[@]//\\#}\")\n```\n\n\n### Custom Switcher\n\nYou can also manually create your own `colors` files and load them directly with the `wal -f` option to quickly switch between your favorite colorschemes without changing the background.\n\n```sh\n# Switch to previously saved Monokai colorscheme\n\nwal -f \"$HOME/.colors/monokai\"\n\n# Switch to previously saved Solarized colorscheme\nwal -f \"$HOME/.colors/solarized\"\n```\n\n### Terminal.sexy\n\nYou can import `wal`'s colors into Terminal.sexy by copy-pasting the contents of the `colors.xresources` file located in the cache directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylanaraps%2Fwal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdylanaraps%2Fwal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylanaraps%2Fwal/lists"}