Skip to content

Commit

Permalink
add reading of freedesktop notifications (#125)
Browse files Browse the repository at this point in the history
this monitors the session bus for calls to the notify method of the org.freedesktop.notifications interface, with the path of /org/freedesktop/notifications, and collects the parameters we are interested in, then speaks them

known limitations

* application name is not spoken because most apps send a blank string for that argument

suspected limitations

* this may or may not work on gnome, as they use a different interface for reporting notifications directly to gnome-shell, if it's detected to be running. Gnome apps on other desktops might work though. For later reference, the interface in question is org.gtk.notifications, and the path is /org/gtk/notifications
* depending on the portal backend, this may not work at all if portals are involved. For future reference, we might have to monitor the portal calls, if we end up failing to hook into the system with the current freedesktop notifications implementation introduced by this commit
  • Loading branch information
albertotirla authored Mar 2, 2024
1 parent d24a7e8 commit efd02b7
Show file tree
Hide file tree
Showing 14 changed files with 1,097 additions and 447 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@ jobs:
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: Install Dependencies
run: sudo apt -y install at-spi2-core systemd
run: sudo apt -y install at-spi2-core systemd dunst xvfb
- name: setup dbus and notification daemon
run:
sudo systemctl start dbus;
systemctl --user start dbus;
xvfb-run dunst --screen 0 600x400x8 &
- name: cargo llvm-cov
run: cargo llvm-cov --locked --lcov --output-path lcov.info
- name: Upload to codecov.io
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rust-analyzer.linkedProjects": [
"./odilia-notify/Cargo.toml"
]
}
Loading

0 comments on commit efd02b7

Please sign in to comment.