I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.5 KiB

4 years ago
4 years ago
4 years ago
  1. #+TITLE: Capture
  2. #+AUTHOR: Christopher James Hayward
  3. #+EMAIL: chris@chrishayward.xyz
  4. #+PROPERTY: header-args:emacs-lisp :tangle capture.el :comments org
  5. #+PROPERTY: header-args :results silent :eval no-export
  6. #+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil
  7. #+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
  8. Capturing images, screencasts, screenshots or live-streaming. It's defined in this file.
  9. * Slides
  10. Produce high quality presentations that work anywhere with =HTML/JS= and the *Reveal.js*[fn:1] package. Achieve this behaviour in Emacs with *Ox-reveal*[fn:2]], configured to use a =cdn= allows us to produce ones that are not dependent on a local version. An important caveat here is that paths to images must be absolute URLs.
  11. #+begin_src emacs-lisp
  12. (use-package ox-reveal
  13. :after ox
  14. :custom (org-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js"))
  15. #+end_src
  16. Create a capture template for creating slides quickly, with our desired configuration.
  17. #+begin_src emacs-lisp
  18. (with-eval-after-load 'org-roam
  19. (add-to-list 'org-roam-capture-templates
  20. '("s" "Slides" plain (function org-roam-capture--get-point)
  21. "%?"
  22. :file-name "docs/slides/${slug}"
  23. :unnarrowed t
  24. :head
  25. "
  26. ,#+TITLE: ${title}
  27. ,#+AUTHOR: Christopher James Hayward
  28. ,#+EMAIL: chris@chrishayward.xyz
  29. ,#+REVEAL_ROOT: https://cdn.jsdelivr.net/npm/reveal.js
  30. ,#+REVEAL_THEME: serif
  31. ,#+EXPORT_FILE_NAME: ${slug}
  32. ,#+OPTIONS: reveal_title_slide:nil
  33. ,#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil
  34. ,#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
  35. ")))
  36. #+end_src
  37. * Screencasts
  38. Create screencasts with =one-frame-per-action= GIF recording via *Emacs gif screencast*[fn:3].
  39. + Pause / Resume
  40. + High Quality
  41. + Optimized
  42. It requires the installation of ~scrot~, ~gifsicle~, and ~convert~ from the =ImageMagick= library.
  43. #+begin_src emacs-lisp
  44. (use-package gif-screencast
  45. :commands (gif-screencast-start-or-stop gif-screencast-toggle-pause)
  46. :custom (gif-screencast-output-directory (concat dotfiles/home "docs/images/")))
  47. #+end_src
  48. Place keybindings behind =SPC s=.
  49. + Screenshot with =s=
  50. + Screencast with =c=
  51. #+begin_src emacs-lisp
  52. (dotfiles/leader
  53. "s" '(:ignore t :which-key "Screen")
  54. "ss" '(:ignore t :which-key "TODO Screenshot")
  55. "sc" '(gif-screencast-start-or-stop :which-key "Screencast"))
  56. #+end_src
  57. * Resources
  58. [fn:1] https://revealjs.com
  59. [fn:2] https://github.com/hexmode/ox-reveal
  60. [fn:3] https://github.com/takaxp/emacs-gif-screencast