~rostiger/relogen

relogen/readme.md -rwxr-xr-x 3.7 KiB View raw
9d2277bdClemens Updated readme 5 days ago

RE[golith]-LO[ok]-GEN[erator]

relogen is a simple script that generates Regolith color schemes using pywal.

Installation

Pywal

Download & Install pywall: https://github.com/dylanaraps/pywal

Test pywal by running:

wal -i path/to/image/folder

This should set a new wallpaper from the specified path.

Relogen Theme

Copy styles/relogen/ to ~/.config/regolith/

Relogen Script

Copy the relogen script file to ~/.local/bin/

Make the script executable by running chmod +x ~/.local/bin/relogen

Xresources

Update ~/.Xresources-regolith to point to the relogen theme:

#include ".config/regolith/styles/relogen/root"

Wallpaper Directory

Edit the first line in ~/.config/regolith/styles/relogen/wallpaper to specify the path to your wallpaper directory.

Note: subdirectories in the wallpaper directory are ignored by pywal.

Bash

Edit ~/.bashrc with the following lines

#update terminal colors
cat ~/.cache/wal/sequences

This will make sure that the terminal colors are applied each time a terminal is opened.

Powerline Shell (Optional)

Add the following line to .config/powerline-shell/config.json

"theme": "~/.config/regolith/styles/regen/powerline.py"

If the file doesn't exist, you can use powerline/config.json

Yosemite San Francisco Font (Optional)

Download and install the font.

If you don't want to use this font, please edit ~/.config/regolith/styles/relogen/typeface and replace it with the font of your choice.

Run relogen

Open the terminal and type relogen to see it in effect.

Dependencies

Regolith

Regolith is a desktop environment built on top of Ubuntu, GNOME and i3.

https://regolith-linux.org/

Pywal

Pywal is a tool that generates a color palette from the dominant colors in an image.

https://github.com/dylanaraps/pywal

Yosemite San Francisco Font (Optional)

https://github.com/supermarin/YosemiteSanFranciscoFont

Powerline Shell (Optional)

A beautiful and useful prompt generator for Bash, ZSH, Fish, and tcsh.

https://github.com/b-ryan/powerline-shell

How it works

  • relogen executes pywal to choose a wallpaper from the wallpaper directory and sample its colors. The values are stored in ~/.cache/wal/.
  • relogen loads the colors, re-formats the strings and stores them in ~/.config/regolith/styles/relogen/color.
  • relogen applies the current wallpaper path to the config file, so regolith knows what to load next time it loads.
  • relogen also copies the rofi theme from ~/.cache/wal/ and stores it in the theme folder.
  • When all is done regolith-look-refresh is executed.

As you can see, pywal and regolith do all the hard workd. relogen only consolidates the two.

Issues

  • When using the gnome terminal, the colors sometimes aren't applied to the color profile. When refreshing the terminal, it reverts to the Tango theme. Currently using st instead.
  • Powerline Shell needs still uses git colors that aren't sampled from the wallpaper colors.
  • Currently there is no shortcut to trigger relogen.

Extras

  • See the License file for license rights and limitations (MIT).
  • This is my first bash script and I'm also fairly new to Linux. Stuff might be inefficient, error prone or otherwise unwise. I'm happy to improve on it, so pull requests are welcome!

  • Here's a video of relogen in action:

https://merveilles.town/@rostiger/104169118581715098

Support

If you enjoy this script, please consider donating to the creators of Regolith, pywal, powershell.