[StumpWM] Replace explicit calls to terminal by command
In order to make my dotfiles more maintainable in case I change my terminal emulator, explicit calls to the terminal have been replaced by calls to the function `term' which itself will call explicitely the terminal emulator.
This commit is contained in:
		
							parent
							
								
									58d6018199
								
							
						
					
					
						commit
						17835bfe93
					
				| @ -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 | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user