||4 months ago|
|.github/workflows||6 months ago|
|bin||6 months ago|
|img||11 months ago|
|.gitignore||2 years ago|
|CONTRIBUTING.org||2 years ago|
|Cask||6 months ago|
|LICENSE||1 year ago|
|Makefile||6 months ago|
|README.org||4 months ago|
|eshell-info-banner.el||4 months ago|
- Table of Contents
- Recent Breaking Changes
- My computer doesn’t have a battery, will this still work?
- Advice for Windows users
" title="file:" /> " title="file:" /> " title="file:" />
eshell-info-banner.el is a utility for creating an informative banner,
fish_greeting but for Eshell. But an image is worth a thousand
words, let’s see how it looks like:
This will be displayed every time you open a new Eshell instance, or
if you invoke
eshell-info-banner from it.
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!
Table of Contents TOC_2_gh
Recent Breaking Changes
0.8.1 removes the optional argument
eshell-info-banner--executable-find. It now only acts according to the
user’s preference set with
0.7.0 renames several functions to conform with the Elisp
|Old Name||New Name|
The following function was removed:
The following alias (replacing an old function) was removed:
A couple of options are available for installing
eshell-info-banner.el. The first one is to clone the repository in
load-path and add the following to your
.emacs or your
(require 'eshell-info-banner) (add-hook 'eshell-banner-load-hook 'eshell-info-banner-update-banner)
If you use
use-package only and install the package from MELPA, you
can then install it like so:
(use-package eshell-info-banner :ensure t :defer t :hook (eshell-banner-load . eshell-info-banner-update-banner))
In my case, I prefer using
(use-package eshell-info-banner :ensure t :defer t :straight (:build t) :hook (eshell-banner-load . eshell-info-banner-update-banner))
You can just use
:straight t if you do not want to ensure the package
gets compiled by Emacs.
There is probably a similar way to install it with pure
quelpa, but I’m not knowledgable enough for that, feel free to create
a PR to add some more installation instructions!
A couple of variables can be edited by the user in order to configure
- Filter for which
mountpoints are to be shown to the user. By default, only partitions
mounted on a filesystem (as displayed by the command
df -Hl) prefixed by
/devare shown, but you can modify it by adding other prefixes to this list. For instance, to detect ZFS roots, you can set its value to
("/dev" "zroot"). Default value:
- Try to filter
out duplicate partitions. Two partitions are considered duplicate if
they have the same size and amount of space used.
- List of pattens to exclude
from the partition list.
- 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
1000should be more than enough). Default value:
- 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-widthis too small. Default value:
- Character to fill the
progress bar with.
- Percentage from which the
level should be displayed as a warning.
- Percentage from which the
level should be displayed as critical.
- When using Eshell through TRAMP,
you can decide whether
eshell-info-bannerwill display information about the remote system you are connected to or only display information about your local system. To achieve this, set
tto display information on the remote system or to
nilto keep local information only. Default value:
- Whether or not to use duf.
dufis a better replacement for
dfand should be more platform-agnostic than the latter. I also suspect this implementation will be faster than the one with
df, since there is very few string manipulation with
dufcompared to the implementations with
df. Default value:
dufis found on the system,
- Path to your
dufis not found by default by Emacs, you can override
tand specify the path to
dufwith this custom variable. Default value:
This variable reflects the possible values passed to the function
file-size-human-readable. It can hold one of these three values:
Since the value
iecgenerates longer file size prefixes, progress bars become slightly shorter. For more details on this option, see the documentation of
Don’t like the colors used by the package? They should follow by default your theme, but you can customize the following faces:
- Used for filling the empty part of progress bars
- Used for filling the progress bar when on normal levels
- Used for filling the progress bar when on warning levels
- Used for filling the progress bar when on critical levels
My computer doesn’t have a battery, will this still work?
As you can see, one line shows you your battery level. Il will start to warn you in a reverse way compared to the other progress bars, as it should for battery levels –a fully charged battery at 100% is not at a critical level, but at 0% it would be.
However, you might be on a desktop or any kind of computer that does not have a battery, so… what do? Don’t worry, Emacs will automatically detect whether you have a battery or not and will only display this line if you have one. If you don’t have a battery, the only difference is you will have one less line than laptop users.
Advice for Windows users
eshell-info-banner can only look for your partitions with
duf. If you want a list of your partitions, I strongly encourage you
to install it on your system. See muesli/duf.
eshell-info-banner.el is available under the GNU GPL-3.0 license. You
can find the full text in the LICENSE file.