{"id":17557747,"url":"https://github.com/splattael/libnotify","last_synced_at":"2025-04-05T09:09:36.174Z","repository":{"id":56881106,"uuid":"402476","full_name":"splattael/libnotify","owner":"splattael","description":"Ruby bindings for libnotify using FFI.","archived":false,"fork":false,"pushed_at":"2018-01-09T16:18:09.000Z","size":227,"stargazers_count":136,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T08:09:35.816Z","etag":null,"topics":["ffi","libnotify","ruby"],"latest_commit_sha":null,"homepage":"https://github.com/splattael/libnotify","language":"Ruby","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/splattael.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}},"created_at":"2009-12-06T22:08:59.000Z","updated_at":"2025-01-17T13:14:38.000Z","dependencies_parsed_at":"2022-08-20T13:00:41.845Z","dependency_job_id":null,"html_url":"https://github.com/splattael/libnotify","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splattael%2Flibnotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splattael%2Flibnotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splattael%2Flibnotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splattael%2Flibnotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/splattael","download_url":"https://codeload.github.com/splattael/libnotify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312082,"owners_count":20918344,"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":["ffi","libnotify","ruby"],"created_at":"2024-10-21T09:24:12.434Z","updated_at":"2025-04-05T09:09:36.125Z","avatar_url":"https://github.com/splattael.png","language":"Ruby","readme":"# Libnotify\n\n[![Build Status](https://img.shields.io/travis/splattael/libnotify.svg?branch=master)](https://travis-ci.org/splattael/libnotify) [![Gem Version](https://img.shields.io/gem/v/libnotify.svg)](https://rubygems.org/gems/libnotify) [![Code Climate](https://img.shields.io/codeclimate/github/splattael/libnotify.svg)](https://codeclimate.com/github/splattael/libnotify) [![Inline docs](http://inch-ci.org/github/splattael/libnotify.svg?branch=master)](http://inch-ci.org/github/splattael/libnotify)\n\nRuby bindings for libnotify using FFI.\n\n[Gem](https://rubygems.org/gems/libnotify) |\n[Source](https://github.com/splattael/libnotify) |\n[RDoc](http://rubydoc.info/github/splattael/libnotify/master)\n\n![libnotify](https://github.com/splattael/libnotify/raw/master/etc/libnotify-gnome3.png)\n![libnotify](https://github.com/splattael/libnotify/raw/master/etc/libnotify-ubuntu.png)\n\n## Usage\n\n### Hash Syntax\n\n```ruby\nrequire 'libnotify'\nLibnotify.show(:body =\u003e \"hello\", :summary =\u003e \"world\", :timeout =\u003e 2.5)\n```\n\n### Block Syntax\n\n```ruby\nrequire 'libnotify'\n\nn = Libnotify.new do |notify|\n  notify.summary    = \"hello\"\n  notify.body       = \"world\"\n  notify.timeout    = 1.5         # 1.5 (s), 1000 (ms), \"2\", nil, false\n  notify.urgency    = :critical   # :low, :normal, :critical\n  notify.append     = false       # default true - append onto existing notification\n  notify.transient  = true        # default false - keep the notifications around after display\n  notify.icon_path  = \"/usr/share/icons/gnome/scalable/emblems/emblem-default.svg\"\nend\n\nn.show!\n```\n\n### Mixed Syntax\n\n```ruby\nrequire 'libnotify'\n\n# Mixed syntax\noptions = {:body =\u003e \"world\", :timeout =\u003e 20}\nLibnotify.show(options) do |opts|\n  opts.timeout = 1.5     # overrides :timeout in options\nend\n```\n\n\n### Managing Icon Paths\n\n```ruby\nrequire 'libnotify'\n\n# Icon path auto-detection\nLibnotify.icon_dirs \u003c\u003c \"/usr/share/icons/gnome/*/\"\nLibnotify.show(:icon_path =\u003e \"emblem-default.png\")\nLibnotify.show(:icon_path =\u003e :\"emblem-default\")\n```\n\n\n### Updating existing notification and closing it\n\n```ruby\n# Update pre-existing notification then close it\nn = Libnotify.new(:summary =\u003e \"hello\", :body =\u003e \"world\")\nn.update # identical to show! if not shown before\n\nKernel.sleep 1\n\nn.update(:body =\u003e \"my love\") do |notify|\n  notify.summary = \"goodbye\"\nend\n\nKernel.sleep 1\n\nn.close\n```\n\n## Installation\n\n```bash\ngem install libnotify\n```\n\nYou'll need libnotify. On Debian just type:\n\n```bash\napt-get install libnotify1\n```\n\n## Testing\n\n```bash\ngit clone git://github.com/splattael/libnotify.git\ncd libnotify\n(gem install bundler)\nbundle install\nrake\n```\n\n### Code coverage\n\n```bash\nCOVERAGE=1 rake\n```\n\n## Caveats\n\n### Ubuntu\n\n`timeout` and `append` options might not work on Ubuntu.\nSee GH #21 for details.\nhttps://github.com/splattael/libnotify/issues/21#issuecomment-19114127\n\n## Authors\n\n* Peter Leitzen (https://github.com/splattael)\n\n## [Contributors](https://github.com/splattael/libnotify/graphs/contributors)\n\n* Dennis Collective (https://github.com/denniscollective)\n* Daniel Mack (https://github.com/zonque)\n* Nuisance of Cats (https://github.com/nuisanceofcats)\n* Jason Staten (https://github.com/statianzo)\n* Jeremy Lawler (https://github.com/jlawler)\n* Kero van Gelder (https://github.com/keroami)\n* René Föhring (https://github.com/rrrene)\n* Cezary Baginski (https://github.com/e2)\n* robisacommonusername (https://github.com/robisacommonusername)\n* Fernando Briano (https://github.com/picandocodigo)\n\n## License\n\n[MIT License](http://www.opensource.org/licenses/MIT)\n\n## TODO\n\n* Unify show/update interface\n  -\u003e simplifies code\n\n* Turn FFI module into a class\n  -\u003e more plugabble\n\n* Support newer features of `libnotify`\n  -\u003e actions, hints?\n  See https://developer-next.gnome.org/libnotify/0.7/NotifyNotification.html\n\n* Support older versions of `libnotify`\n  -\u003e prior `0.4`?\n","funding_links":[],"categories":["Gems"],"sub_categories":["Misc"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplattael%2Flibnotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsplattael%2Flibnotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplattael%2Flibnotify/lists"}