├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── blimpy.yml │ ├── config.yml │ └── limpy b.yml ├── README.org └── blimpy.el /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | +github: progfolio 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/blimpy.yml: -------------------------------------------------------------------------------- 1 | name: blimpy 2 | description: blimpy 3 | title: "[blimpy]: " 4 | labels: ["blimpy"] 5 | body: 6 | - type: textarea 7 | attributes: 8 | label: blimpy 9 | value: "blimpy blimpy blimpy." 10 | 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/limpy b.yml: -------------------------------------------------------------------------------- 1 | name: limpy b 2 | description: limpy b 3 | title: "[limpy b]: " 4 | labels: ["limpy b"] 5 | body: 6 | - type: textarea 7 | attributes: 8 | label: limpy b 9 | value: "limpy b" 10 | -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | #+title: BLIMPY: Type the word 'BLIMPY' in Emacs 2 | * Installation 3 | #+begin_src emacs-lisp :lexical t 4 | (use-package blimpy 5 | :elpaca (blimpy :host github :repo "progfolio/blimpy")) 6 | #+end_src 7 | 8 | * Usage 9 | [[https://assets3.thrillist.com/v1/image/3092197/1584x1056/crop;webp=auto;jpeg_quality=60;progressive.jpg]] 10 | 11 | * One size fits all configuration: 12 | #+begin_src emacs-lisp :lexical t 13 | (use-package blimpy 14 | :elpaca (blimpy :host github :repo "progfolio/blimpy") 15 | :after (evil) 16 | :config 17 | (add-hook 'blimpy-before-typing-the-word-blimpy-in-emacs-hook 18 | (apply-partially #'evil-insert 1))) 19 | #+end_src 20 | -------------------------------------------------------------------------------- /blimpy.el: -------------------------------------------------------------------------------- 1 | ;;; blimpy.el --- Type the word "blimpy" in Emacs. ;; -*- lexical-binding: t; -*- 2 | 3 | ;;; Commentary: 4 | ;; 5 | 6 | ;;; Code: 7 | (defcustom blimpy-before-typing-the-word-blimpy-in-emacs-hook nil 8 | "Hook run before typing the word blimpy in Emacs. 9 | Run prior to the `blimpy-type-the-word-blimpy-in-emacs' command." 10 | :type 'hook 11 | :group 'blimpy) 12 | 13 | (defun blimpy--for-each-char (chars callback) 14 | "Evaluate CALLBACK for each char in CHARS." 15 | (when-let ((chars) 16 | (delay 20) 17 | (randomized (- (random 50) 25)) 18 | (seconds (/ (+ delay randomized) 1000.0))) 19 | (funcall callback (car chars)) 20 | (run-with-timer seconds nil 'blimpy--for-each-char (cdr chars) callback))) 21 | 22 | (defconst blimpy--chars (listify-key-sequence "blimpy ")) 23 | (defvar blimpy--char-index -1) 24 | 25 | ;;;###autoload 26 | (defun blimpy-type-the-word-blimpy-in-emacs (&optional force) 27 | "Type the word blimpy in Emacs. If FORCE is non-nil, insert with prompting." 28 | (interactive "P") 29 | (when (or (equal force '(16)) 30 | (yes-or-no-p "Typing the word blimpy in Emacs may alter the current file. Are you sure you want to type the word blimpy in Emacs?")) 31 | (run-hooks 'blimpy-before-typing-the-word-blimpy-in-emacs-hook) 32 | (blimpy--for-each-char blimpy--chars #'insert-char))) 33 | 34 | (defun blimpy-self-insert (&rest _) 35 | "Insert the next character in the word blimpy." 36 | (list 1 (nth (mod (cl-incf blimpy--char-index) (length blimpy--chars)) blimpy--chars))) 37 | 38 | (defun blimpy () 39 | "Make it so you can only say `blimpy'." 40 | (interactive) 41 | (with-current-buffer (get-buffer-create "*blimpy*") 42 | (pop-to-buffer (current-buffer)) 43 | (animate-string "YOU CAN ONLY SAY BLIMPY NOW" 20))) 44 | 45 | ;;;###autoload 46 | (define-minor-mode blimpy-mode 47 | "Minor mode to type blimpy in Emacs." 48 | :lighter "blimpy " 49 | :global t 50 | :group 'convenience 51 | (if blimpy-mode 52 | (progn 53 | (setq blimpy--char-index -1) 54 | (advice-add 'self-insert-command :filter-args #'blimpy-self-insert)) 55 | (advice-remove 'self-insert-command #'blimpy-self-insert))) 56 | 57 | (provide 'blimpy) 58 | 59 | ;;; blimpy.el ends here 60 | --------------------------------------------------------------------------------