-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
3,520 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
(defvar colors-post-extensions '(nyan-mode)) | ||
|
||
(defun colors/init-nyan-mode () | ||
(use-package nyan-mode | ||
:if colors-enable-nyan-cat-progress-bar | ||
:init | ||
(progn | ||
(setq nyan-wavy-trail t) | ||
(setq nyan-animate-nyancat t) | ||
(nyan-mode) | ||
|
||
(spacemacs|add-toggle nyan-cat-progress-bar | ||
:status nyan-mode | ||
:on (nyan-mode) | ||
:off (nyan-mode -1) | ||
:documentation "Show a nyan cat progress bar in the mode-line." | ||
:evil-leader "tmn") | ||
|
||
(defun spacemacs/powerline-nyan-cat () | ||
"Construct a powerline segment for nyan cat." | ||
(let* ((active (powerline-selected-window-active)) | ||
(l (1+ (truncate (powerline-width lhs)))) | ||
(r (1+ (truncate (powerline-width rhs)))) | ||
(face1 (if active 'powerline-active1 'powerline-inactive1)) | ||
(face2 (if active 'powerline-active2 'powerline-inactive2)) | ||
(separator-left | ||
(intern (format "powerline-%s-%s" | ||
powerline-default-separator | ||
(car powerline-default-separator-dir)))) | ||
(separator-right | ||
(intern (format "powerline-%s-%s" | ||
powerline-default-separator | ||
(cdr powerline-default-separator-dir))))) | ||
(setq nyan-bar-length (min 32 (/ (- (window-total-width) l r) 2))) | ||
(list | ||
(funcall separator-right face2 face1) | ||
(powerline-raw (nyan-create) face1) | ||
(funcall separator-left face1 face2))))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
* Nyan Mode - Turn your Emacs into Nyanmacs! :) | ||
|
||
** Fork modifications | ||
- the starting nyan cat image has no rainbow behind it, | ||
- the starting rainbow image has zigzags, | ||
- the animation loop is not endless and occurs only when nyan cat moves. | ||
|
||
** Introduction | ||
|
||
*WARNING, MIND DUMBING CONTENT INSIDE.* | ||
|
||
"Nyan-mode. It's things like this that make me proud to be an emacs user." - [[http://twitter.com/#!/mitchellh/status/104931263479156736][mitchellh]] | ||
|
||
Nyanmacs is expanding!! [[http://temporal.pr0.pl/devblog/2011/08/25/introducing-nyan-mode-el-turn-your-emacs-into-nyanmacs/][Read the story so far]]! :). | ||
|
||
[[file: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 | ||
- Mind dumbing content included, | ||
- Experimental animation (M-x nyan-start-animation, M-x nyan-stop-animation), | ||
- Wavy rainbow (M-x set-variable <ret> nyan-wavy-trail <ret> t), | ||
- Music, mplayer is needed (M-x nyan-start-music, M-x nyan-stop-music), | ||
- Customizable properties. | ||
|
||
** Using Nyan Mode with custom modeline | ||
For those who were asking, or are planning to, [[http://friendfeed.com/amitp/b4097da0/nyan-mode-turn-your-emacs-into-nyanmacs][Amit Patel shared]] | ||
some tips on how to make nyan-mode work with custom modeline. | ||
|
||
He basically changed the mode-line-format to include: | ||
#+begin_src emacs-lisp | ||
(:eval (list (nyan-create))) | ||
#+end_src | ||
|
||
** 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. | ||
|
||
** Credits | ||
|
||
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 [[http://media.photobucket.com/image/nyan%20cat%20sprites/DryBowser455/th_NyanCatSprite.png?t=1304659408][by DryBowser455]]. | ||
|
||
Nyanyanyanyanyanyanya! |
170 changes: 170 additions & 0 deletions
170
contrib/colors/extensions/nyan-mode/img/nyan-frame-1.xpm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
/* XPM */ | ||
static char *nyan_frame_1[] = { | ||
/* columns rows colors chars-per-pixel */ | ||
"25 15 149 2 ", | ||
" c black", | ||
". c #070B0F", | ||
"X c #0C0C0C", | ||
"o c #041C0C", | ||
"O c #000810", | ||
"+ c #070917", | ||
"@ c #0F1011", | ||
"# c #02191F", | ||
"$ c #111111", | ||
"% c #161616", | ||
"& c #082903", | ||
"* c #142700", | ||
"= c #083919", | ||
"- c #292B00", | ||
"; c #3C3400", | ||
": c #120B2D", | ||
"> c #001020", | ||
", c #3F1E31", | ||
"< c #172635", | ||
"1 c #222222", | ||
"2 c gray15", | ||
"3 c #2B2525", | ||
"4 c #2A2A2A", | ||
"5 c gray18", | ||
"6 c #3E2525", | ||
"7 c #2C2F32", | ||
"8 c gray22", | ||
"9 c #3A3C3E", | ||
"0 c gray24", | ||
"q c #490C00", | ||
"w c #7C0B10", | ||
"e c #4C2400", | ||
"r c #4C3100", | ||
"t c #483F00", | ||
"y c #403326", | ||
"u c #4B3C2D", | ||
"i c #423B34", | ||
"p c #3D4100", | ||
"a c #615600", | ||
"s c #09264A", | ||
"d c #1D2877", | ||
"f c #322E75", | ||
"g c #522244", | ||
"h c #434343", | ||
"j c #464646", | ||
"k c #4C4646", | ||
"l c gray29", | ||
"z c gray30", | ||
"x c #514C51", | ||
"c c gray34", | ||
"v c #54575A", | ||
"b c #5D5D5D", | ||
"n c #745D46", | ||
"m c #775E5E", | ||
"M c #614C61", | ||
"N c #6D4C6D", | ||
"B c #625962", | ||
"V c gray38", | ||
"C c #646464", | ||
"Z c #686868", | ||
"A c #7B6C6C", | ||
"S c gray45", | ||
"D c #767676", | ||
"F c #7B7B7B", | ||
"G c gray50", | ||
"H c #BF1119", | ||
"J c #F52A02", | ||
"K c #FC7800", | ||
"L c #947256", | ||
"P c #26B210", | ||
"I c #438500", | ||
"U c #2CCB13", | ||
"Y c #20D15C", | ||
"T c #889000", | ||
"R c #C4AC00", | ||
"E c #FBA500", | ||
"W c #F0D300", | ||
"Q c #BF9973", | ||
"! c #202C81", | ||
"~ c #263498", | ||
"^ c #432AAB", | ||
"/ c #5536D9", | ||
"( c #1E7FF7", | ||
") c #4D43E9", | ||
"_ c #5247F7", | ||
"` c #885788", | ||
"' c #A261A2", | ||
"] c #AA66AA", | ||
"[ c #AE68AE", | ||
"{ c #FF5FC5", | ||
"} c #C576C5", | ||
"| c #D17DD1", | ||
" . c #FF66CC", | ||
".. c #F069C9", | ||
"X. c #FF68CE", | ||
"o. c #E073CD", | ||
"O. c #FF6BD1", | ||
"+. c #FF72D8", | ||
"@. c #FF77DD", | ||
"#. c #FF7CE2", | ||
"$. c #0A819C", | ||
"%. c #0EA7CB", | ||
"&. c #1E80F7", | ||
"*. c #868686", | ||
"=. c #888888", | ||
"-. c gray56", | ||
";. c gray59", | ||
":. c gray60", | ||
">. c #A68F8F", | ||
",. c #A09999", | ||
"<. c #A89999", | ||
"1. c #B09999", | ||
"2. c #B59999", | ||
"3. c #A0A0A0", | ||
"4. c gray65", | ||
"5. c #D79999", | ||
"6. c #F69999", | ||
"7. c #FF9999", | ||
"8. c #D8AD82", | ||
"9. c #F0BB99", | ||
"0. c #F0B6A2", | ||
"q. c #FFBBBB", | ||
"w. c #FFBCB9", | ||
"e. c #F0C090", | ||
"r. c #FFCC99", | ||
"t. c #FFC7A2", | ||
"y. c #FFC7A4", | ||
"u. c #D882D8", | ||
"i. c #FF95D5", | ||
"p. c #FFB3CC", | ||
"a. c #E086E0", | ||
"s. c #FF80E6", | ||
"d. c #FF85EB", | ||
"f. c #FF86EC", | ||
"g. c #FF8AF0", | ||
"h. c #FF8DF3", | ||
"j. c #FF8FF5", | ||
"k. c #F794F7", | ||
"l. c #FF90F6", | ||
"z. c #FF9DF7", | ||
"x. c #FF92F8", | ||
"c. c #FF94FA", | ||
"v. c #FF97FD", | ||
"b. c #FF99FF", | ||
"n. c #FFA6E6", | ||
"m. c #FFA8E0", | ||
"M. c #FFA8E2", | ||
"N. c gray81", | ||
"B. c None", | ||
/* pixels */ | ||
"g g g g g g , y y y y y y y y y y y y 7 B.B.B.B.B.", | ||
"H H H H H w L r.w.p.p.p.p.p.p.p.p.p.y.8.8 B.B.B.B.", | ||
"J J J J J q e.w.b.b.b.b.{ b. .x.b.b.m.r.n B.B.B.B.", | ||
"K K K K K e 0.b. .x.b.b.b.b.u.} x.h.x.m.n B.B.B.B.", | ||
"E E E E E r 0.b.b.b.b.b.b.| M z ] #.x.m.n B.l B.B.", | ||
"R ; ; a W t 0.b.b.b.b. .x.' b ;.B [ b.m.n V :.l B.", | ||
"T 8 -.1 p - 0.b.b.f.b.b.b.' b :.:.b 1 4 V :.:.l B.", | ||
"I * 8 *.4 0.b.b.+.b.b...N F :.:.:.:.:.:.:.:.S B.", | ||
"U P & 8 =.1 0.#.s.b.b.b.o.8 :.3.4.Z :.:.:.N.j :.4 ", | ||
"Y Y Y = o 0.b.b.b.h.x.a.8 <.>.2 V :.D Z 8 k 2.3 ", | ||
"%.%.%.%.$.# [email protected] 5.6.*.F :.V :.b 2.7.6 ", | ||
"&.&.&.&.&.s 9.y.i.b.b.b.k.` A 1.V % 1 X 4 X ,.m B.", | ||
"_ _ _ ) f 1 i Q Q Q Q Q Q Q u V S S S S S S v B.B.", | ||
"/ / / ^ l :.j : O l 4 > B.B.B.. l 1 B.% l % B.B.B.", | ||
"~ ~ ~ d % 1 O ! > 1 < B.B.B.B.B.2 % B.B.1 B.B.B.B." | ||
}; |
Oops, something went wrong.