https://github.com/jcaw/theme-magic
🎨 Apply your Emacs theme to the rest of Linux, using magic. Also works on Mac.
https://github.com/jcaw/theme-magic
ansi-colors elisp emacs linux linux-theme pywal terminal-themes themes
Last synced: 8 days ago
JSON representation
🎨 Apply your Emacs theme to the rest of Linux, using magic. Also works on Mac.
- Host: GitHub
- URL: https://github.com/jcaw/theme-magic
- Owner: jcaw
- License: gpl-3.0
- Created: 2019-03-20T14:21:24.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-11T20:35:44.000Z (almost 6 years ago)
- Last Synced: 2025-04-03T14:40:07.855Z (29 days ago)
- Topics: ansi-colors, elisp, emacs, linux, linux-theme, pywal, terminal-themes, themes
- Language: Emacs Lisp
- Homepage:
- Size: 14.9 MB
- Stars: 147
- Watchers: 1
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
What's the point in an Emacs theme if the rest of Linux looks different?
Apply your Emacs theme to the rest of Linux, using magic. Also works on Mac.---
![]()
## Usage
Just call `M-x` `theme-magic-from-emacs`. theme-magic will extract the colors from your Emacs theme and apply them to the rest of Linux with [Pywal](https://github.com/dylanaraps/pywal).
If you want the Linux theme to update automatically whenever the Emacs theme is changed, enable the global minor mode `theme-magic-export-theme-mode`. For example:
```emacs-lisp
(require 'theme-magic)
(theme-magic-export-theme-mode)
```You can disable auto-updating by disabling the minor mode.
## Installation
### Dependencies
First, you must install [Pywal](https://github.com/dylanaraps/pywal) as a dependency. Check if it's installed by calling `wal` in a shell. Make sure Python is installed too.
### Installing `theme-magic` from MELPA
`theme-magic` is [available](http://melpa.org/#/theme-magic) on MELPA. Follow the [instructions](https://melpa.org/#/getting-started) to set up MELPA.
Install `theme-magic` with `M-x package-install RET theme-magic RET`.
## Footnotes
### Restoring Your Theme
[Pywal](https://github.com/dylanaraps/pywal) only applies your theme to the current session. See its documentation for details. To restore the last theme, call `wal -R` in the shell. To restore your theme automatically, add the following to your `.xprofile` (or whichever dotfile is loaded automatically once your desktop starts up):
```shell
wal -R
```### Setting Your Wallpaper
Pywal was designed to generate a color scheme that matches your wallpaper. Because of some quirks in how Pywal works, you have to set the wallpaper before exporting a theme from Emacs, or it will not be saved. Call this command in a shell:
```shell
wal -i "path/to/wallpaper.png"
```Pywal will set your wallpaper and save it in its cache. Now, you can apply your Emacs theme:
```emacs
M-x theme-magic-from-emacs
```Now, when you call `wal -R`, both the wallpaper and the theme will be set.
### MacOS
`theme-magic` [also works](https://github.com/jcaw/theme-magic/issues/11) on MacOS. iTerm2 should inherit from the exported Emacs theme. You will need to call `wal -R` to refresh when the terminal restarts.