Add README
This commit is contained in:
		
							parent
							
								
									872bee6a9f
								
							
						
					
					
						commit
						d780c3ffde
					
				
							
								
								
									
										67
									
								
								README.org
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								README.org
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,67 @@
 | 
				
			|||||||
 | 
					#+title: eshell-info-banner.el
 | 
				
			||||||
 | 
					#+author: Lucien Cartier-Tilet
 | 
				
			||||||
 | 
					#+email: lucien@phundrak.com
 | 
				
			||||||
 | 
					* eshell-info-banner.el
 | 
				
			||||||
 | 
					** Introduction
 | 
				
			||||||
 | 
					~eshell-info-banner.el~ is a utility for creating an informative banner,
 | 
				
			||||||
 | 
					akin to ~fish_greeting~ but for Eshell. But an image is worth a thousand
 | 
				
			||||||
 | 
					words, let’s see how it looks like:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#+caption: Screenshot of the default Eshell information banner
 | 
				
			||||||
 | 
					[[file:img/screenshot.png]]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This package is geared towards Linux in particular, I am pretty sure
 | 
				
			||||||
 | 
					it will not work on Windows, and there will probably be bugs on
 | 
				
			||||||
 | 
					macOS. PR are welcome if you want to fix that!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					** Installation 
 | 
				
			||||||
 | 
					A couple of options are available for installing
 | 
				
			||||||
 | 
					~eshell-info-banner.el~. The first one is to clone the repository in
 | 
				
			||||||
 | 
					your ~load-path~ and add the following to your ~.emacs~ or your ~init.el~:
 | 
				
			||||||
 | 
					#+begin_src emacs-lisp
 | 
				
			||||||
 | 
					  (require 'eshell-info-banner)
 | 
				
			||||||
 | 
					  (add-hook 'eshell-banner-load-hook 'eshell-info-banner-update-banner)
 | 
				
			||||||
 | 
					#+end_src
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					In my case, I prefer using ~use-package~ with ~straight~:
 | 
				
			||||||
 | 
					#+begin_src emacs-lisp
 | 
				
			||||||
 | 
					(use-package eshell-info-banner
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight (eshell-info-banner :type git
 | 
				
			||||||
 | 
					                                :host github
 | 
				
			||||||
 | 
					                                :repo "phundrak/eshell-info-banner.el")
 | 
				
			||||||
 | 
					  :hook (eshell-banner-load . eshell-info-banner-update-banner))
 | 
				
			||||||
 | 
					#+end_src
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					I personally also added ~:build t~ in the straight recipe to ensure
 | 
				
			||||||
 | 
					Emacs compiles my package, both to ~.elc~ and ~.eln~ files (I am on Emacs
 | 
				
			||||||
 | 
					28.0, ~feature/native-comp~ got merged into ~master~!)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					There is probably a similar way to install it with pure ~straight.el~ or
 | 
				
			||||||
 | 
					~quelpa~, but I’m not knowledgable enough for that, feel free to create
 | 
				
			||||||
 | 
					a PR to add some more installation instructions!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					There is currently no plans of making this package available on MELPA
 | 
				
			||||||
 | 
					or non-gnu elpa.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					** Customizing
 | 
				
			||||||
 | 
					A couple of variables can be edited by the user in order to configure
 | 
				
			||||||
 | 
					~eshell-info-banner.el~:
 | 
				
			||||||
 | 
					- ~eshell-info-banner-shorten-path-from~ :: Maximum length of the mount
 | 
				
			||||||
 | 
					  path of a partition before it gets abbreviated. Set it to ridiculous
 | 
				
			||||||
 | 
					  numbers in order to disable it (something like ~1000~ should be more
 | 
				
			||||||
 | 
					  than enough). Default value: ~7~
 | 
				
			||||||
 | 
					- ~eshell-info-banner-width~ :: *Minimum* width of the banner. Be aware
 | 
				
			||||||
 | 
					  the banner will automatically select the minimal width required to
 | 
				
			||||||
 | 
					  display everything it wants to display if ~eshell-info-banner-width~
 | 
				
			||||||
 | 
					  is too small. Default value: ~80~
 | 
				
			||||||
 | 
					- ~eshell-info-banner-progress-bar-char~ :: Character to fill the
 | 
				
			||||||
 | 
					  progress bar with. Default value: ~=~
 | 
				
			||||||
 | 
					- ~eshell-info-banner-warning-percentage~ :: Percentage from which the
 | 
				
			||||||
 | 
					  level should be displayed as a warning. Default value: ~75~
 | 
				
			||||||
 | 
					- ~eshell-info-banner-critical-percentage~ :: Percentage from which the
 | 
				
			||||||
 | 
					  level should be displayed as critical. Default value ~90~
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					** License
 | 
				
			||||||
 | 
					~eshell-info-banner.el~ is available under the GNU GPL-3.0 license. You
 | 
				
			||||||
 | 
					can find the full text in [[file:LICENSE.md][LICENSE.md]].
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								img/screenshot.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								img/screenshot.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 36 KiB  | 
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user