# Cookbook ## Qutebrowser ### Remotely reloading your Qutebrowser configuration Qutebrowser can be remotely reloaded by sending it a SIGHUP signal. ```sh pkill -HUP qutebrowser ``` Note on older versions (<=3.1.0) this will simply kill Qutebrowser. ## ImageMagick Shchemes can create [ImageMagick pixel enumeration files](https://imagemagick.org/Usage/files/#txt), with a vertical strip of all the colors in the scheme. This is optimal for getting the color data into an image, or simply displaying the palette. ### Displaying a palette at a reasonable size This converts the pixel enumeration to a png and resizes it to 24px high with no interpolation. ```sh shchemes create_theme imagemagick -s=base16:monokai | convert txt:- -filter point -resize 2400% palette.png ``` Result: ![A strip of all the colors in the monokai scheme](./palette.png) ### Apply a color scheme to an image using [`-remap`](https://imagemagick.org/script/command-line-options.php#remap) ```sh shchemes create_theme --scheme=base16:blueforest imagemagick | \ | convert source.jpg -colorspace srgb -remap txt:- out.jpg ``` Note that this is isn't like theming an app where your colors are simply slotted into the theme. It's trying to recreate your image the best it can with your color scheme. Images with a palette closer to your scheme will yield better results. A trick I've found for wallpapers is using an image twice your actual monitor resolution--This makes the dithering less visible while still somewhat retaining the color scheme change. ### Apply a color scheme to an image with [`-dither`](https://www.imagemagick.org/Usage/quantize/#dither) ```sh shchemes create_theme --scheme=base16:blueforest imagemagick | \ | convert source.jpg -colorspace srgb -dither FloydSteinberg -remap txt:- out.jpg ``` Another dithering model available is `Riemersma`, which gives a more splotchy, "boiled" look. ## BSPWM ### Generate a script to set bspwm colors ```sh bspwm_theme="$HOME/.config/bspwm/colors" shchemes create_theme bspwm > "$bspwm_theme" "$bspwm_theme" ``` You'll need to call it from your bspwmrc ```sh "$(dirname $0)/colors" ```