Skip to content

0lswitcher/pywal-zed-theme

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important

This repository is a fork of Fuwn's zed-theme-wal repository, with me adding a new modified version of their script (named pywal-to-zen.sh) that's meant to ensure the resulting theme file ends up in the original Zed configuration location, so that the theme updates automatically instead of having to manually refresh/reload.

Fuwn's original script is still preserved in this repository if you prefer; named generate_theme

Pywal Zed Theme

A theme for the Zed text editor that utilises your wal colour scheme


Usage

Since this theme is dynamic in nature, it can't exactly be committed to Zed's extension repository just yet due to the way extensions work. You'll have to follow a few steps.

# Clone the repository locally
git clone https://github.com/Fuwn/zed-theme-wal.git

# Navigate into the extension folder
cd zed-theme-wal

# Generate the theme from your wal colour scheme
chmod +x ./generate_theme && ./generate_theme

After these steps, you'll have a fully useable Zed theme generated from your wal colour scheme ready to install.

  1. Open Zed.
  2. Press Ctrl + Shift + P to open the command palette.
  3. Search for "extensions" and click on "zed: extensions".
  4. Click on "Install Dev Extension", navigate to local repository copy, and select it.
  5. Press Ctrl + K, then Ctrl + T, and select the "wal" theme.

You've done it! You should now see your current wal colour scheme applied to Zed.

Updating

zed-theme-wal's generate_theme script is path safe, so feel free to put this in any of your background setting scripts as a hook, or even add a global alias to it and run it after you change your wallpaper. Zed will automatically update any local themes you have installed, so you only have to go through the above process once!

This may used to work, but difficulties in auto updating themes led to the creation of this fork and it's resulting script, so if you're having difficulties getting Zed to auto update w/ the theme, try using my pywal-to-zen.sh script instead of the generate_theme one provided by default.

Main difference is the $THEME_FILE variable being changed from:
THEME_FILE="${EXTENSION_DIRECTORY}/themes/wal-theme.json"
to:
THEME_FILE="${HOME}/.config/zed/themes/wal-theme.json"

To use my version, simply replace any instance of generate_theme w/ pywal-to-kando.sh in the code block shown in the above Usage section.

Tip

If you're resulting theme has harsh colors that make it hard to use Zed, I highly recommend running the script with the --mode flag passed and set to readability.

Credits

Fuwn for making the original zed-theme-wal repository!
It appears abandoned now, but still show them some love for the original creation!

Licence

This project is licensed with the GNU General Public License v3.0.

About

Pywal theme for Zed (The text editor), forked and modified from Fuwn's 'zed-theme-wal' repo.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages

  • Shell 100.0%