{"id":23222716,"url":"https://github.com/pmunch/notificatcher","last_synced_at":"2025-04-05T16:28:58.999Z","repository":{"id":76831412,"uuid":"304016444","full_name":"PMunch/notificatcher","owner":"PMunch","description":"Simple program to read freedesktop notifications and format them as strings","archived":false,"fork":false,"pushed_at":"2024-05-13T10:06:53.000Z","size":60,"stargazers_count":18,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-11T13:25:01.327Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PMunch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-14T13:01:28.000Z","updated_at":"2024-05-13T10:06:52.000Z","dependencies_parsed_at":"2023-03-01T17:30:25.530Z","dependency_job_id":null,"html_url":"https://github.com/PMunch/notificatcher","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PMunch%2Fnotificatcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PMunch%2Fnotificatcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PMunch%2Fnotificatcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PMunch%2Fnotificatcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PMunch","download_url":"https://codeload.github.com/PMunch/notificatcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247364721,"owners_count":20927187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-12-18T23:14:05.216Z","updated_at":"2025-04-05T16:28:58.980Z","avatar_url":"https://github.com/PMunch.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Notificatcher logo](https://github.com/PMunch/notificatcher/blob/master/notificatcher.png)\n\nWant to integrate notifications into your Desktop Environment-less Linux\nset-up? Look no further!\n\n# What is Notificatcher\nNotificatcher is a very simple program that interfaces with dbus to read\nFreedesktop notifications and output them in whatever format you specify and run\nany program or script you desire. Whether you want to simply dump them to a\nfile, or display them in a status bar or use a third-party program to make them\npop up on screen is entirely up to you. Notificatcher is built to do a single\ntask, and to do it well.\n\n# But why?\nIt all started when I switched to using Nimdow as my Window Manager. Previously\nI've been using i3 and dunst to display notifications, but I was never really\nhappy with how my notifications appeared with dunst, and I could never remember\nthe shortcut to read notifications after they were gone. Nimdow, similarily to\ndwm and some other light-weight window managers have a status bar that supports\nreading the name of the root window and displaying it as a way of being able\nto add custom information to the bar. Nimdow also supports ANSI colours for\nthis bar, so it's easy to customise it with some proper flair. While writing my\nstatus bar script I figured it could be cool if it could simply flash any\nrecent notification instead of showing system data. This would mean that I no\nlonger had any annoying pop ups to deal with from dunst, and it would still be\nable to grab my attention by blinking. But there was one problem, by simply\nusing bash I couldn't find any obvious way of getting notifications. There\nsimply didn't exist an easy and clean solution for just getting notifications\nas text. And thus Notificatcher was born! In my set-up I have it set to dump\nall notifications to a file, then my status bar bash script will see if the\nnotifications file is empty, and if not it will flash the last line of the file\nalong with a count of notifications if there are more than one. I then have two\nsimple ZSH aliases to clear and read notifications, the latter simply a command\nto run `less -r` with the notifications file before clearing it with\n`: \u003e /tmp/notifications`.\n\n# Sounds cool, how do I use it?\nEasiest way to figure it out is by checking out the help message:\n\n```\nNotificatcher 0.5.1\nFreedesktop notifications interface. When run without arguments it will simply\noutput all notifications to the terminal one notification per line. If supplied\nwith arguments it can also send signals indicating that a notification was\nclosed, or if an action was performed on the notification. By specifying a\ncloseFormat it will also output notification closed messages, if you're\nlistening to these you should also use the send close functionality of\nnotificatcher to report back to the parent notification that this was indeed\nclosed. The same applies if you close messages based on their timeout.\n\nUsage:\n  notificatcher [options] [\u003cformat\u003e]\n  notificatcher send \u003cid\u003e (close \u003creason\u003e | action \u003caction_key\u003e)\n\nOptions:\n  -h --help                  Show this screen\n  -v --version               Show the version\n  -f --file \u003cfile\u003e           File to output messages to\n  -m --closeFile \u003cfile\u003e      File to output close messages to\n  -r --run \u003cprogram\u003e         Program to run for each notification\n  -x --closeRun \u003cprogram\u003e    Program to run for each close message\n  -d --closeFormat \u003cformat\u003e  How to format notifications that have been closed\n  -i --iconPath \u003cpath\u003e       The path to store icons in\n  -c --capabilities \u003ccap\u003e    A list of capabilities to declare\n\nIf a filename with a replacement pattern is passed, the replacements will be\ndone for every notification and the notification will be written into that\nfile. Otherwise the file will be opened right away and be continously written\nto as the program runs. If no file is specified, output will go to stdout.\nError messages will always be written to stderr.\n\nThe run parameter can be used to specify a program to be run for every\nnotification. The program string can contain a replacement pattern.\n\nThe close parameter can be used to specify a pattern for notification close\nevents. This pattern only supports the id, file, and time replacements.\n\nThe format that can be supplied is a fairly simple replacement pattern for how\nto output the notifications. It will perform these replacements:\n{appName} -\u003e The name of the app\n{replacesId} -\u003e ID of the notification this notification replaces\n{appIcon} -\u003e The name of the icon to use\n{summary} -\u003e The summary of the notification\n{body} -\u003e The body text of the notification, be warned that this can contain\n  newlines so should be somehow wrapped if you want to split the output into\n  individual notifications.\n{expireTimeout} -\u003e Expiry timeout\n{id} -\u003e The ID assigned to this notification, or in the case of a closed\n  notification the ID of the notification to close.\n{actions} -\u003e The list of actions, separated by commas\n{hints:\u003chint name\u003e} -\u003e A named hint from the table of hints, after the hint\n  name you can also supply a list of strings separated by colons which will be\n  selected by the hint as an integer, e.g. {hints:urgency:low:normal:critical}.\n  For any of the image-data hints you will get a file URI to a PNG as the\n  output instead of a buffer. The icon will be stored in the iconPath, if no\n  icon path is set the image-data won't return anything.\n{time:\u003cformat\u003e} -\u003e The time of the notification as recorded upon receival,\n  format is a string to format by, as specified in the Nim times module.\n{file} -\u003e The name of the output file (this is not available when formatting a\n  file name for obvious reasons).\n{pid} -\u003e The process ID if a program was run with --run or --closeRun. Useful if\n  you want to kill a program later.\n\nIf no format is specified, this format is used for notifications, and nothing is\nused for close messages:\n  {appName}: {summary} ({hints:urgency:low:normal:critical})\n\nIf {pid} is supplied as part of the output filter AND the file filter, then the\nprogram will be launched first (and {file} will be empty in the program filter)\nand then the filename will be generated and the output will be done.\nIf {pid} is supplied as part of the output filter but not the file filter, then\nthe filename will be generated, the program run (and {file} in the program\nfilter will now point to a yet to be made file) and then the output will be\nwritten to the file.\nIf {pid} is supplied as part of the file filter but not the output filter, then\nit behaves the same as if appeared in both.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmunch%2Fnotificatcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmunch%2Fnotificatcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmunch%2Fnotificatcher/lists"}