somebar/README.md

83 lines
2.9 KiB
Markdown
Raw Normal View History

2021-10-27 18:57:20 +02:00
# somebar - dwm-like bar for dwl
2021-10-25 23:53:25 +02:00
2021-10-27 18:36:57 +02:00
![Screenshot](screenshot.png)
This project is rather new. Beware of bugs.
2021-10-25 23:53:25 +02:00
2021-10-28 17:22:40 +02:00
The mailing list for this project is
[~raphi/somedesktop@lists.sr.ht](mailto:~raphi/somedesktop@lists.sr.ht).
2021-10-25 23:53:25 +02:00
## Dependencies
* c++ compiler, meson, and ninja
* wayland-scanner
2021-10-27 18:36:57 +02:00
* libwayland-client
* libwayland-cursor
* libcairo
* libpango
* libpangocairo
```
2021-10-27 18:55:51 +02:00
sudo apt install build-essential meson ninja-build \
2021-10-27 18:36:57 +02:00
libwayland-bin libwayland-client0 libwayland-cursor0 libwayland-dev \
libcairo2 libcairo2-dev \
libpango-1.0-0 libpango1.0-dev libpangocairo-1.0-0
```
2021-10-28 17:59:21 +02:00
**dwl must have the [wayland-ipc patch](https://git.sr.ht/~raphi/dwl/blob/master/patches/wayland-ipc.patch) applied**,
2021-10-25 23:53:25 +02:00
since that's how the bar communicates with dwl.
## Configuration
2021-10-27 18:36:57 +02:00
Copy `src/config.def.hpp` to `src/config.hpp`, and adjust if needed.
2021-10-25 23:53:25 +02:00
## Building
meson setup build
ninja -C build
2021-10-27 18:36:57 +02:00
./build/somebar
2021-10-25 23:53:25 +02:00
## Usage
somebar doesn't use dwl's status feature. You can start somebar using dwl's `-s` option,
2021-10-27 18:36:57 +02:00
but if you do, close stdin, as somebar will not read from it.
Somebar can be controlled by writing to `$XDG_RUNTIME_DIR/somebar-0`. The following
commands are supported:
* `status TEXT`: Updates the status bar
* `hide MONITOR` Hides somebar on the specified monitor
* `shows MONITOR` Shows somebar on the specified monitor
* `toggle MONITOR` Toggles somebar on the specified monitor
MONITOR is an zxdg_output_v1 name, which can be determined e.g. using `weston-info`.
Additionally, MONITOR can be `all` (all monitors) or `selected` (the monitor with focus).
Commands can be sent either by writing to the file name above, or equivalently by calling
somebar with the `-c` argument. For example: `somebar -c toggle all`. This is recommended
for shell scripts, as there is no race-free way to write to a file only if it exists.
2021-10-25 23:53:25 +02:00
## License
2021-10-27 18:57:20 +02:00
somebar - dwm-like bar for dwl
2021-10-27 18:49:26 +02:00
Copyright (c) 2021 Raphael Robatsch
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.