Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/franciscolourenco/done

A fish-shell package to automatically receive notifications when long processes finish.
https://github.com/franciscolourenco/done

fish fish-packages fish-shell fisher hacktoberfest hacktoberfest-accepted notifications processes-finish shell trigger-notifications

Last synced: about 1 month ago
JSON representation

A fish-shell package to automatically receive notifications when long processes finish.

Awesome Lists containing this project

README

        


done


A fish shell package to automatically receive notifications when long processes finish.


Stability: Stable
Release version
fish >=2.3.0
License: MIT



Just go on with your normal life. You will get a notification when a process takes more than 5 seconds finish, and the terminal window not in the foreground.

After installing you could type, for instance `sleep 6`, and start using other app. After 6 seconds you should get a notification.

## Installation

#### Using [Fisher](https://github.com/jorgebucaran/fisher)

```fish
fisher install franciscolourenco/done
```

#### Manually

```fish
curl -Lo ~/.config/fish/conf.d/done.fish --create-dirs https://raw.githubusercontent.com/franciscolourenco/done/master/conf.d/done.fish
```

#### Arch Linux

Install the `fish-done` package from AUR.

```fish
yay -S fish-done
```

## Dependencies

- If you want notifications with icons on macOS, please install `terminal-notifier` with

```fish
brew install terminal-notifier
```

- If you are using https://swaywm.org please install [jq](https://jqlang.github.io/jq).

- If you are using Windows Subsystem for Linux (WSL) you may need to install [wslu](https://github.com/wslutilities/wslu), but usually it is pre-installed.

## Updating

```fish
fisher update franciscolourenco/done
```

## Settings

#### Only display notifications if a command takes more than a certain amount of time

```fish
set -U __done_min_cmd_duration 5000 # default: 5000 ms
```

#### Prevent specific commands from triggering notifications.

It accepts a list of regex patterns.
This is useful to exclude commands like for instance `git commit`, since it could trigger unwanted notifications if it is configured to use an external editor. This is also useful with `set -U __done_allow_nongraphical 1` to prevent notifications for commands normally run interactively that you do not want to get done notifications for.

```fish
set -U __done_exclude '^git (?!push|pull|fetch)' # default: all git commands, except push and pull. accepts a regex.
```

You can add more exclude patterns to the existing ones by using the `--append` option:

```fish
set -U --append __done_exclude '^emacsclient'
```

#### Execute a custom command instead of showing the default notifications. The `done` notification title and message can also be passed.

```fish
set -U __done_notification_command "your-command \$title \$message"
```

#### Play sound when showing notifications.

```fish
set -U __done_notify_sound 1
```

#### When using `sway`, do not show notifications for visible windows.

```fish
set -U __done_sway_ignore_visible 1
```

#### For Linux, set the urgency level for notifications sent via notify-send (low, normal, critical). The default is "normal" for regular commands, and "critical" for failed commands.

```fish
set -U __done_notification_urgency_level low
set -U __done_notification_urgency_level_failure normal
```

#### Allow notifications to be sent on systems without graphical capabilities. Note this requires you to also set `__done_notification_command`.

```fish
set -U __done_allow_nongraphical 1
```

#### Notifications are unavailable under Wayland. However, if you are using Kitty, you can enable it by using Kitty's remote control.

You need to install [jq](https://jqlang.github.io/jq).

In kitty.conf (change "kitty-rc-password" to your liking):

```conf
remote_control_password "kitty-rc-password" ls
allow_remote_control password
```

In fish

```fish
set -U __done_kitty_remote_control 1
set -U __done_kitty_remote_control_password "kitty-rc-password"
```

#### For Linux (except Ubuntu's Notify OSD), set the timeout in milliseconds at which to expire the notification. The default is "3000" (3 seconds). Set to "0" if you want it to never expire.

```fish
set -U __done_notification_duration 5000 # 5 seconds
```
## Support

- [fish](https://fishshell.com) 2.3.0+
- macOS 10.8+ via Notification Center.
- Linux via `notify-send`. Otherwise bell sound is played.
- Windows 10 via Windows Subsystem for Linux (WSL) and PowerShell.

## Credits

- [Francisco Lourenço](https://github.com/aristidesfl/) - Maintainer
- [Daniel Wehner](https://dawehner.github.io/) - Proof of Concept
- [Thanh Duc Nguyen](http://iamthanh.com/) - Logo

## Contributors

### Code Contributors

This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].

### Financial Contributors

Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/done/contribute)]

#### Individuals

#### Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/done/contribute)]










## License

Done is MIT licensed. See [LICENSE](LICENSE) for details.