An open API service indexing awesome lists of open source software.

https://github.com/devmor-j/private.fish

A lightweight Fish shell extension to indicate private mode sessions in your prompt with a ghost icon πŸ‘»
https://github.com/devmor-j/private.fish

fish fish-plugin

Last synced: 18 days ago
JSON representation

A lightweight Fish shell extension to indicate private mode sessions in your prompt with a ghost icon πŸ‘»

Awesome Lists containing this project

README

          

# πŸ•΅οΈβ€β™‚οΈ private.fish

A lightweight Fish shell extension to indicate **private mode** sessions in your prompt with a ghost icon πŸ‘». Each terminal session is tracked independently, and the icon can show a per-terminal activity count.

## πŸš€ Features

- **Private mode indicator**: Shows a ghost icon `πŸ‘»` in the prompt for private Fish sessions.
- **Per-terminal session tracking**: Counts actions/outputs **per terminal**, independent of other terminals.
- **Customizable behavior** via universal variables: control symbol and count display.
- **Automatic prompt wrapping**: Works with any Fish prompt without modifying it manually.

---

## βš™οΈ Installation

Install using [fisher](https://github.com/jorgebucaran/fisher):

```bash
fisher install devmor-j/private.fish
```

> Fish will automatically detect private mode and display the ghost icon in your prompt.

---

## πŸ“ Configuration / Defaults

| Variable | Default | Description |
| -------------------- | ------- | -------------------------------------------- |
| `private_symbol` | `πŸ‘»` | The icon used for private sessions. |
| `private_show_count` | `true` | Show a numeric count next to the ghost icon. |

You can override defaults by setting these variables in your Fish config (`config.fish`) before loading `private.fish`. Example:

```fish
set -U private_symbol "πŸ”’"
set -U private_show_count false
set -U root_symbol "πŸ”₯"
```

If you need more space between emojies, add them on the variable itself.

### πŸ”’ Emojis

Here are some emojis you can use for private mode:

- πŸ‘» **Ghost (default)**
- πŸ”’ Lock
- πŸ”‘ Key
- 🐑 Pufferfish
- 🦈 Shark
- πŸ™ Octopus

And some _root_ related emojies when in root mode:

- πŸ”₯ **Fire (default)**
- ☠️ Skull
- πŸ›‘οΈ Shield
- ⚑️ Lightning
- πŸ’₯ Explosion
- πŸ‘‘ Crown

---

## πŸ’‘ Usage

1. Open a Fish terminal in private mode:

```bash
fish -P
# or fish --private
```

2. You’ll see the ghost icon `πŸ‘»` in your prompt.
3. If you have multiple commands recorded in the session and `private_show_count=true`, the icon will show the count, e.g., `πŸ‘»3`.
4. Each terminal is independent, so counts don’t interfere with each other.

Note: Will show "πŸ”₯" icon (fire is default) when _root_ user is active. So you'd be more careful since you have full access.

## πŸ“ License

MIT License. Free to use and modify.

This plugin was developed with AI assistance; Expect bugs and compatibility issues until they are fixed.