Code Monkey home page Code Monkey logo

theme-magic's People

Contributors

jajafarov avatar jcaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

theme-magic's Issues

Mapcar* error on theme update

I get a mapcar* error on theme reload with the 3 themes I've tried. The theme changes in emacs but nothing else happens. The themes are the following: Kaolin-Ocean, Majapahit-Dark and Planet. Here is the error:

Debugger entered--Lisp error: (void-function mapcar*)
  mapcar*(cons (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16) ("#13131D" "#CC5B5F" "#EDD790" "#9C80B9" "#52849C" "#CC9474" "#90B8C6" "#E5E5E7" "#5F686A" "#CC5B5F" "#EDD790" "#9C80B9" "#52849C" "#CC9474" "#90B8C6" "#E5E5E7"))
  theme-magic--apply-colors-with-pywal(("#13131D" "#CC5B5F" "#EDD790" "#9C80B9" "#52849C" "#CC9474" "#90B8C6" "#E5E5E7" "#5F686A" "#CC5B5F" "#EDD790" "#9C80B9" "#52849C" "#CC9474" "#90B8C6" "#E5E5E7"))
  theme-magic-from-emacs()
  theme-magic-from-emacs--wrapper(kaolin-ocean nil nil)
  apply(theme-magic-from-emacs--wrapper (kaolin-ocean nil nil))
  load-theme(kaolin-ocean nil nil)
  funcall-interactively(load-theme kaolin-ocean nil nil)
  call-interactively(load-theme record nil)
  command-execute(load-theme record)
  #f(compiled-function (cmd) #<bytecode 0x1623429>)("load-theme")
  ivy-call()
  ivy-read("M-x " [## c-clear-char-property-fun ansi-color-apply-overlay-face eval-sexp-fu-flash-error haskell-indentation-bird-p 0 -is-infix\? vc-git-stash-snapshot gdb-script-syntax-propertize-function tls-format-message flycheck-next-error magit-reflog-commit help-variable 0 haskell-cabal-empty-regexp extend-region-p rtags-fixitline tramp-do-copy-or-rename-file-out-of-band adwaita nnmail-fix-eudora-headers js--expression-in-sgml-indent-line sgml-syntax-propertize web-mode-warning-face avl-tree--stack-store--cmacro cl-print--preprocess ivy-sort-file-function-default calcFunc-sec :notifier wicon drag-stuff-region-right conf-space-mode-map post-deadline checkdoc-package-keywords-flag being c-mode-var one message-kill-actions nnheader-translate-file-chars cl--loop-initially \' nnoo-import-1 gnus-summary-catchup-from-here rtags-results-buffer-type rx-trans-forms problems sgml-tag-name--cmacro calc-embedded-mode-hook f-empty\? ident message-send-mail-function ...] :predicate commandp :require-match t :history counsel-M-x-history :action #f(compiled-function (cmd) #<bytecode 0x1623429>) :sort t :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  call-interactively(counsel-M-x nil nil)
  command-execute(counsel-M-x)

And here is how I set up theme-magic:

(use-package theme-magic
  :ensure t
  :init (theme-magic-export-theme-mode))

Running on Arch Linux, Emacs 26.2. Let me know if anything else is needed.

Automatic updating exports wrong background color under emacsclient

Problem

When using emacsclient with emacs --daemon as the server, automatic theme exporting stops working. The wrong background color is extracted. Here's an example of what happens when theme-magic-export-theme-mode is active and the theme is changed to zenburn:

Mismatched background color example

To the top right, wal has a preview of the current colors. Color0 (the background color) is not the only color affected, but it is the most dramatic.

Manual theme exporting still works.

Possible Cause

What seems to be happening is the default face isn't setting its background color until after theme-magic's advice is processed, but this only happens to emacsclients. (I don't currently know what would cause that.)

This may be related to the server running as a terminal-based Emacs. I don't know how that architecture works.

Theme-magic process applies colours but never quits, has to be manually killed.

When I switch themes, I get the following message in the echo area:

Applying colors:
((0 . #000000) (1 . #FF8059) (2 . #79A8FF) (3 . #DBBE5F) (4 . #B6A0FF) (5 . #B0D6F5) (6 . #FEACD0) (7 . #FFFFFF) (8 . #A8A8A8) (9 . #FF8059) (10 . #79A8FF) (11 . #DBBE5F) (12 . #B6A0FF) (13 . #B0D6F5) (14 . #FEACD0) (15 . #FFFFFF))

...after which, nothing happens and I have to explicity call keyboard-quit to kill the process.

Any clues what could be hanging?

Some themes don't set ANSI colors

Problem

Some themes do not set the ANSI colors correctly. They seem to use the defaults, which don't match the theme.

Examples

zenburn sets the ANSI colors. This looks good. Look at the color palettes:

theme-magic-zenburn-example

obsidian does not seem to set the ANSI colors. Look at the intermediate colors, 1 through 6. They appear to be the defaults (ignore the background and the foreground - these are not set from the ANSI colors):

theme-magic-obsidian-example

cherry-blossom has the same problem:

theme-magic-cherry-blossom-example

Solution

The only way to get around this would be to set the colors using a different method to the ANSI colors. This could be an optional fallback, which is only used if theme-magic detects that the ANSI colors are unset.

Can someone test Mac compatibility?

I don't have access to a Mac. pywal, the engine that drives the theme application, does work on MacOS (using iTerm 2). theme-magic should work on MacOS, but I can't test it.

If anyone could test the package on Mac and let me know if it works, it would be most appreciated.

Feature: run external script after pywal

I think it would be useful to have s way to run an external script after pywal has finished similar to the wal -o flag. At the moment I need to run a script after pywal finishes to relaunch bspwm and dunst. If I could either specify a path to the script to run or maybe even choose what flags to run pywal with, I'd be happy.

Add bright colours

Hello,

It would be nice if this would also add bright colours.

Thanks.

Feature: import colors from Pywal

Pywal automatically extracts colors from a wallpaper, and applies them to your current Linux session wherever it can (mainly, terminals). theme-magic exports colors, but it can't currently import them.

Add some method for importing Pywal colors, and turning them into a nice theme.

Exported themes don't reflect the dominant colors of the Emacs theme

(Visual examples included below - they may be easier to understand)

Problem

Most themes that set ANSI colors use the standard color order:

  1. Black
  2. Red
  3. Green
  4. Yellow
  5. Blue
  6. Purple
  7. Cyan
  8. White

Meaning they will set ANSI color 0 to black, 1 to red, 2 to green, 4 to blue, etc. Almost all themes use this ordering. This means the ANSI colors don't reflect any kind of color dominance. If the Emacs theme uses purple as its dominant color, the ordering of the ANSI colors will not reflect this.

This means the exported theme will not look cohesive for some themes. Two problems become obvious:

  1. Shell tools tend to use certain ANSI colors (such as blue and cyan) more than others. This means exported themes tend to always look blue/cyan.
  2. Themes that use a restricted part of the color wheel, e.g. a theme that uses many shades of blue, will lose their look when exported. The exported theme won't be restricted to different shades of blue.

Examples

This behaviour works well for some themes, such as zenburn:

theme-magic-zenburn-example

However, it doesn't work for others. spacemacs-dark is designed to use purple as its dominant color - this look is lost when it's exported - everything becomes blue and cyan.

theme-magic-spacemacs-dark-example

Some themes use non-standard ANSI colors, presumably to get around this problem. These tend to look good. For example, creamsody:

theme-magic-creamsody-example

Some themes look awful. This is cherry-blossom:

theme-magic-cherry-blossom-example

Solution

Ideally, the exported theme should somehow reflect the dominant colors of the Emacs theme. If the theme is mainly purple, purple should be dominant. If the theme is monocolor, the different gradients should be reflected instead of just the named ANSI colors.

The obvious solution would be to re-order the colors. Instead of exporting colors in the standard ANSI order, theme-magic should place the dominant colors in the most-used slots. For example, the spacemacs-dark theme should put purple in the blue or cyan slot, since it's used the most.

A heuristic would need to be developed that could do this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.