Skip to content

Commit

Permalink
Bind new open-terminal command to C-t c
Browse files Browse the repository at this point in the history
This isn't a permanent solution, as the user can't specify which
terminal program they want to use.
  • Loading branch information
sdilts committed Oct 27, 2023
1 parent 39eb5ba commit 2ce6cca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lisp/globals.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@


(defun handle-server-stop (sequence seat)
(declare (ignore sequence seat))
(server-stop *compositor-state*))

(defun open-terminal (sequence seat)
(declare (ignore sequence seat))
(sys:open-terminal))

(setf (mahogany-state-keybindings *compositor-state*)
(list (define-kmap
(kbd "C-t") (define-kmap
(kbd "q") #'handle-server-stop))))
(kbd "q") #'handle-server-stop
(kbd "c") #'open-terminal))))
3 changes: 2 additions & 1 deletion mahogany.asd
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
:pathname #p"lisp/"
:components ((:file "log")
(:file "util")
(:file "system")
(:module bindings
:serial t
:components ((:file "package")
Expand All @@ -40,7 +41,7 @@
(:file "view" :depends-on ("tree-interface"))))
(:file "state" :depends-on ("package"))
(:file "input" :depends-on ("state" "keyboard"))
(:file "globals" :depends-on ("state"))
(:file "globals" :depends-on ("state" "system"))
(:file "main" :depends-on ("bindings" "keyboard" "input" "package"))))

(asdf:defsystem #:mahogany/executable
Expand Down

0 comments on commit 2ce6cca

Please sign in to comment.