Skip to content

Commit

Permalink
#25 give meaningful names to the captures
Browse files Browse the repository at this point in the history
  • Loading branch information
fstamour committed Dec 15, 2021
1 parent f15b404 commit 9c99dae
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions scripts/demo.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
;; -*- lexical-binding: t -*-

(package-refresh-contents)
(package-install 'selectrum)
Expand All @@ -22,26 +23,18 @@
;; Can use this to pass arguments to the script
;; (print argv)

(defvar hardcopy-counter 0)

(defun screen-hardcopy ()
(interactive)
(shell-command
(format
"screen -X hardcopy -h demo/%s.hardcopy" hardcopy-counter))
(incf hardcopy-counter))

(defun tmux-capture-pane ()
(defun capture (name)
(interactive)
(shell-command
(format
"tmux capture-pane -e -p > %s/%s.capture" *demo-root*
hardcopy-counter))
(incf hardcopy-counter))
name)))

(defun capture ()
(interactive)
(tmux-capture-pane))
(defun call-capture (name)
(let ((name name))
`(:call ,#'(lambda ()
(interactive)
(capture name)))))

(director-run
:version 1
Expand All @@ -68,7 +61,7 @@
(require 'breeze)
;; Start slime
(slime-connect "localhost" 40050))
:steps '((:call capture)
:steps `(,(call-capture "slime-initialized")
(:type "\M-x")
(:type "breeze")
(:type [return])
Expand All @@ -82,10 +75,10 @@
;; Breeze-mode
(:call lisp-mode)
(:call breeze-mode)
(:call capture)
,(call-capture "breeze-example-buffer")
;; Calling quickfix
(:call breeze-quickfix)
(:call capture))
,(call-capture "breeze-quickfix-menu-1"))
:typing-style 'human
:log-target (cons 'file (concat *demo-root* "/demo.log"))
:delay-between-steps 0.5
Expand Down

0 comments on commit 9c99dae

Please sign in to comment.