I am open to pull requests adding instructions for package managers, though.
Configuration
Export these variables in your ~/.zshrc. The values displayed are the default.
# Size of the dashboard
export MAGIC_DASHBOARD_GITLOG_LINES=5
export MAGIC_DASHBOARD_FILES_LINES=6
# Disable dashboard in low terminal windows.
# (Useful for tmux or for terminals embedded in your IDE.)
export MAGIC_DASHBOARD_DISABLED_BELOW_TERM_HEIGHT=15
# Make commit hashes & files clickable. Requires `git-delta`.
export MAGIC_DASHBOARD_USE_HYPERLINKS=0 # set to `1` to enable
Usage
Just press enter on an empty buffer. That's it!
Other Usages
The dashboard call also be called via _magic_dashboard. One use case would be to modify your cd command to display the dashboard after the directory change.
function cd {
builtin cd "$@" && _magic_dashboard
}
The pretty git log is available independently via _gitlog and accepts the same arguments as git log, for example:
# display the last ten log entry
_gitlog -n10
# call via git's core.pager, like git log
_gitlog
alias gl='_gitlog'
# Can also be piped to `fzf`. (Use the _gitlog-specific option `--no-graph` to disable the graph, which messes up a lot of fzf-related things.)
selected_hash=$(_gitlog --no-graph | fzf --ansi --no-sort | cut -d' ' -f1)
About me
In my day job, I am a sociologist studying the social mechanisms underlying the digital economy. For my PhD project, I investigate the governance of the app economy and how software ecosystems manage the tension between innovation and compatibility. If you are interested in this subject, feel free to get in touch.
zsh-magic-dashboard/README.md at main · chrisgrieser/zsh-magic-dashboard
zsh-magic-dashboard
Pressing
enter
on an empty buffer displays an information-rich and pretty dashboard.Terminal: WezTerm – Theme: Tinacious Design – Font: Iosevka Term with partial ligatures – Prompt: Starship
git log
)git status
andgit diff --stat
)eza
)Empty components, such as
git status
in a clean repo, are automatically hidden.Table of Contents
Installation
Requirements
Manual
Clone this repository somewhere on your machine. This manual assumes you are using
~/.zsh/
.Add the following to your
~/.zshrc
:Package Managers
I don't use a package manager, since they are mostly unnecessary and even increasing zsh loading time considerably.
I am open to pull requests adding instructions for package managers, though.
Configuration
Export these variables in your
~/.zshrc
. The values displayed are the default.Usage
Just press
enter
on an empty buffer. That's it!Other Usages
The dashboard call also be called via
_magic_dashboard
. One use case would be to modify yourcd
command to display the dashboard after the directory change.The pretty git log is available independently via
_gitlog
and accepts the same arguments asgit log
, for example:Credits
This plugin is based on Magic Enter by @dufferzafar.
About me
In my day job, I am a sociologist studying the social mechanisms underlying the digital economy. For my PhD project, I investigate the governance of the app economy and how software ecosystems manage the tension between innovation and compatibility. If you are interested in this subject, feel free to get in touch.
Profiles
<img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi1.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' />
URL: zsh-magic-dashboard
Suggested labels