Skip to content
Nyan Cat for Emacs! Nyanyanyanyanyanyanyanyanyan!
Emacs Lisp
Latest commit b5db3a6 Apr 29, 2016 @TeMPOraL Added #'nyan-toggle-wavy-trail.
Manually setting this variable was kinda annoying.

README.org

Nyan Mode - Turn your Emacs into Nyanmacs! :)

https://badge.fury.io/gh/TeMPOraL%2Fnyan-mode.svg https://img.shields.io/badge/nyan-nyan-ff00ff.svg https://stable.melpa.org/packages/nyan-mode-badge.svg https://melpa.org/packages/nyan-mode-badge.svg

WARNING, MIND DUMBING CONTENT INSIDE.

“Nyan-mode. It’s things like this that make me proud to be an emacs user.” - mitchellh

“Everything that’s wrong (or right) with Emacs.” - wasamasa

Nyanmacs is expanding!! Read the story so far! :).

screenshot.png

Nyan Mode is an analog indicator of your position in the buffer. The Cat should go from left to right in your mode-line, as you move your point from 0% to 100%.

Features

  • NEW! You can scroll the buffer by clicking in the Nyan Cat area!
  • NEW! You can customize the minimum window width below which Nyan Mode will be disabled.
  • Mind dumbing content included,
  • Animation (M-x nyan-start-animation, M-x nyan-stop-animation),
  • Wavy rainbow (M-x nyan-toggle-wavy-trail),
  • Music, mplayer is needed (M-x nyan-start-music, M-x nyan-stop-music) (thanks, George Leontiev!),
  • Customizable properties.

Customizations

  • nyan-animate-nyancat - t to have it animated, nil for a static version.
  • nyan-animation-frame-interval - number of seconds between animation frames. Accepts fractional values.
  • nyan-bar-length - length of nyan-mode bar, in 8px-wide units.
  • nyan-cat-face-number - choose a cat face for the console mode.
  • nyan-wavy-trail - t to make the trail wavy; works even better when animation is enabled!
  • nyan-minimum-window-width - minimum width of the window, below which Nyan Mode will be disabled. This is important because Nyan Mode will otherwise push out more relevant information from the modelilne.

Using Nyan Mode with custom modeline

For those who were asking, or are planning to, Amit Patel shared some tips on how to make nyan-mode work with custom modeline.

He basically changed the mode-line-format to include:

(:eval (list (nyan-create)))

Note for Powerline users

Nyan Mode apparently breaks it. I might get around to fixing that eventually. If you know a way to do it, don’t hesitate to contribute :).

Known issues

It’s my second attempt to write a minor mode in Emacs, so there will definiely be some bugs.

This version uses XPM images, which should be supported by default by most Emacs 23 installations, Windows included. In case it doesn’t work, try switching to master-png branch. This branch, however, may have it’s own issues:

There was a problem with displaying PNG images, which require libpng to be available for Emacs. The lib is sometimes missing (e.g. some Windows installation). To make it work on Windows, one needs to download a proper DLL and put it into emacs bin/ folder. To see which DLL is needed, do: M-x describe-variable <ret> image-library-alist <ret>.

Customizing nyan-animate-nyancat is broken; don’t do it. I think it works now; please report issues if there are problems with it.

Credits

Thanks to everyone contributing patches, bug repots and ideas! The Emacs world is forever in your debt!

Code and idea inspired by sml-modeline.el, written by Lennart Borgman. See: http://bazaar.launchpad.net/~nxhtml/nxhtml/main/annotate/head%3A/util/sml-modeline.el

For animated Nyan Cat, I used frames by DryBowser455.

Other editors

For many years only the One True Editor was blessed with the presence of the Nyan Cat. Since its inception, however, daring souls have brought Nyanness to the lands of Lesser Editors.

Here are the examples I’ve tracked down so far:

If you’ve seen others in the wild, please submit.

Related

Check out Aaron Miller’s weatherline.el, partially inspired by Nyan Mode.

Also check out zone-nyan by Vasilij Schneidermann if you want the Nyan Cat to visit your Emacs when you step away from the keyboard!

Nyanyanyanyanyanyanya! ♬ ♫ ♪ ♩

Something went wrong with that request. Please try again.