diff --git a/org/config/stumpwm.org b/org/config/stumpwm.org index e9631cd..ed05d3f 100644 --- a/org/config/stumpwm.org +++ b/org/config/stumpwm.org @@ -218,7 +218,6 @@ And it’s done! We can now move on to the creation of the other CLisp files. :CUSTOM_ID: Commands-1wagy001v5j0 :header-args:lisp: :mkdirp :tangle ~/.stumpwm.d/commands.lisp :END: - The first command I declare in this file is a command that will avoid me invoking too many Firefox instances. Either Firefox is not already running and an instance is launched, or one already is and we are @@ -252,6 +251,16 @@ below the current frame respectively, then focus it. (move-focus :down)) #+end_src +Now, let’s create a command for invoking the terminal, optionally with +a program. +#+begin_src lisp + (defcommand term (&optional program) () + "Invoke a terminal, possibly with a @arg{program}." + (run-shell-command (if program + (format nil "kitty ~A" program) + "kitty"))) +#+end_src + And done! Next! * Colors @@ -840,7 +849,7 @@ The application keymap can now be bound to the root map like so: I will also bind to the top map ~s-RET~ in order to open a new terminal window. The screenshot keymap is also bound to the ScreenPrint key. #+begin_src lisp - (define-key *top-map* (kbd "s-RET") "exec kitty") + (define-key *top-map* (kbd "s-RET") "term") (define-key *top-map* (kbd "Print") '*my-screenshot-keymap*) #+end_src