Audio CDs are special, in that they don’t (usually) have any data partitions. They also don’t have a volume label. They just have tracks. Before this patch, we ignored all optical mediums that did *not* have a filesystem (that includes audio CDs). Now, instead of using the ID_FS_USAGE property to determine whether there’s media present in the CD-ROM or not, we use the ID_CDROM_MEDIA. This property is set to ‘1’ for both audio CDs and data CDs. Then, we read the ID_CDROM_MEDIA_TRACK_COUNT_AUDIO property to determine how many audio tracks there are. If the CD has a filesystem, we treat it as a data CD, and use the already existing add_partition() function to track it. If the CD does _not_ have a filesystem, but it _does_ have at least one audio track, we treat it as an audio CD and use the new add_audio_cd() function to track it. This function is almost identical to add_partition(), but instead of reading the ID_FS_LABEL property, it reads the ID_CDROM_MEDIA_TRACK_COUNT_AUDIO property and synthesizes a label on the form “Audio CD - N tracks”. Finally, a new boolean tag, “audio”, has been added. It is set to true for audio CD “partitions”, and to false in all other cases. |
||
---|---|---|
.builds | ||
bar | ||
completions | ||
decorations | ||
doc | ||
examples | ||
external | ||
modules | ||
particles | ||
subprojects | ||
test | ||
.clang-format | ||
.editorconfig | ||
.gitignore | ||
.gitlab-ci.yml | ||
.gitmodules | ||
.woodpecker.yml | ||
CHANGELOG.md | ||
color.h | ||
config-verify.c | ||
config-verify.h | ||
config.c | ||
config.h | ||
decoration.h | ||
generate-version.sh | ||
LICENSE | ||
log.c | ||
log.h | ||
main.c | ||
meson.build | ||
meson_options.txt | ||
module.c | ||
module.h | ||
particle.c | ||
particle.h | ||
PKGBUILD | ||
PKGBUILD.wayland-only | ||
plugin.c | ||
plugin.h | ||
README.md | ||
screenshot.png | ||
stride.h | ||
tag.c | ||
tag.h | ||
xcb.c | ||
xcb.h | ||
yambar.desktop | ||
yml.c | ||
yml.h |
Yambar
Index
Introduction
yambar is a lightweight and configurable status panel (bar, for short) for X11 and Wayland, that goes to great lengths to be both CPU and battery efficient - polling is only done when absolutely necessary.
It has a number of modules that provide information in the form of tags. For example, the clock module has a date tag that contains the current date.
The modules do not know how to present the information though. This is instead done by particles. And the user, you, decides which particles (and thus how to present the data) to use.
Furthermore, each particle can have a decoration - a background color or a graphical underline, for example.
There is no support for images or icons. use an icon font (e.g. Font Awesome, or Material Icons) if you want a graphical representation.
There are a number of modules and particles builtin. More can be added as plugins. You can even write your own!
To summarize: a bar displays information provided by modules, using particles and decorations. How is configured by you.
Configuration
Yambar is configured using YAML, in ~/.config/yambar/config.yml
. It
must define a top-level dictionary named bar:
bar:
height: 26
location: top
background: 000000ff
right:
- clock:
content:
- string: {text: , font: "Font Awesome 5 Free:style=solid:size=12"}
- string: {text: "{date}", right-margin: 5}
- string: {text: , font: "Font Awesome 5 Free:style=solid:size=12"}
- string: {text: "{time}"}
For details, see the man pages (yambar(5) is a good start).
Example configurations can be found in examples.
Modules
Available modules:
- alsa
- backlight
- battery
- clock
- i3 (and Sway)
- label
- mpd
- network
- removables
- river
- script (see script examples)
- sway-xkb
- xkb (XCB backend only)
- xwindow (XCB backend only)
Installation
To build, first, create a build directory, and switch to it:
mkdir -p bld/release && cd bld/release
Second, configure the build (if you intend to install it globally, you
might also want --prefix=/usr
):
meson --buildtype=release ../..
Optionally, explicitly disable a backend (or enable, if you want a
configuration error if not all dependencies are met) by adding either
-Dbackend-x11=disabled|enabled
or
-Dbackend-wayland=disabled|enabled
to the meson command line.
Three, build it:
ninja
Optionally, install it:
ninja install
Bugs
Please report bugs to https://codeberg.org/dnkl/yambar/issues
The report should contain the following:
- Which Wayland compositor (and version) you are running
- Yambar version (
yambar --version
) - Log output from yambar (start yambar from a terminal)
- If reporting a crash, please try to provide a
bt full
backtrace with symbols (i.e. use a debug build) - Steps to reproduce. The more details the better