-
Notifications
You must be signed in to change notification settings - Fork 0
Theming
wallbash generates a color palette from your wallpaper based on Material Design guidelines. The theming system lets you use these dynamic colors to theme any text-based configuration file on your system.
Important
The palette switches between light/dark based on the brightness of your wallpaper.
Here are the 28 color variables grouped based on its role, that can be used in your application config files. These variables will adapt to colors in HEX format [::...::] → #RRGGBB. For more details on roles and how to use it, please refer material design guide here.
| 4 Primary Colors | ||||||||||||||
| ||||||||||||||
| 4 Secondary Colors | ||||||||||||||
| ||||||||||||||
| 4 Tertiary Colors | ||||||||||||||
| ||||||||||||||
| 4 Error Colors | ||||||||||||||
| ||||||||||||||
| 7 Surface Colors | ||||||||||||||
| ||||||||||||||
| 2 Background Colors | ||||||||||||||
| ||||||||||||||
| 3 Inverse Colors | ||||||||||||||
|
Each color variable supports alpha values (transparency) in 2 different formats.
| HEX Format: use values from 0 to 100 (percentage) | ||||||
| ||||||
| RGBA Format: use values from 0.0 to 1.0 (decimal) | ||||||
|
Integrate your favorite application to wallbash in just 3 steps : 1 2 3
Identify the config file that applies colors to your application.
For example consider kitty, its using ~/.config/kitty/kitty.conf file.
font_family CaskaydiaCove Nerd Font Mono
bold_font auto
italic_font auto
bold_italic_font auto
font_size 9.0
include theme.confHere you can identify the colors codes for kitty in ~/.config/kitty/theme.conf file.
foreground #E7E2C5
background #181D3ACopy the application config file to create a template .t2 file.
cp ~/.config/kitty/theme.conf ~/.config/wallbash/kitty.t2 Tip
wallbash does a recursive scan for *.t2 files in $XDG_CONFIG_HOME/wallbash directory.
Then replace the hard-coded colors with wallbash variables as you see fit.
background [::Surface::]
foreground [::On Surface::]Finally, add a pipe delimited header line (line 1) to the template file, that provides runtime parameters.
Important
[::HyDE::]|path/to/target/config|post deploy command or script
- 1 static tag [::HyDE::] - mandatory for template validation
- 2 target file path - mandatory to deploy the resolved content, skip if target file does not exist
- 3 post deployment command or script - optional for advanced actions
Your wallbash template file ~/.config/wallbash/kitty.t2 is now ready!
[::HyDE::]|$HOME/.config/kitty/themes/theme.conf|killall -SIGUSR1 kitty
background [::Surface::]
foreground [::On Surface::]You can develop your own post deploy script if you want wallbash to execute any complex actions.
For example, you could create a script that:
- Restarts multiple applications at once
- Sends notifications
- Reloads your compositor
Warning
Using heavy post deployment scripts will affect performance.