diff --git a/configuration.org b/configuration.org index 7d6636e..6ca5799 100644 --- a/configuration.org +++ b/configuration.org @@ -46,6 +46,9 @@ I set it up early so I can use it in ~use-package~ calls immediately. (add-to-list 'load-path (expand-file-name (convert-standard-filename "lisp/") user-emacs-directory)) +(add-to-list 'load-path (expand-file-name + (convert-standard-filename "lisp/nyan-prompt") + user-emacs-directory)) #+END_SRC ** Load ~xdg-paths~ @@ -1265,7 +1268,7 @@ The cookies are from the Hungarian version an ancient MS-DOS based program calle #+BEGIN_SRC emacs-lisp (when (display-graphic-p) (use-package nyan-prompt - :disabled t + :ensure nil :config (add-hook 'eshell-load-hook 'nyan-prompt-enable))) #+END_SRC diff --git a/lisp/nyan-prompt/README.md b/lisp/nyan-prompt/README.md new file mode 100644 index 0000000..0d690b1 --- /dev/null +++ b/lisp/nyan-prompt/README.md @@ -0,0 +1,20 @@ +# Installing +Add the following hook to your emacs conf: + +```elisp +(add-hook 'eshell-load-hook 'nyan-prompt-enable) +``` + +# Why +James J Porter showed me nyan-mode. I love nyan cat but hate scroll bars. I wanted to bring nyan-cat to my emacs so I found a middle way. + +# How could you enhance the awesomeness. +* Make nyan-cat move! +* Make it a multline prompt with the rainbow taking up the folder space +* Unite with nyan-mode and see where else can we stick nyan cat in? + +# License +Copying is an act of Love, please copy. + +# Author +Javier Olaechea (), 2013. diff --git a/lisp/nyan-prompt/img/nyan.xpm b/lisp/nyan-prompt/img/nyan.xpm new file mode 100644 index 0000000..a01442d --- /dev/null +++ b/lisp/nyan-prompt/img/nyan.xpm @@ -0,0 +1,167 @@ +/* XPM */ +static char * nyan_xpm[] = { +"25 15 149 2", +" c None", +". c #522244", +"+ c #3F1E31", +"@ c #403326", +"# c #2C2F32", +"$ c #002D5B", +"% c #003366", +"& c #BF1119", +"* c #7C0B10", +"= c #947256", +"- c #FFCC99", +"; c #FFBBBB", +"> c #FFB3CC", +", c #FFC7A2", +"' c #D8AD82", +") c #3A3C3E", +"! c #F52A02", +"~ c #490C00", +"{ c #F0C090", +"] c #FFBCB9", +"^ c #FF9DF7", +"/ c #FF99FF", +"( c #FF5FC5", +"_ c #FF6BD1", +": c #FF8DF3", +"< c #FFA6E6", +"[ c #745D46", +"} c #002850", +"| c #FC7800", +"1 c #4C2400", +"2 c #F0B6A2", +"3 c #FF66CC", +"4 c #FF92F8", +"5 c #D882D8", +"6 c #C576C5", +"7 c #FF8AF0", +"8 c #FF94FA", +"9 c #FFA8E0", +"0 c #02284E", +"a c #FBA500", +"b c #4C3100", +"c c #D17DD1", +"d c #614C61", +"e c #514C51", +"f c #AA66AA", +"g c #FF79DF", +"h c #FF90F6", +"i c #001428", +"j c #494949", +"k c #1F265A", +"l c #F0D300", +"m c #483F00", +"n c #FF68CE", +"o c #A261A2", +"p c #5D5D5D", +"q c #969696", +"r c #AE68AE", +"s c #999999", +"t c #00264C", +"u c #6F7509", +"v c #262626", +"w c #1D1F00", +"x c #868F00", +"y c #292B00", +"z c #FF86EC", +"A c #575757", +"B c #2B2525", +"C c #646464", +"D c #131313", +"E c #727272", +"F c #4F4F4F", +"G c #2A2A2A", +"H c #000000", +"I c #FF72D8", +"J c #F069C9", +"K c #6D4C6D", +"L c #7B7B7B", +"M c #122539", +"N c #20980E", +"O c #236119", +"P c #242424", +"Q c #FF80E6", +"R c #E073CD", +"S c #383838", +"T c #A0A0A0", +"U c #A6A6A6", +"V c #686868", +"W c #CFCFCF", +"X c #464646", +"Y c #20D15C", +"Z c #1AAF4D", +"` c #083417", +" . c #020F06", +".. c #FF8FF5", +"+. c #E086E0", +"@. c #A89999", +"#. c #A68F8F", +"$. c #20262C", +"%. c #666666", +"&. c #4C4646", +"*. c #B09999", +"=. c #0EA7CB", +"-. c #04323D", +";. c #F0BB99", +">. c #FF77DD", +",. c #FF85EB", +"'. c #D79999", +"). c #F69999", +"!. c #7F7F7F", +"~. c #5F5F5F", +"{. c #B59999", +"]. c #FF9999", +"^. c #3E2525", +"/. c #1E80F7", +"(. c #1354A2", +"_. c #020912", +":. c #FF95D5", +"<. c #FF97FD", +"[. c #F794F7", +"}. c #885788", +"|. c #7B6C6C", +"1. c #161616", +"2. c #232323", +"3. c #0C0C0C", +"4. c #070B0F", +"5. c #0F2643", +"6. c #5247F7", +"7. c #39329C", +"8. c #251E17", +"9. c #BF9973", +"0. c #4B3C2D", +"a. c #616161", +"b. c #737373", +"c. c #54575A", +"d. c #001D3A", +"e. c #5536D9", +"f. c #222126", +"g. c #241856", +"h. c #191919", +"i. c #001932", +"j. c #000A14", +"k. c #414141", +"l. c #333333", +"m. c #000E1D", +"n. c #002040", +"o. c #263498", +"p. c #08090C", +"q. c #23308F", +"r. c #002B56", +". . . . . . + @ @ @ @ @ @ @ @ @ @ @ @ # $ % % % % ", +"& & & & & * = - ; > > > > > > > > > , ' ) $ % % % ", +"! ! ! ! ! ~ { ] ^ / / / ( / _ : / / < - [ } % % % ", +"| | | | | 1 2 / 3 4 / / / / 5 6 ^ 7 8 9 [ } 0 $ % ", +"a a a a a b 2 / / / / / / c d e f g h 9 [ i j k $ ", +"l l l l l m 2 / / / / n h o p q p r ^ 9 [ p s j t ", +"u v v w x y 2 / / z / / / o p s s A B B C s s j t ", +"D E s F G H 2 / / I / / J K L s s s s s s s s E M ", +"N O v v j P 2 g Q / / / R S s T U V s s s W X s v ", +"Y Y Y Z ` .2 / / / ..h +.S @.#.$.V s L %.) &.*.B ", +"=.=.=.=.=.-.;.9 >.8 ,.z +.S '.).= !.q C s ~.{.].^.", +"/./././.(._.{ , :.<./ / [.}.|.*.C 1.2.3.$.4.s |.5.", +"6.6.6.7.v v 8.9.9.9.9.9.9.9.0.a.E E b.b.b.b.c.d.% ", +"e.e.e.f.s C g.h.F 4.i.i.i.i.j.k.l.m._.F v i n.% % ", +"o.o.o.p.v k q.k v _.% % % % r.$.h.d.0 v D } % % % "}; diff --git a/lisp/nyan-prompt/nyan-prompt.el b/lisp/nyan-prompt/nyan-prompt.el new file mode 100644 index 0000000..f025cea --- /dev/null +++ b/lisp/nyan-prompt/nyan-prompt.el @@ -0,0 +1,52 @@ +;;; nyan-prompt.el --- Nyan Cat on the eshell prompt. + +;; Author: Javier "PuercoPop" Olaechea +;; URL: http://github.com/PuercoPop/nyan-prompt +;; Version: 0.2.0 +;; Keywords: nyan, cat, lulz, eshell, rainbow +;; Dependencies ((rx 0)) + +;;; Commentary: + +;; Usage: (add-hook 'eshell-load-hook 'nyan-prompt-enable) + +;; Inspired by from Jacek "TeMPOraL" Zlydach nyan-mode, to make Porter happy. + + +;; Copying is an act of love, please copy. ♡ +;; The xpm taken awesome nyan-mode + +;;; Code: + +(require 'rx) + +(defconst nyan-prompt-dir (file-name-directory + (or load-file-name buffer-file-name))) + +(defconst nyan-prompt-nyan-cat-image + (create-image (concat nyan-prompt-dir "img/nyan.xpm") + 'xpm nil :ascent 'center)) + +(defconst nyan-prompt-nyan-cat-emoticon "~=[,,_,,]:3" + "ASCII art representing the nyan-cat.") + +(defconst nyan-prompt-nyan-cat-string + (propertize nyan-prompt-nyan-cat-emoticon + 'display nyan-prompt-nyan-cat-image)) + +(defvar nyan-prompt-original-prompt 'eshell-prompt-function + "The eshell prompt function before enabling nyan-prompt") + +(defun eshell-nyan-prompt () + (concat nyan-prompt-nyan-cat-string " " (funcall nyan-prompt-original-prompt))) + +(defun nyan-prompt-disable () + (setq eshell-prompt-function 'nyan-prompt-original-prompt)) + +;;;###autoload +(defun nyan-prompt-enable () + (setq eshell-prompt-function 'eshell-nyan-prompt)) + + +(provide 'nyan-prompt) +;;; nyan-prompt.el ends here