Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andyleejordan/fortune-cookie
Print a fortune in your Emacs scratch buffer
https://github.com/andyleejordan/fortune-cookie
Last synced: 20 days ago
JSON representation
Print a fortune in your Emacs scratch buffer
- Host: GitHub
- URL: https://github.com/andyleejordan/fortune-cookie
- Owner: andyleejordan
- License: gpl-3.0
- Created: 2015-11-11T06:13:42.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-23T08:43:25.000Z (almost 6 years ago)
- Last Synced: 2024-05-28T20:50:33.190Z (5 months ago)
- Language: Emacs Lisp
- Size: 17.6 KB
- Stars: 12
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# Fortune Cookie
This package prints a fortune in your scratch buffer, just like you
may have in your shell. If cowsay is installed, it can use that too.## Usage
The minor mode will set `initial-scratch-message` with a fortune.
```elisp
(fortune-cookie-mode)
```> If you don't use `package.el` you'll need to manually add the
> package to your load path and require it.See the Emacs customize group `fortune-cookie` for the available
variables and their documentation (including command paths and flags).The `fortune-cookie` interactive function can be called directly to
get a new fortune as a string.### Example
I use the following setup in my [.emacs.d][], which utilizes John
Wiegley's [use-package][]. It sets the `cowfile` to our favorite
mascot, Tux.[.emacs.d]: https://github.com/andschwa/.emacs.d
[use-package]: https://github.com/jwiegley/use-package```elisp
;; inhibit startup message
(setq inhibit-startup-message t)(use-package fortune-cookie
:config
(setq fortune-cookie-cowsay-args "-f tux -s")
(fortune-cookie-mode))
```Which placed this in my `*scratch*` buffer:
```elisp
;; ___________________________________
;; / Pohl's law: \
;; | |
;; | Nothing is so good that somebody, |
;; \ somewhere, will not hate it. /
;; -----------------------------------
;; \
;; \
;; .--.
;; |o_o |
;; |:_/ |
;; // \ \
;; (| | )
;; /'\_ _/`\
;; \___)=(___/
```