- C 96%
- Meson 4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| cli | ||
| core | ||
| daemon | ||
| data | ||
| po | ||
| protocols | ||
| .gitignore | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| meson.build | ||
| README.md | ||
Sanar Fravashid
Note
Repository Mirrors
- git.nuros.org (sanarde/fravashid): primary, self-hosted Forgejo instance, accounts restricted to the core team.
- GitHub (sanarde/fravashid): mirror for external contributors. Issues and Pull Requests opened here are welcome and are reviewed and processed by the core team.
About
Wallpaper daemon for SanarDE that shows images and videos on Wayland and X11 and reads its settings from cfgd.
Dependencies
- C17 compiler
- Meson (>= 1.0) and Ninja
- libdbus-1
- libcfgd, the client library of cfgd
- wayland-client, wayland-protocols and wayland-scanner
- libxcb with the RandR extension
- libpng and libjpeg
- libmpv
- gettext tools (xgettext, msgmerge, msgfmt)
Build
meson setup build
meson compile -C build
meson test -C build
meson install -C build
The install step puts fravashid and fravashi in bin, the cfgd schema in share/cfgd/schemas, the D-Bus service file in share/dbus-1/services and the autostart entry in <sysconfdir>/xdg/autostart.
Running
fravashid selects Wayland when WAYLAND_DISPLAY is set and X11 otherwise. Use fravashid -b wayland or fravashid -b x11 to choose. Only one instance can run per session.
On Wayland the compositor must support wlr-layer-shell. GNOME Shell does not. Each output gets a surface on the background layer. On X11 the image is drawn to the root window and published as _XROOTPMAP_ID, one region per RandR monitor. Videos are played without sound and in a loop.
Settings
Settings are keys of the cfgd schema org.nuros.sanar.fravashi, path /org/nuros/sanar/fravashi/. Changes apply without a restart. Without cfgd the defaults are used.
wallpaper: image (PNG, JPEG), video (MP4, MKV, WebM) or a directory of them. Empty shows the background color only.mode:fill,fit,stretch,centerortile. Defaultfill.color: background color as#rrggbb. Default#000000.interval: seconds between two files of a directory. Zero keeps the first file.shuffle: play the files of a directory in random order.outputs: list ofNAME=PATHentries that replacewallpaperon single outputs. Names are the ones of the compositor or of RandR, for exampleDP-1.profiles: list ofPROFILE=PATHentries that replacewallpaperon every output while that nawid profile is applied. An entry ofoutputsstill wins on its output.
cfgd set /org/nuros/sanar/fravashi/mode fit
cfgd set /org/nuros/sanar/fravashi/interval 600
Command line
fravashi get
fravashi next
fravashi prev
fravashi set [-o OUTPUT | -p PROFILE] PATH
get prints the current file of every output. next and prev move every directory one file. set writes wallpaper, the entry of OUTPUT in outputs, or the entry of PROFILE in profiles, through cfgd.
D-Bus interface
Session bus, name org.nuros.sanar.Fravashi, object /org/nuros/sanar/fravashi, interface org.nuros.sanar.Fravashi.
Next()Previous()GetCurrent() -> a{ss}: output name to current file, empty when none.- Signal
Changed(s output, s path).
Seurat
The first output reports its image to Seurat with SetWallpaper(s path) so that system colors follow the wallpaper. A video or a missing file is reported as an empty path. The path is sent again when seuratd appears on the bus later than fravashid.
Nawid
fravashid follows the monitor profile of nawid. It asks GetProfile when org.nuros.sanar.Nawi appears on the session bus and when it starts, and it reads the signal Changed(s profile). The wallpaper of an output is the first of: its entry in outputs, the entry of the applied profile in profiles, wallpaper. Without nawid, or while no profile is applied, only outputs and wallpaper are used. When nawid leaves the bus, the last profile stays.
Links
License
GPL-3.0-only. See LICENSE. The file protocols/wlr-layer-shell-unstable-v1.xml is taken from wlr-protocols and keeps its own license text.