Coder Social home page Coder Social logo

night-owl-emacs's Introduction

Night Owl for Emacs

MELPA MELPA Stable

Based entirely on Sarah Drasner's amazing Night Owl VSCode Theme. Built by modifying Kelvin Smith's monokai-emacs. Many thanks to both Sarah Drasner and Kelvin Smith.

Screenshot of Night Owl Theme for Emacs

Status

Initial development, but covers most of my use cases. PRs gladly accepted.

Tips

Ivy

To style the non-selected ivy items, try this:

(defun night-owl/ivy-format-function-line (cands)
  "Transform CANDS into a string for minibuffer."
  (let ((str (ivy-format-function-line cands)))
    (font-lock-append-text-property 0 (length str) 'face 'ivy-not-current str)
    str))

(setq ivy-format-function #'night-owl/ivy-format-function-line)

Spacemacs/evil

To style spacemacs cursors, try this:

(setq night-owl-evil-cursors
      '(("normal" night-owl-orange box)
        ("insert" night-owl-cursor (bar . 2))
        ("emacs" night-owl-cursor (bar . 2))
        ("hybrid" night-owl-cursor (bar . 2))
        ("replace" night-owl-gray (hbar . 2))
        ("evilified" night-owl-yellow box)
        ("visual" night-owl-gray (hbar . 2))
        ("motion" night-owl-violet box)
        ("lisp" night-owl-red box)
        ("iedit" night-owl-magenta box)
        ("iedit-insert" night-owl-magenta (bar . 2))))

(defun night-owl-set-evil-cursor (state color shape)
  (set (intern (format "evil-%s-state-cursor" state))
       (list color shape)))

(defun night-owl-update-evil-cursors ()
  (let ((current-theme (symbol-name (car custom-enabled-themes))))
    (if (string-prefix-p "night-owl" current-theme)
        (cl-loop for (state color style) in night-owl-evil-cursors
                 do
                 (night-owl-set-evil-cursor state (symbol-value color) style))
      ;; not night-owl theme, restore default spacemacs cursors
      (if (functionp 'spacemacs/add-evil-cursor)
          (cl-loop for (state color shape) in spacemacs-evil-cursors
                   do (spacemacs/add-evil-cursor state color shape))))))

(add-hook 'after-init-hook #'night-owl-update-evil-cursors)
;; For spacemacs (comment this out if not using spacemacs):
(add-hook 'spacemacs-post-theme-change-hook #'night-owl-update-evil-cursors)

;; For Evil (uncomment this if not using spacemacs):
;; (defvar after-load-theme-hook nil
;;   "Hook run after a color theme is loaded using `load-theme'.")
;; 
;; (defadvice load-theme (after run-after-load-theme-hook activate)
;;   "Run `after-load-theme-hook'."
;;   (message (format "Loading theme %s" (ad-get-arg 0)))
;;   (run-hooks 'after-load-theme-hook))
;; 
;; (add-hook 'after-load-theme-hook #'night-owl-update-evil-cursors)

night-owl-emacs's People

Contributors

aaronjensen avatar purcell avatar

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.