701 Commits
Author SHA1 Message Date
Evangelos Ribeiro Tzaras 82a5eceec3 naming-spec: Document newly added phone-* events 2021-10-08 14:12:42 +00:00
Evangelos Ribeiro Tzaras b3d6a0d6f6 naming-spec: Fix upper cases, whitespaces and punctuation. 2021-10-08 14:12:42 +00:00
Evangelos Ribeiro Tzaras 5a439107bc feedback-theme: Add phone-outgoing-busy event
Named after the corresponding notification from the sound naming spec:
http://0pointer.de/public/sound-naming-spec.html
2021-10-08 14:12:42 +00:00
Evangelos Ribeiro Tzaras 48892de89a feedback-theme: Add phone-failure event
Named after the corresponding notification from the sound naming spec:
http://0pointer.de/public/sound-naming-spec.html
2021-10-08 14:12:42 +00:00
Evangelos Ribeiro Tzaras c783918f5b feedback-theme: Add phone-hangup event
Named after the corresponding notification from the sound naming spec:
http://0pointer.de/public/sound-naming-spec.html
2021-10-08 14:12:42 +00:00
Evangelos Ribeiro Tzaras 8e24ead69d d/control: Add json-glib-tools as build dependency
This will make sure that the json theme file gets validated in CI.
2021-10-07 18:52:11 +02:00
Guido Günther 83ba584a53 feedback-theme: Add camera related events 2021-09-06 12:49:41 +02:00
Guido Günther 587cbf3188 cli: Fix changing global profile
For that we must not set a default event.
2021-08-09 11:49:30 +02:00
Guido Günther 3503fe0293 docs: Fix --profile short option
It's '-P', not '-p'.
2021-08-09 11:46:30 +02:00
Guido Günther 4f5d3cc253 examples: Unbreak python example
The method is `trigger_feedback` not `trigger`.
2021-07-23 15:07:13 +02:00
Evangelos Ribeiro Tzaras 1ed04e409d fbd-dev-sound: Honour sound theme name for all GNOME based desktops
Phosh recently changed to XDG_CURRENT_DESKTOP=GNOME:Phosh and has since stopped
using the configured theme and instead used the fallback freedesktop theme.

Closes #41
2021-07-23 04:35:21 +02:00
Pablo Correa Gómez 3802c89e67 feedback-manager: Search for default theme under XDG_CONFIG_HOME first
This would allow users to create their own feedback profiles
without editing system files or using root privileges

Signed-off-by: Pablo Correa Gómez <ablocorrea@hotmail.com>
2021-06-08 16:17:41 +02:00
Andreas Hartmann b45468080e README: Add explanation on custom theme paths
The README currently states that feedbackd uses the `default.json` theme, whose
location is hardcoded into the application. This doesn't reflect the current
state of the code.

Explain the ability to add custom themes and give some examples to the user.
Also mention the `feedbackd-device-themes` repository explicitly for users
looking to modify the current `default.json` theme. Adds explanations about the
correct naming of custom theme files and theme file precedence when multiple
themes exist.
2021-05-31 11:31:36 +02:00
Andreas Hartmann 1c53464090 fbd-feedback-manager: Make sure theme path components are '/' separated
Previously, assembly of the theme paths for custom paths (based on
`XDG_DATA_DIRS`) was performed using `g_strconcat`, which produced erroneous
file paths with missing path separators due to a typo in the code.

Instead, make use of `g_build_filename` to assemble the theme paths from
`XDG_DATA_DIRS` to look for custom themes, which automatically introduces
host-specific path separators between individual path components. This
introduces another temporary variable to ensure that the filename (which is
itself assembled from a name and the file ending) isn't mangled by introduction
of a path separator between these two "parts".
2021-05-31 11:31:30 +02:00
Evangelos Ribeiro Tzaras 63eba5d715 fbd-dev-sound: whitespace 2021-05-04 10:54:46 +02:00
Guido Günther 48b4bb97d6 Document changes and release 0.0.0+git20210426 2021-04-26 12:36:05 +02:00
Guido Günther 678ae7a22d fbd-feedback-manager: Don't leak device list 2021-04-26 09:34:23 +00:00
Guido Günther 9c9f767986 fbd-feedback-manager: Don't leak config_path
It's assigned multiple times.
2021-04-26 09:34:23 +00:00
Guido Günther 437b19edd4 fbd-feedback-manager: Make sure to dispose sound device as well
Fixes another leak.
2021-04-26 09:34:23 +00:00
Guido Günther 11aa38baba fbd-dev-sound: Use correct cleanup for hash table
This went unnoticed since the manager forgot to cleanup
this at all (see follow up commit).
2021-04-26 09:34:23 +00:00
Guido Günther 4c30fafc6e fbd-dev-leds: Use automatic deep cleanup for device list
The current logic was fragile and failed e.g. when the
FEEDBACKD_UDEV_VAL_LED would not match leaking the dev since the
g_object_unref() at the end of the loop was never hit.

Prevent that with automatic cleanup and explicitly ref'ing the
devs we want to use.
2021-04-26 09:34:23 +00:00
Guido Günther 957fa1be83 fbd-dev-leds: Don't leak color
g_ascii_strdown() creates a copy already.
2021-04-26 09:34:23 +00:00
Guido Günther d8f944ed30 fbd-dev-leds: Don't leak enum_name
g_enum_to_string() is transfer full.
2021-04-26 09:34:23 +00:00
Guido Günther d7419f37a1 fbd-dev-leds: Free actual FbdDevLed as well
So far we only unref'ed the device.
2021-04-26 09:34:23 +00:00
Guido Günther 9169d8b23b fbd-feedback-theme: Don't leak JSON node 2021-04-26 09:34:23 +00:00
Guido Günther dc68afdf5f Help emacs to indent properly 2021-04-26 09:34:23 +00:00
Guido Günther 04648dcf27 feedback-manager: Track DBus clients and end feedbacks if they go away
When the client goes away we build up a list of events to end feedback
for to make sure the hash table isn't modified in place. tThe alternative
approach would be to disconnect the on_event_feedbacks_ended handler,
duplicate the DBus signal emission and use g_hash_table_foreach_remove
but that looks less robust than using the same code path.

Closes: #25
2021-04-22 14:44:30 +02:00
Guido Günther dc8c8c9594 fbd-manager: Keep DBus sender around 2021-04-22 14:43:30 +02:00
Guido Günther 66bcb31a0e fbd-event: Add sender property
This allows us to store the DBus sender
2021-04-22 14:43:30 +02:00
Guido Günther abab07a2f2 event: Remove 'g' prefix from common C types
This matchs phosh's style.
2021-04-22 14:43:30 +02:00
Guido Günther 0936b5fb09 tests: Run event tests too 2021-04-22 14:43:30 +02:00
Guido Günther da537aff1e event: Make log-domain match source file name 2021-04-22 14:43:30 +02:00
Sebastian Spaeth ec80c278a6 README: Fix gdbus test command
It is TriggerFeedback and not Feedback (anymore). Also add a note how to
end the feedback in order to prevent loss of hearing :-).
2021-03-22 09:55:24 +01:00
Clayton Craft 2674654c39 fbd-ledctrl: fix matching of trigger in list of triggers
If the trigger is the last thing in sysfs_path/LED_TRIGGER_ATTR, then
the new-line at the end of the output causes g_strv_contains to fail to
find the trigger in the list. This strips the new-line before splitting
the output into a list for searching.

You can see the problem this patch fixes with the librem 5, by:

$ rmmod ledtrig-timer     # or whatever is listed at the end, so 'pattern' is the last thing
$ cat /sys/devices/platform/pwmleds/leds/blue:status/trigger
[none] kbd-scrolllock ... pattern
$ fbd-ledctrl -p /sys/devices/platform/pwmleds/leds/blue:status -t pattern
Failed to set perms of /sys/devices/platform/pwmleds/leds/blue:status/pattern to 101: No such file or directory
$ modprobe ledtrig-timer
$ cat /sys/devices/platform/pwmleds/leds/blue:status/trigger
[none] kbd-scrolllock ... pattern timer
$ fbd-ledctrl -p /sys/devices/platform/pwmleds/leds/blue:status -t pattern
<success>
2021-03-20 00:26:24 -07:00
Guido Günther 53a02c719c test-lfb-integration: Test invocation error 2021-02-05 16:56:24 +01:00
Guido Günther d6e3df7ebc tests: Run lfb_event_{get,set}_timeout 2021-02-05 16:56:24 +01:00
Guido Günther 8c8382a0d2 lfb-event: Don't leak error
Don't leak the error values in the success case
2021-02-05 16:56:24 +01:00
Guido Günther 0a5dac1e53 fbd-dev-sound: Don't warn when sound was cancelled
This is not an error per se.
2021-02-05 16:56:24 +01:00
Guido Günther c95009afd1 fbd-dev-sound: Don't leak GError 2021-02-05 16:56:23 +01:00
Martin Bürgmann 4ba2889b90 implement fbd_dev_sound_stop
tracks the FdbFeedbackSounds in a GHashTable in the FdbDevSound
2021-02-04 21:16:39 +01:00
Guido Günther aac3306ad5 Document changes and release 0.0.0+git20210125 2021-01-25 11:00:38 +01:00
Guido Günther 40d318c9aa feedback-manager: Fix formatting
It was off in several places. Now that there's no outstanding
MRs clean it up via

   uncrustify --replace -c phosh.cfg src/fbd-feedback-manager.c
2021-01-11 10:35:03 +01:00
Dylan Van Assche 3ac9494821 fbd-feedback-manager: Allow device-specific feedbackd themes
Reads the compatible list of the device and tries to find a device-specific theme file in all  directories. If no configuration is found, we fall back to a default theme file. The device-specific theme file can always be overriden by specifying the FEEDBACK_THEME environment variable
2021-01-01 18:49:38 +01:00
Dylan Van Assche 2e92c181a0 meson.build: compile GLib schemas on install
Run a script as a post install to make sure that all GLib schemas are compiled
2021-01-01 18:38:47 +01:00
Dylan Van Assche e4cdd0bcff data/meson.build: fix validating theme files
The foreach loop was not used to validate all the include theme files
2021-01-01 18:37:30 +01:00
Guido Günther ce02a0a52d Document changes and release 0.0.0+git20201114 2020-11-14 15:55:30 +01:00
Guido Günther 3b3deddb54 debian: Don't abuse the video group
Use a separate group for users that should be able to access
the LED devices.
2020-11-14 15:39:27 +01:00
Guido Günther 5ca5d50027 udev: Update led maching for the librem5
The names changed in device tree which tickles up into userspace.
2020-11-14 15:33:27 +01:00
Luca Weiss ed0253fc44 Fix typos 2020-10-26 08:21:05 +00:00
Luca Weiss e79a24b5ad fbd-dev-leds: fix brightness parameter
The fbd_dev_led_set_brightness function is only getting called with
parameter 0 at the moment so this was never noticed.
2020-10-25 22:30:25 +01:00