Skip to content

Commit 5d8c050

Browse files
authored
Merge pull request #13 from datsfilipe/datsfilipe-patch-1
docs: update README.md -> add table of contents and install section
2 parents 05b3217 + fab13fd commit 5d8c050

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,74 @@
44

55
Trxsh is a simple and efficient command-line trash manager written in Go. It allows you to safely delete, list, restore, and permanently remove files from your system's trash directory.
66

7+
### Table of Contents
8+
9+
- [Installation](#installation)
10+
- [Features](#features)
11+
- [Usage](#usage)
12+
- [Trash Specification](#trash-specification)
13+
- [License](#license)
14+
15+
### Installation
16+
17+
- Arch:
18+
19+
The package is now in [AUR](https://aur.archlinux.org/packages/trxsh), so to install it you can use an AUR helper like `yay`:
20+
21+
```bash
22+
yay -Syu trxsh
23+
```
24+
25+
or go through the process manually:
26+
27+
```bash
28+
sudo pacman -S --needed git base-devel
29+
git clone https://aur.archlinux.org/trxsh.git
30+
cd yay
31+
makepkg -si
32+
```
33+
34+
- NixOS:
35+
36+
For now you can add a custom derivation to your NixOS config, like so:
37+
38+
```nix
39+
{
40+
stdenv,
41+
lib,
42+
fetchurl,
43+
}: let
44+
source = builtins.fromJSON (builtins.readFile ./conf/source.json);
45+
in
46+
stdenv.mkDerivation rec {
47+
pname = "trxsh";
48+
version = source.version;
49+
50+
src = fetchurl {
51+
url = "https://github.com/datsfilipe/trxsh/releases/download/${version}/trxsh-${version}-linux-amd64.tar.gz";
52+
sha256 = source.sha256;
53+
};
54+
55+
installPhase = ''
56+
mkdir -p $out/bin
57+
tar -xzf $src -C $out/bin
58+
chmod +x $out/bin/trxsh
59+
'';
60+
61+
meta = with lib; {
62+
description = "trxsh is a terminal-based trash manager";
63+
homepage = "https://github.com/datsfilipe/trxsh";
64+
license = licenses.mit;
65+
platforms = ["x86_64-linux"];
66+
};
67+
68+
unpackPhase = ":";
69+
dontStrip = true;
70+
}
71+
```
72+
73+
In future I'll try adding it to `nixpkgs`.
74+
775
### Features
876

977
- deletion: move files to a designated trash directory instead of permanently deleting them.​

0 commit comments

Comments
 (0)