/emacs-gnome-screencast

Use Gnome shell’s screen recorder from within Emacs

Primary LanguageEmacs Lisp

Use Gnome shell’s screen recorder from within Emacs

Installation

I recommend to use Cask. Add this to your Cask file:

(depends-on "gnome-screencast" :git "https://github.com/juergenhoetzel/emacs-gnome-screencast.git")

Usage

Start a screencast of the whole screen:

(gnome-screencast "Output.webm")

Same, but specify a sub-area:

(gnome-screencast-area "Output.webm" 100 200 1200 600)

Stop the recording:

(gnome-screencast-stop)

Example Use case

I use Projectile for interacting with my projects. Use this projectile hook to automatically create a screencast file corresponding to the project name, when switching projects:

(defun gnome-screencast-toggle-recording ()
  (when-let (project-name (file-name-base (directory-file-name (projectile-project-root))))
    (gnome-screencast-stop)
    (gnome-screencast (concat project-name ".webm"))))
(add-hook 'projectile-after-switch-project-hook #'gnome-screencast-toggle-recording)