Skip to content
Use Gnome shell’s screen recorder from within Emacs
Emacs Lisp
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.org
gnome-screencast.el

README.org

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)
You can’t perform that action at this time.