1
0
Fork
You've already forked yambar
0
forked from dnkl/yambar
Modular status panel for X11 and Wayland, inspired by https://github.com/jaagr/polybar
  • C 97.5%
  • Meson 2.2%
  • Shell 0.3%
Find a file
Daniel Eklöf 6c10eb2153
module/alsa: use channel’s dB range instead of raw volume, if available
For channels that have a defined dB range, use that instead of the raw
volume range when calculating the volume percent.
Also use the same logic as alsamixer when calculating the percent from
the dB values: assume a linear scale if the dB range is "small
enough", and otherwise normalize it against a logarithmic scale.
With this, yambar’s "percent" value matches alsamixer’s exactly.
The ‘volume’ tag remains unchanged - it always reflects the raw volume
values.
Instead, we add a new tag ‘dB’, that reflects the dB values.
Closes #202 
2022年06月21日 19:49:06 +02:00
.builds ci: use fcft master branch 2022年02月05日 17:54:39 +01:00
bar bar: set clip region before calling the particles’ expose() methods 2022年06月05日 00:33:30 +02:00
completions main: add -d,--log-level=info|warning|error|none 2021年08月15日 11:43:49 +02:00
decorations overline: new decoration 2022年02月10日 20:49:09 +01:00
doc module/alsa: use channel’s dB range instead of raw volume, if available 2022年06月21日 19:49:06 +02:00
examples module/alsa: use channel’s dB range instead of raw volume, if available 2022年06月21日 19:49:06 +02:00
external module/river: add support for the ‘mode’ event 2022年06月02日 17:24:42 +02:00
modules module/alsa: use channel’s dB range instead of raw volume, if available 2022年06月21日 19:49:06 +02:00
particles particle/string: don’t try to call c32len() on a NULL string 2022年06月13日 12:07:24 +02:00
subprojects subprojects: use meson wrap files for tllist+fcft 2020年12月25日 12:22:15 +01:00
test Implement conditions on tag 2022年04月23日 17:13:24 -03:00
.clang-format misc: add format files for clang-format and editorconfig 2021年12月21日 18:44:37 +01:00
.editorconfig misc: add format files for clang-format and editorconfig 2021年12月21日 18:44:37 +01:00
.gitignore subprojects: use meson wrap files for tllist+fcft 2020年12月25日 12:22:15 +01:00
.gitlab-ci.yml ci: use fcft master branch 2022年02月05日 17:54:39 +01:00
.gitmodules fcft/tllist: remove git submodules 2020年01月11日 14:43:26 +01:00
.woodpecker.yml ci: use fcft master branch 2022年02月05日 17:54:39 +01:00
CHANGELOG.md module/alsa: use channel’s dB range instead of raw volume, if available 2022年06月21日 19:49:06 +02:00
char32.c char32: only include stdc-predef.h if it is available 2022年03月20日 10:50:57 +01:00
char32.h fcft: adapt to API changes in fcft-3.x 2022年02月05日 12:51:08 +01:00
color.h initial commit: wip 2018年11月17日 11:30:33 +01:00
config-verify.c config: add inheritable option "font-shaping" 2022年02月23日 18:43:13 +01:00
config-verify.h config: add inheritable option "font-shaping" 2022年02月23日 18:43:13 +01:00
config.c config: add inheritable option "font-shaping" 2022年02月23日 18:43:13 +01:00
config.h config: add inheritable option "font-shaping" 2022年02月23日 18:43:13 +01:00
decoration.h cairo: replace cairo with pixman in decos, particles and modules 2019年09月22日 01:56:58 +02:00
font-shaping.h config: add inheritable option "font-shaping" 2022年02月23日 18:43:13 +01:00
generate-version.sh generate-version: handle git repo not having any tags 2021年10月11日 20:21:07 +02:00
LICENSE license: MIT 2019年01月02日 11:24:28 +01:00
log.c log: fold long line 2022年02月05日 12:50:39 +01:00
log.h log: pull in log.{c,h} from foot 2021年08月15日 11:41:12 +02:00
main.c fcft: adapt to API changes in fcft-3.x 2022年02月05日 12:51:08 +01:00
meson.build meson: stop using deprecated functions, require meson >= 0.58 2022年02月27日 11:32:46 +01:00
meson_options.txt Make libmpdclient an optional dependency 2021年09月16日 11:46:22 +02:00
module.c particle: remove cairo context from begin_expose() 2019年09月22日 00:55:06 +02:00
module.h module: add ‘description()’ to the module interface 2021年06月20日 21:14:12 +02:00
particle.c Don’t loop 65536 FDs, trying to close them, when fork+exec:ing 2022年03月29日 18:23:55 +02:00
particle.h config: add inheritable option "font-shaping" 2022年02月23日 18:43:13 +01:00
PKGBUILD meson/pkgbuild: bump version to 1.8.0 2022年02月05日 17:57:40 +01:00
PKGBUILD.wayland-only meson/pkgbuild: bump version to 1.8.0 2022年02月05日 17:57:40 +01:00
plugin.c modules: creates disk-io-module 2022年06月17日 12:04:13 -03:00
plugin.h plugins: export a const function pointer interface struct 2019年01月26日 18:32:04 +01:00
README.md ci: codeberg CI 2021年10月10日 18:46:45 +02:00
screenshot.png screenshot: update 2019年09月28日 21:20:03 +02:00
stride.h font: initial port from cairo scaled fonts to raw freetype + pixman 2019年09月22日 00:50:11 +02:00
tag.c tag: for now, always use 2 decimals for floats 2022年06月03日 19:43:28 +02:00
tag.h Implement conditions on tag 2022年04月23日 17:13:24 -03:00
xcb.c misc: xcb_connect() always returns a non-NULL pointer 2019年01月19日 18:45:15 +01:00
xcb.h xcb: extern declare cached XCB atoms in header file 2020年06月05日 13:30:08 +02:00
yambar.desktop desktop: add Desktop Entry file 2019年09月29日 20:58:15 +02:00
yml.c yml: silence unused variable warning with Clang 13 2021年10月03日 23:40:23 +00:00
yml.h yml: add line/column info to every node 2019年01月11日 23:20:06 +01:00

CI status

Yambar

Packaging status

Index

  1. Introduction
  2. Configuration
  3. Modules
  4. Installation
  5. Bugs

Introduction

screenshot

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:26location:topbackground:000000ffright:- 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