Skip to content

Commit

Permalink
1.0!
Browse files Browse the repository at this point in the history
  • Loading branch information
Sweets committed Sep 21, 2020
1 parent 72a651c commit 66c0044
Showing 1 changed file with 50 additions and 11 deletions.
61 changes: 50 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,37 @@
tiramisu is a notification daemon based on dunst that outputs notifications
to STDOUT in order to allow the user to process notifications any way they prefer.

Perhaps you want notifications to be sent to your bar? tiramisu allows you to do that.

Maybe you want notifications to be redirected to your phone as push notifications? A little bit of elbow grease and some tiramisu would let you do that ;)
<div align="center"><img src="https://github.com/Sweets/tiramisu/blob/master/example.gif"/></div>

Notifications could be made more accessibility friendly even with TTS.
# Why?

<div align="center"><img src="https://github.com/Sweets/tiramisu/blob/master/example.gif"/></div>
By allowing users to determine what is done with notifications, there is infinitely more possibilities presented
to the end-user than a simple notification daemon that displays a block of text on the screen and nothing more.

Thanks to [BanchouBoo](https://github.com/BanchouBoo) for helping test tiramisu and providing the gif of it.
Users could have notifications display in a pre-existing bar, make a control panel of some sort that shows
notifications, push notifications to their phone if their computer has been idle for an amount of time,
make notifications more accessible with text-to-speech, and so much more.

# Projects Using tiramisu

- [polynotifications by alnj](https://github.com/alnj/polynotifications)

# Installation

Clone the repository and build the project. Then move tiramisu to a location that is specified in `$PATH`.

```
$ git clone https://github.com/Sweets/tiramisu
$ cd ./tiramisu
$ make
# cp ./tiramisu /usr/bin/tiramisu
# chmod +x /usr/bin/tiramisu
```

#### Note that the use of a pound symbol (#) denotes escalated privileges.
#### On most Linux systems this can be done with the usage of `sudo`

# Usage

Redirecting output of tiramisu to the input of another program is the ideal methodology to using
Expand All @@ -26,17 +43,39 @@ tiramisu.
tiramisu | your-application
```

By default tiramisu outputs notifications in JSON format. By removing the `PRINT_JSON` macro from config.h you can have tiramisu print out notifications straight to STDOUT, with each bit of information being split by a new line (the delimiter can also be changed in config.h)
By default tiramisu outputs notifications in a psuedo-key-value line format.
You can supply the `-j` flag to output notification data in JSON format.

### Example of default output

```
$ tiramisu
{ "app_name": "notify-send", "app_icon": "", "replaces_id": 0, "timeout": -1, "summary": "Notification summary", "body": "Notification body" }
```

also tiramisu can output information in json so it can be easily parsed.
```
app_name: evolution-mail-notification
app_icon: evolution
replaces_id: 0
timeout: -1
hints:
desktop-entry: org.gnome.Evolution
urgency: 1
actions:
Show INBOX: default
summary: New email in Evolution
body: You have received 4 new messages.
```

If any specific setting is disabled in the configuration, the line is omitted
from the output (making all of the output one line shorter).
### Example of JSON output

```
$ tiramisu -j
```

```
{"app_name": "evolution-mail-notification", "app_icon": "evolution", "replaces_id": 0, "timeout": -1, "hints": {"desktop-entry": "org.gnome.Evolution", "urgency": 1}, "actions": {"Show INBOX": "default"}, "summary": "New email in Evolution", "body": "You have received 4 new messages."}
```

#### Note that only a single process can claim the org.freedesktop.Notifications name at a given time, so any other running notification daemon must be killed before running tiramisu.

##### Thanks to [BanchouBoo](https://github.com/BanchouBoo) for helping test tiramisu and providing the gif of it.

0 comments on commit 66c0044

Please sign in to comment.