Skip to content

Commit

Permalink
feat(docs): add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gekoke committed May 15, 2024
1 parent b09919a commit d62c830
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# magit-file-icons.el

Display file icons in Magit!

# Preview
![Magit status buffer with file icons](./screenshots/status.png)

![Magit revision diffstat with file icons](./screenshots/diffstat.png)

# Installation

This package is not yet in any package archives. To install, you need to fetch the source.

For example, with [straight.el](https://github.com/radian-software/straight.el):

```elisp
(use-package magit-file-icons
:straight (:host github :repo "gekoke/magit-file-icons")
:custom
;; These are the default values:
(magit-file-icons-enable-diff-file-section-icons t)
(magit-file-icons-enable-untracked-icons t)
(magit-file-icons-enable-diffstat-icons t)
:config
(magit-file-icons-mode 1))
```

## Nix

Alternatively, you can use Nix. This repository is a flake and outputs the following packages:

```
└───packages
├───aarch64-darwin
│ ├───default: package 'emacs-magit-file-icons-v0.0.1'
│ └───magit-file-icons: package 'emacs-magit-file-icons-v0.0.1'
├───aarch64-linux
│ ├───default: package 'emacs-magit-file-icons-v0.0.1'
│ └───magit-file-icons: package 'emacs-magit-file-icons-v0.0.1'
├───x86_64-darwin
│ ├───default: package 'emacs-magit-file-icons-v0.0.1'
│ └───magit-file-icons: package 'emacs-magit-file-icons-v0.0.1'
└───x86_64-linux
├───default: package 'emacs-magit-file-icons-v0.0.1'
└───magit-file-icons: package 'emacs-magit-file-icons-v0.0.1'
```

A minimal flake for creating an Emacs with the `magit-file-icons` package could look like this:

```nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
magit-file-icons.url = "github:gekoke/magit-file-icons";
magit-file-icons.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
inputs:
let
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
in
{
packages."x86_64-linux".default = pkgs.emacsWithPackages (p: [
inputs.magit-file-icons.packages."x86_64-linux".default
]);
};
}
```

Binary file added screenshots/diffstat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d62c830

Please sign in to comment.