• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/workflows/H03-May-2022-8676

contrib/systemd/H05-Mar-2022-2116

include/H05-Mar-2022-8553

protocols/H05-Mar-2022-302251

tests/H05-Mar-2022-5445

.clang-formatH A D05-Mar-2022669 2221

.editorconfigH A D05-Mar-2022292 2317

.gitignoreH A D05-Mar-202244 43

CONTRIBUTING.mdH A D05-Mar-2022417 106

LICENSEH A D05-Mar-2022744 1612

README.mdH A D05-Mar-20223.9 KiB13689

buffer.cH A D05-Mar-20221.1 KiB6049

color.cH A D05-Mar-2022956 4132

log.cH A D05-Mar-20222.4 KiB11496

main.cH A D05-Mar-202228.4 KiB913792

meson.buildH A D05-Mar-20222.6 KiB10486

parse.cH A D05-Mar-20221.7 KiB8365

pledge.cH A D05-Mar-202290 107

pledge_seccomp.cH A D05-Mar-20221.5 KiB6656

wob.1.scdH A D05-Mar-20222.2 KiB9760

README.md

1# wob — Wayland Overlay Bar
2
3[![Build Status](https://github.com/francma/wob/workflows/test/badge.svg)](https://github.com/francma/wob/actions)
4
5![preview](https://martinfranc.eu/wob-preview.svg)
6
7A lightweight overlay volume/backlight/progress/anything bar for wlroots based Wayland compositors (requrires support for `wlr_layer_shell_unstable_v1`). This project is inspired by [xob - X Overlay Bar](https://github.com/florentc/xob).
8
9## Release signatures
10
11Releases are signed with [5C6DA024DDE27178073EA103F4B432D5D67990E3](https://keys.openpgp.org/vks/v1/by-fingerprint/5C6DA024DDE27178073EA103F4B432D5D67990E3) and published on [GitHub](https://github.com/francma/wob/releases).
12
13## Installation
14
15### Compiling from source
16
17Install dependencies:
18
19- wayland
20- wayland-protocols \*
21- meson \*
22- [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (optional: man page) \*
23- [libseccomp](https://github.com/seccomp/libseccomp) (optional: Linux kernel syscall filtering) \*
24
25\* _compile-time dependecy_
26
27Run these commands:
28
29```
30git clone git@github.com:francma/wob.git
31cd wob
32meson build
33ninja -C build
34sudo ninja -C build install
35```
36
37### From packages
38
39[![Packaging status](https://repology.org/badge/tiny-repos/wob.svg)](https://repology.org/project/wob/versions)
40
41## Usage
42
43Launch wob in a terminal, enter a value (positive integer), press return.
44
45```
46wob
47```
48
49### General case
50
51You may manage a bar for audio volume, backlight intensity, or whatever, using a named pipe. Create a named pipe, e.g. /tmp/wobpipe, on your filesystem using.
52
53```
54mkfifo /tmp/wobpipe
55```
56
57Connect the named pipe to the standard input of an wob instance.
58
59```
60tail -f /tmp/wobpipe | wob
61```
62
63Set up your environment so that after updating audio volume, backlight intensity, or whatever, to a new value like 43, it writes that value into the pipe:
64
65```
66echo 43 > /tmp/wobpipe
67```
68
69Adapt this use-case to your workflow (scripts, callbacks, or keybindings handled by the window manager).
70
71See [man page](https://github.com/francma/wob/blob/master/wob.1.scd) for styling and positioning options.
72
73### Sway WM example
74
75Add these lines to your Sway config file:
76
77```
78set $WOBSOCK $XDG_RUNTIME_DIR/wob.sock
79exec mkfifo $WOBSOCK && tail -f $WOBSOCK | wob
80```
81
82Volume using alsa:
83
84```
85bindsym XF86AudioRaiseVolume exec amixer sset Master 5%+ | sed -En 's/.*\[([0-9]+)%\].*/\1/p' | head -1 > $WOBSOCK
86bindsym XF86AudioLowerVolume exec amixer sset Master 5%- | sed -En 's/.*\[([0-9]+)%\].*/\1/p' | head -1 > $WOBSOCK
87bindsym XF86AudioMute exec amixer sset Master toggle | sed -En '/\[on\]/ s/.*\[([0-9]+)%\].*/\1/ p; /\[off\]/ s/.*/0/p' | head -1 > $WOBSOCK
88```
89
90Volume using pulse audio:
91
92```
93bindsym XF86AudioRaiseVolume exec pamixer -ui 2 && pamixer --get-volume > $WOBSOCK
94bindsym XF86AudioLowerVolume exec pamixer -ud 2 && pamixer --get-volume > $WOBSOCK
95bindsym XF86AudioMute exec pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $WOBSOCK ) || pamixer --get-volume > $WOBSOCK
96```
97
98Brightness using [haikarainen/light](https://github.com/haikarainen/light):
99
100```
101bindsym XF86MonBrightnessUp exec light -A 5 && light -G | cut -d'.' -f1 > $WOBSOCK
102bindsym XF86MonBrightnessDown exec light -U 5 && light -G | cut -d'.' -f1 > $WOBSOCK
103```
104
105Brightness using [brightnessctl](https://github.com/Hummer12007/brightnessctl):
106
107```
108bindsym XF86MonBrightnessDown exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK
109bindsym XF86MonBrightnessUp exec brightnessctl set +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK
110```
111
112#### Systemd
113
114Add this line to your config file:
115
116```
117exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
118```
119
120Copy systemd unit files (if not provided by your distribution package):
121
122```
123cp contrib/systemd/wob.{service,socket} ~/.local/share/systemd/user/
124systemctl daemon-reload --user
125```
126
127Enable systemd wob socket:
128
129```
130systemctl enable --now --user wob.socket
131```
132
133## License
134
135ISC, see [LICENSE](/LICENSE).
136