Giter Site home page Giter Site logo

tiramisu's Introduction

tiramisu
desktop notifications, the UNIX way


tiramisu is a notification daemon for *nix desktops that implement notifications using dbus.

Unlike other daemons, tiramisu does not have any sort of window or pop-up, but rather sends all notifications to STDOUT. Doing so enables endless customization from the end-user.


Crafted with ♡


Installation

Tiramisu depends upon Vala, gio, and glib.

Distribution Repository Package name
Arch Linux AUR tiramisu-git
Alpine Linux v3.15+ tiramisu
NixOS stable nixos.tiramisu

Don't see your distribution? Check to make sure it wasn't forgotten at repology. Alternatively, build from source.

$ git clone https://github.com/Sweets/tiramisu
$ cd ./tiramisu
$ make && make install

Usage

By default, tiramisu outputs all information from a notification to standard output. You can change this with -o, or if you wish to use JSON format, -j. If you need the output format to be sanitized (quotes to be escaped), you can do so with -s.

Using -o will interpolate your desired format.

Appropriate keys are #source, #icon, #id, #summary, #body, #actions, #hints, and #timeout.

Using -j implies -s.

Below is an example of the default output of tiramisu with no flags.

evolution-mail-notification
evolution
0
New email in Evolution
You have received 4 new messages.
desktop-entry=org.gnome.Evolution|urgency=1
Show INBOX=default
-1

tiramisu's People

Contributors

0323pin avatar bit69tream avatar cglindkamp avatar epsilon-0 avatar ikz87 avatar jbeich avatar jirutka avatar markusg avatar ordoviz avatar sweets avatar thwischm avatar viandoxdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tiramisu's Issues

[QUESTION] How to output in JSON

I'm sorry if this is a stupid question, but I really have no idea how I can tell tiramisu to format its output in JSON. I've looked everywhere, no man page, nothing on the wiki page, all I could find is some function in output.c for formatting as JSON called if a variable print_json is non-zero. How do I set this variable? Some argument when running tiramisu? Compile time option?

tiramisu.vala:46: Unable to acquired DBus name

I have not clue why it says that spend sometime trying to figure this out on the internet
My polytiramisu outputs either 'Terminated' or 'Trace/breakpoint trap (core dumped) $ tiramisu -s

** (tiramisu:208089): ERROR **: 22:18:18.439: tiramisu.vala:46: Unable to acquired DBus name.
Trace/breakpoint trap (core dumped)`

tiramisu.vala:46: Unable to acquired DBus name. Trace/breakpoint trap

Hi, when trying to start tiramisu i get the following error:
tiramisu.vala:46: Unable to acquired DBus name. Trace/breakpoint trap
I'm currently running Void Linux musl, and both the bin version from the package manager and compiled version give the same error. Until some day it all worked fine.
I tried killing all of the istances of tiramisu and than restarting it but still gave the same error.

Segfault when piped into sh `while read`

Most of the time this happens after the second notification.

$ tiramisu | while read -r notification; do echo "$notification"; done
{ "app_name": "notify-send", "timeout": -1, "summary": "summary", "body": "body" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summarytwo", "body": "bodytwo" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summarythree", "body": "bodythree" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2໩�", "body": "body2" }
[2]    18023 segmentation fault (core dumped)  tiramisu

$ tiramisu | while read -r notification; do echo "$notification"; done
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2��", "body": "body2" }
[2]    22556 segmentation fault (core dumped)  tiramisu

$ tiramisu | while read -r notification; do echo "$notification"; done
{ "app_name": "notify-send", "timeout": -1, "summary": "summary", "body": "body" }
malloc(): unsorted double linked list corrupted
{ "app_name": "notify-send", "timeout": -1, "summary": "summary", "body": "body" }
[2]    24655 abort (core dumped)  tiramisu

This also happens when ran on its own, but seemingly a lot less often.

$ tiramisu
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2", "body": "body2" }
{ "app_name": "notify-send", "timeout": -1, "summary": "summary2��", "body": "body2" }
[2]    1291 segmentation fault (core dumped)  tiramisu

2.0 fails to build on Void Linux

I'm currently trying to package 2.0 for Void Linux, but when I build, I get the following error:

=> xbps-src: updating repositories for host (x86_64)...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/nonfree/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/debug/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/multilib/x86_64-repodata' ...
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ...
=> xbps-src: updating software in / masterdir...
=> xbps-src: cleaning up / masterdir...
=> tiramisu-2.0_1: removing autodeps, please wait...
=> tiramisu-2.0_1: building [gnu-makefile] for x86_64...
   [host] pkg-config-0.29.2_3: found (https://alpha.de.repo.voidlinux.org/current)
   [host] glib-devel-2.70.0_2: found (https://alpha.de.repo.voidlinux.org/current)
   [host] vala-0.52.4_1: found (https://alpha.de.repo.voidlinux.org/current)
   [target] libglib-devel-2.70.0_2: found (https://alpha.de.repo.voidlinux.org/current)
=> tiramisu-2.0_1: installing host dependencies: pkg-config-0.29.2_3 glib-devel-2.70.0_2 vala-0.52.4_1 ...
=> tiramisu-2.0_1: installing target dependencies: libglib-devel-2.70.0_2 ...
=> tiramisu-2.0_1: running pre-build hook: 02-script-wrapper ...
=> tiramisu-2.0_1: running do_build ...
valac --pkg gio-2.0 src/notification.vala src/dbus.vala src/tiramisu.vala -d ./build -o tiramisu
Unknown option -pthread
Run 'valac --help' to see a full list of available command line options.
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
make: *** [Makefile:16: tiramisu] Error 1
=> ERROR: tiramisu-2.0_1: do_build: '${make_cmd} ${makejobs} ${make_build_args} ${make_build_target}' exited with 2
=> ERROR:   in do_build() at common/build-style/gnu-makefile.sh:14

Building with make directly from the source works on my machine, but building with xbps with the following template:

# Template file for 'tiramisu'
pkgname=tiramisu
version=2.0
revision=1
build_style=gnu-makefile
make_use_env=yes
hostmakedepends="pkg-config glib-devel vala"
makedepends="libglib-devel"
checkdepends="dbus"
short_desc="Desktop notifications, the UNIX way"
maintainer="Vapourium <[email protected]>"
license="MIT"
homepage="https://github.com/Sweets/tiramisu"
distfiles="https://github.com/Sweets/tiramisu/archive/refs/tags/${version}.tar.gz"
checksum=aca93f6c0db5633e0fc5ccf5e90cfac37c375646815837159263060bd1a43da1

post_install() {
    vlicense LICENSE
}

doesn't seem to work. I'm quite new to packaging with xbps, any ideas as to why it calls -pthread?

I was going to comment this under #37, but I think this should be in its own thread.

Usage question

I apologize if this is a silly question, but is this usable along-side a systems notification system (send-notify on Pop_OS), or strictly in place of?

Thanks,
-MH

Does tiramisu (or dbus?) give backpressure on notification sending?

I appreciate that this very well might not be a tiramisu issue, but it's the best lead I have :)

I'm using polytiramisu to display notifications in my polybar. Here's the script I use https://github.com/bo0tzz/i3-config/blob/master/scripts/polytiramisu.sh. The behaviour (I think) I'm seeing is that when Discord sends multiple notifications at once, it seems to block Discord's main thread and freeze it up until all of the notifications have been displayed on my bar. Is it possible that it's getting blocked by tiramisu somehow, is dbus not as async as I thought, or is this just bad design on discord's end?

Tiramisu is lovely btw, thank you very much!

Notification ID of 0 violates notification spec

According to the Desktop Notifications Specification:

If replaces_id is 0, the return value is a UINT32 that represent the notification. It is unique, and will not be reused unless a MAXINT number of notifications have been generated. An acceptable implementation may just use an incrementing counter for the ID. The returned ID is always greater than zero. Servers must make sure not to return zero as an ID.

If replaces_id is not 0, the returned value is the same value as replaces_id.

Yet tiramisu always returns 0:

return 0;

Even if replaces_id isn't really supported by Tiramisu, I'd expect it to at least return a return value according to the spec.

pid file support

It would be nice when tiramisu would write a pid file, maybe into the xdg runtime dir.
my use case is, start/stop tiramisu via runit and its supervisor.

sure i could grep for process names, but somehow it would be simpler having such a file.

Json ouput not displaying image info

If tiramisu is run with no flags, and I send a notification with an image path using notification-send summary -i /image/path I get the following output:

$ tiramisu
notify-send
/image/path
0
summary


urgency=0x01,sender-pid=1428697
-1

But if -j flag is used, then this is the output:

$ tiramisu -j
{"source": "notify-send", "id": 0, "summary": "summary", "body": "", "actions": "", "hints": {"urgency": "0x01", "sender-pid": "1440008"}, "timeout": -1}

The /image/path argument is nowhere to be seen.
I know I can use -o to manually format the output however I want, but can't figure out how to format hints correctly since different notifications can have more or less hints with different names.

Trailing comma in "hints" with json output

Prettified Output:

{
    "app_name": "Telegram Desktop",
    "app_icon": "",
    "replaces_id": 0,
    "timeout": -1,
    "hints": {
        "category": "im.received",
        "desktop-entry": "telegramdesktop",
    },
    "actions": {},
    "summary": "...",
    "body": "..."
}

There should not be a comma after the "desktop-entry" hint.

How can I trigger actions?

I know that i can use gdbus to emit signal but how does that work can I get an example? Please. I wasted my whole day but didn't found anything useful for me.

Timestamp?

Hello,

I was thinking what would be nice to include as part of tiramisu's output would be to include a timestamp. It would be useful in providing some sort of history functionality to the notifications (and scripts that employ this would be simplified when the timestamp is already generated instead of having to create it). In terms of the actual implementation, maybe have tiramisu include a timestamp in seconds since the UNIX epoch? This way, users can extract that information and change it to 12/24 hour or whatever format they desire.

I'm curious to know your thoughts.

slightly corrupt json + duplicate summary/body

I'm using tiramisu-git from the AUR and notifications I get seem to have slight issues with the json for some libraries.

This file shows the raw json coming in (using lua to write a small parser) and you can see in the hints, there's a trailing comma which causes some issues, and on apps like spotify, there's a leading AND trailing comma in the hints. I'm able to fix this in a super hacky way in lua
notification:gsub("{ ,","{ "):gsub(", }"," }")
But this is obviously less than ideal.

On top of this, body and summary seem to be the same value, which can also be seen in that file

Segfaults when given app names of certain lengths

Hi. I'm the maintainer of tiramisu on nixpkgs/NixOS, and found a bug when reviewing a PR to update the version of tiramisu currently in nixpkgs.

When running

$ while :; do notify-send -a $STR "hi"; done

where $STR is a string of lengths 2, 5, 7, 13, 18, 20, 22, or 29 (tested up to 30), tiramisu segfaults after a few notifications.

It looks like the contents of the strings don't matter, but I've tested it mostly with lots of "a"-s. I've reproduced this on two NixOS machines, and on one running Arch, all of whom have similar environments/configurations. I've bisected, and it turns out that this doesn't happen on commits before a425e43, and does happen on commits after a425e43. I haven't tested it on a425e43 because I couldn't get it to compile.

Makefile: Order of arguments makes it fail on Ubuntu 19.10

When I run make (after git clone'ing and cd'ing), I get this:

$ make
cc -Wall -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lgio-2.0 -lgobject-2.0 -lglib-2.0 tiramisu.c callbacks.c format.c -o tiramisu
format.c: In function ‘output_notification’:
format.c:28:9: warning: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Wrestrict]
   28 |         timeout, OUTPUT_DELIMITER, summary, OUTPUT_DELIMITER, body);
      |         ^~~~~~~
/usr/bin/ld: /tmp/ccJyiXnF.o: in function `stop_main_loop':
tiramisu.c:(.text+0x1b): undefined reference to `g_main_loop_quit'
/usr/bin/ld: /tmp/ccJyiXnF.o: in function `main':
tiramisu.c:(.text+0x49): undefined reference to `g_dbus_node_info_new_for_xml'
/usr/bin/ld: tiramisu.c:(.text+0x88): undefined reference to `g_bus_own_name'
/usr/bin/ld: tiramisu.c:(.text+0x9e): undefined reference to `g_main_loop_new'
/usr/bin/ld: tiramisu.c:(.text+0xbb): undefined reference to `g_unix_signal_add'
/usr/bin/ld: tiramisu.c:(.text+0xd4): undefined reference to `g_unix_signal_add'
/usr/bin/ld: tiramisu.c:(.text+0xe6): undefined reference to `g_main_loop_run'
/usr/bin/ld: tiramisu.c:(.text+0x11a): undefined reference to `g_main_loop_unref'
/usr/bin/ld: tiramisu.c:(.text+0x124): undefined reference to `g_source_remove'
/usr/bin/ld: tiramisu.c:(.text+0x12e): undefined reference to `g_source_remove'
/usr/bin/ld: tiramisu.c:(.text+0x162): undefined reference to `g_dbus_node_info_unref'
/usr/bin/ld: tiramisu.c:(.text+0x16c): undefined reference to `g_bus_unown_name'
/usr/bin/ld: /tmp/ccFLK7iJ.o: in function `method_handler':
callbacks.c:(.text+0x9c): undefined reference to `g_variant_iter_init'
/usr/bin/ld: callbacks.c:(.text+0xbe): undefined reference to `g_variant_iter_next'
/usr/bin/ld: callbacks.c:(.text+0xe0): undefined reference to `g_variant_iter_next'
/usr/bin/ld: callbacks.c:(.text+0x102): undefined reference to `g_variant_iter_next'
/usr/bin/ld: callbacks.c:(.text+0x124): undefined reference to `g_variant_iter_next'
/usr/bin/ld: callbacks.c:(.text+0x146): undefined reference to `g_variant_iter_next'
/usr/bin/ld: /tmp/ccFLK7iJ.o:callbacks.c:(.text+0x168): more undefined references to `g_variant_iter_next' follow
/usr/bin/ld: /tmp/ccFLK7iJ.o: in function `method_handler':
callbacks.c:(.text+0x217): undefined reference to `g_variant_new'
/usr/bin/ld: callbacks.c:(.text+0x267): undefined reference to `g_variant_new'
/usr/bin/ld: callbacks.c:(.text+0x288): undefined reference to `g_dbus_method_invocation_return_value'
/usr/bin/ld: callbacks.c:(.text+0x2a6): undefined reference to `g_dbus_connection_flush'
/usr/bin/ld: /tmp/ccFLK7iJ.o: in function `bus_acquired':
callbacks.c:(.text+0x347): undefined reference to `g_dbus_connection_register_object'
collect2: error: ld returned 1 exit status
make: *** [Makefile:11: tiramisu] Error 1

I am no C programmer, so I googled and found the answer here: gcc expects the linked libraries (-l) after .c files. So The order has to be gcc -I... *.c -l... -o ....

Adapting the Makefile as follows fixes the issue for me:

TARGET	=	tiramisu
SRC		:=	tiramisu.c callbacks.c format.c

LIBS	=	glib-2.0 gio-2.0
CFLAGS	=	-Wall
IFLAGS	=	$(shell pkg-config --cflags glib-2.0 $(LIBS))
LFLAGS	=	$(shell pkg-config --libs glib-2.0 $(LIBS))

all: $(TARGET)

$(TARGET): $(OBJ)
	$(CC) $(CFLAGS) $(IFLAGS) $(SRC) $(LFLAGS) -o $(TARGET)

clean:
	$(RM) ./tiramisu

[QUESTION] But to have desktop notifications

Is there a way to intercept notifications with tiramisu, process them and make (some of) them appear as desktop notifications?

E.g.:

  1. Have desktop notifications in leetspeak/Morse/X-SAMPA etc.
  2. Notifications to be both showed on the desktop and e-mailed.
  3. Depending on notification in question, either show it as a desktop notification or e-mail it.

Support {image,icon}-data hints

Some applications (like Telegram and Firefox) do not output icon/image paths, but use the {icon,image}-data hints.

Would it be possible to print a representation of that structure? This way, the image could be saved to a temporary file and fed into e.g. xnotify.

Output with markup tags

In the desktop notifications specs it says that the client should be capable of outputting a simple markup, and if not it should be filtered. So tiramisu filters them? If yes there is a way to disable that?

[QUESTION] tiramisu + herbe

Hey! Sorry for noob question, im just starting my linux way :). I'm on void linux.
How can I setup tiramisu + herbe? I don't know how to call herbe properly. I've tried tiramisu -o "#body" | herbe, no results :(. And I guess, I have to enable that daemon on startup, how to do that?
Thanks in advance!

PS: I don't want to use dunst. :)

Vala Rewrite

Any issues with the Vala rewrite should be reported here.

Some testing is required, in particular

  • Notifications that provide images (#27)
  • JSON output does need to be verified (#31). In my testing it was fine, but some realistic application would be more appropriate.
  • ...Everything else? While most things should be fine, additional testing and realistic application is always necessary. And unfortunately, I can't supplement that all myself.

Notifications don't work with Chromium & Firefox

WM: bspwm, Distro: Manjaro
How to reproduce:

  1. Kill all browser windows.
  2. Start Tiramisu with terminal
  3. Open browser
  4. Trigger a notification to apear
  5. Notification displays using the browser ui and tiramisu doesn't detect it / catch it.

Why I think this is a tiramisu bug and not a browser bug:
When I launch dunst the notifications work just fine and it uses dunst ui instead of firefox ui.

When not using PRINT_JSON and actions is empty, "actions:" and "summary:" are on the same line

Current status:
If there is no "action", "summary:" is on the same line as "actions:". If there are multiple actions, the first is on the same line as "actions:", any further ones are on their own line.

This inconvenient to parse, so there always should be a newline after "actions:". The same is true for "hints", but there always seems to be at least one value (urgency). Multiple solutions come to my mind, which I would even implement myself. But I would like your opinion, before I implement something and send a pull request, which isn't going in the right direction.

  1. Always add a newline directly after "hints:" and "actions:", the items themselves each are on a new line. (I'm using this variant locally).
  2. No newline is between the items, so there are all on the same line as "hints:" and "actions:".
  3. As it is now, but a guaranteed newline after an emtpy "hints:" or "actions:" line.

2.0 fails to build on NetBSD

Hi,

We are currently building tiramisu from the latest alpha-release.
Today, I've tried to update to the 2.0-release but it now fails to build with the following error,

=> Bootstrap dependency digest>=20010302: found digest-20211005
=> Checksum RMD160 OK for tiramisu-2.0.tar.gz
=> Checksum SHA512 OK for tiramisu-2.0.tar.gz
===> Installing dependencies for tiramisu-2.0
=> Tool dependency glib2-tools-[0-9]*: found glib2-tools-2.68.4
=> Tool dependency bsdtar-[0-9]*: found bsdtar-3.4.3
=> Tool dependency gmake>=3.81: found gmake-4.3nb2
=> Tool dependency pkgconf-[0-9]*: found pkgconf-1.8.0
=> Build dependency x11-links>=1.34: found x11-links-1.34
=> Build dependency vala>=0.54: found vala-0.54.0
=> Build dependency cwrappers>=20150314: found cwrappers-20180325
=> Full dependency glib2>=2.64.0nb1: found glib2-2.68.4nb1
===> Skipping vulnerability checks.
WARNING: No /usr/pkg/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/pkg/sbin/pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities'.
===> Overriding tools for tiramisu-2.0
===> Extracting for tiramisu-2.0
===> Patching for tiramisu-2.0
===> Creating toolchain wrappers for tiramisu-2.0
===> Configuring for tiramisu-2.0
=> Generating pkg-config file for builtin expat package.
===> Building for tiramisu-2.0
valac --pkg gio-2.0 src/notification.vala src/dbus.vala src/tiramisu.vala -d ./build -o tiramisu
Unknown option -I/usr/pkg/include
Run 'valac --help' to see a full list of available command line options.
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
gmake: *** [Makefile:16: tiramisu] Error 1
*** Error code 2

Stop.
bmake[1]: stopped in /usr/pkgsrc/wip/tiramisu
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/wip/tiramisu

Yes, I've vala installed and listed as a dependency.

Any pointers?

Thanks

Release tags?

Hi there, I am trying to get tiramisu packaged for pkgsrc and NetBSD. Could you please provide release tags?
Thanks

request for a new release

The current latest release is very old, and there are a lot bug fixes afterward. It would be nice to have a new release.

Icons cause corrupt JSON (improper JSON escape sequences)?

Hello,

I've recently updated and suddenly some of my notifications no longer work. I use this in conjunction with jq to parse notifications into polybar. I figured out that for notifications that have an icon in their body, jq complains and states pares error: Invalid escape at line 1, column 169. The particular JSON tiramisu spat out to trigger this error is { "app_name": "notify-send", "app_icon": "", "replaces_id": "0", "timeout": "3000", "hints": { "urgency": 1}, "actions": {}, "summary": "\357\211\223 01:24:46 remaining", "body": "" } I thought perhaps it was an issue with jq, but it seems to be that people with similar issues with escape sequences in their JSON turn out to have bad JSON output to start with (Here's one example: https://stackoverflow.com/questions/49073376/jq-escaping-backslash-in-keyname) I apologize if the link referenced has nothing to do with what I'm experiencing as I don't fully understand the error myself.

JSON output: summary and body process `\n` differently (intentional?)

Not sure if this is intentional, but \n characters are printed literally in the summary whilst in body they turn into new lines.

$ tiramisu &
$ notify-send "summary line 1\nsummary line 2" "body line 1\nbody line 2"
{ "app_name": "notify-send", "app_icon": "", "replaces_id": 0, "timeout": -1, "summary": "summary line 1\nsummary line 2", "body": "body line 1
body line 2" }

Perhaps summaries are meant to be one line always? That would make sense.

tiramisu doesn't compile without json setting

   69 |     free(escaped_str);
      |          ^~~~~~~~~~~
format.c:69:10: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:12: tiramisu] Error 1```

Incorrect JSON with images

The json produced by tiramisu -j is invalid with base64 images in the hints.image-data field as it isn't quoted at all.

This is the case with discord notifications:

{
  "source": "discord",
  "id": 1749,
  "summary": "...",
  "body": "@viandox42#8857",
  "actions": "default,View",
  "hints": {
    "desktop-entry": "discord",
    "urgency": "0x01",
    "image-data": 256:256:1024:true:8:4:WGXy/1hl8v9YZfL/WGXy/1hl ... base64 data ... 8v9YZfL/WGXy/w==
  },
  "timeout": -1
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.