Merge branch 'close-event' into 'main'
theme: Fix window-close event name See merge request agx/feedbackd!203
This commit is contained in:
@@ -16,7 +16,7 @@ git clone https://gitlab.freedesktop.org/agx/feedbackd
|
|||||||
cd feedbackd
|
cd feedbackd
|
||||||
```
|
```
|
||||||
|
|
||||||
The master branch has the current development version.
|
The `main` branch has the current development version.
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
@@ -27,6 +27,8 @@ sudo apt-get -y install build-essential
|
|||||||
sudo apt-get -y build-dep .
|
sudo apt-get -y build-dep .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
to install the needed build dependencies.
|
||||||
|
|
||||||
For an explicit list of dependencies check the `Build-Depends` entry in the
|
For an explicit list of dependencies check the `Build-Depends` entry in the
|
||||||
[debian/control][] file.
|
[debian/control][] file.
|
||||||
|
|
||||||
@@ -36,12 +38,22 @@ We use the meson (and thereby Ninja) build system for feedbackd. The quickest
|
|||||||
way to get going is to do the following:
|
way to get going is to do the following:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
meson . _build
|
meson setup _build
|
||||||
ninja -C _build
|
meson compile -C _build
|
||||||
ninja -C _build test
|
meson test -C _build
|
||||||
ninja -C _build install
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Installing
|
||||||
|
|
||||||
|
To install the files to `/usr/local` you can use
|
||||||
|
|
||||||
|
```
|
||||||
|
meson install -C _build
|
||||||
|
```
|
||||||
|
|
||||||
|
however for testing and development this is usually not necessary as you
|
||||||
|
can things out of the built source tree.
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
||||||
### Running from the source tree
|
### Running from the source tree
|
||||||
@@ -52,13 +64,13 @@ To run the daemon use
|
|||||||
_build/run _build/src/feedbackd
|
_build/run _build/src/feedbackd
|
||||||
```
|
```
|
||||||
|
|
||||||
To run under gdb use
|
To run under `gdb` use
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
FBD_GDB=1 _build/run _build/src/feedbackd
|
FBD_GDB=1 _build/run _build/src/feedbackd
|
||||||
```
|
```
|
||||||
|
|
||||||
You can introspect and get the current theme with
|
You can introspect and get the current profile with
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
gdbus introspect --session --dest org.sigxcpu.Feedback --object-path /org/sigxcpu/Feedback
|
gdbus introspect --session --dest org.sigxcpu.Feedback --object-path /org/sigxcpu/Feedback
|
||||||
@@ -76,41 +88,45 @@ active feedback theme (taking per application profile settings into account).
|
|||||||
|
|
||||||
Any feedback triggered by a client via an event will be stopped latest when the
|
Any feedback triggered by a client via an event will be stopped latest when the
|
||||||
client disconnects from DBus. This makes sure all feedbacks get canceled if the
|
client disconnects from DBus. This makes sure all feedbacks get canceled if the
|
||||||
app that triggered it crashes.
|
app that triggered them crashes.
|
||||||
|
|
||||||
### Feedback theme
|
### Feedback theme
|
||||||
|
|
||||||
As devices have varying capabilities and users different needs, events
|
As devices have varying capabilities and users different needs, events
|
||||||
are mapped to a feedbacks (sound, LED, vibra) via a configurable
|
are mapped to feedbacks (sound, LED, vibra) via a configurable
|
||||||
theme.
|
theme.
|
||||||
|
|
||||||
Feedbackd is shipped with a default theme `default.json`.
|
Feedbackd is shipped with a default theme `default.json`.
|
||||||
You can add your own themes in multiple ways:
|
You can add your own themes in multiple ways:
|
||||||
|
|
||||||
1. By exporting an environment variable `FEEDBACK_THEME` with a path to a
|
1. By exporting an environment variable `FEEDBACK_THEME` with a path to a
|
||||||
valid theme file (not recommended, use for testing only), or
|
valid theme file (not recommended, use for testing only)
|
||||||
1. By creating a theme file under `$XDG_CONFIG_HOME/feedbackd/themes/default.json`.
|
1. By creating a theme file under `$XDG_CONFIG_HOME/feedbackd/themes/default.json`.
|
||||||
If `XDG_CONFIG_HOME` environment variable is not set or empty, it will
|
If `XDG_CONFIG_HOME` environment variable is not set or empty, it will
|
||||||
default to `$HOME/.config`, or
|
default to `$HOME/.config`
|
||||||
1. By creating a theme file under `$XDG_CONFIG_HOME/feedbackd/themes/custom.json`.
|
1. By creating a theme file under `$XDG_CONFIG_HOME/feedbackd/themes/custom.json` and
|
||||||
You only specify the values you want to change in that theme and add an entry
|
telling feedbackd to use that theme. In this custom theme you only
|
||||||
|
specify the events you want to change. Also add a `parent-name` entry
|
||||||
|
to chain up to the default theme:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"name: "custom"
|
"name: "custom"
|
||||||
"parent-name": "default"
|
"parent-name": "default"
|
||||||
"profiles" : [
|
"profiles" : [
|
||||||
...(entries you want to change go here)...
|
...(events you want to change go here)...
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
next to the `name` entry in. This has the upside that your theme
|
This has the upside that your theme only contains the entries you
|
||||||
gets way smaller and that new entries added to the default theme
|
want to change and that new entries added to the default theme
|
||||||
will automatically be used by your theme too. See
|
will automatically be used by your theme too. See
|
||||||
[here](./tests/data/user-config/feedbackd/themes/custom.json) for
|
[here](./tests/data/user-config/feedbackd/themes/custom.json) for
|
||||||
an example. Once you have the file in place, tell feedbackd the
|
an example.
|
||||||
them you want to use:
|
|
||||||
|
Once you have the file in place, tell feedbackd to use this theme
|
||||||
|
instead of the default one:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
gsettings set org.sigxcpu.feedbackd theme custom
|
gsettings set org.sigxcpu.feedbackd theme custom
|
||||||
@@ -123,8 +139,9 @@ You can add your own themes in multiple ways:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Note that you can name your theme as you wish but avoid theme names
|
Note that you can name your theme as you wish but avoid theme names
|
||||||
starting with `__` or `$` as this namespace is reserved. This is the
|
starting with `__` or `$` as this namespace is reserved.
|
||||||
preferred way to specify a custom theme.
|
|
||||||
|
This is the preferred way to specify a custom theme.
|
||||||
|
|
||||||
1. By adding your theme file to one of the folders in the `XDG_DATA_DIRS`
|
1. By adding your theme file to one of the folders in the `XDG_DATA_DIRS`
|
||||||
environment variable, appended with `feedbackd/themes/`. This folder isn't
|
environment variable, appended with `feedbackd/themes/`. This folder isn't
|
||||||
@@ -190,12 +207,13 @@ examples:
|
|||||||
over `/usr/share/feedbackd/themes/pine64-pinephone-1.2.json`
|
over `/usr/share/feedbackd/themes/pine64-pinephone-1.2.json`
|
||||||
- etc...
|
- etc...
|
||||||
|
|
||||||
For available feeddback types see the [feedback-themes][](5) manpage.
|
For available feedback types see the [feedback-themes][](5) manpage.
|
||||||
|
|
||||||
You can check the feedback theme and the [feedbackd-themes manpage][]
|
You can check the feedback theme and the [feedbackd-themes manpage][]
|
||||||
or available properties. Note that the feedback theme API (including
|
for available properties.
|
||||||
the theme file format) is not stable but considered internal to the
|
|
||||||
daemon.
|
Note that the feedback theme API (including the theme file format) is
|
||||||
|
not stable but considered internal to the daemon.
|
||||||
|
|
||||||
### Profiles
|
### Profiles
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -100,7 +100,7 @@
|
|||||||
{
|
{
|
||||||
"event-name" : "window-close",
|
"event-name" : "window-close",
|
||||||
"type" : "Sound",
|
"type" : "Sound",
|
||||||
"effect" : "theme-demo"
|
"effect" : "window-close"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user