Archived
2
0
Fork
You've already forked dwlb
0
personal fork of dwlb (no patches)
This repository has been archived on 2025年12月24日. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • C 88.9%
  • Roff 7.8%
  • Makefile 3.3%
Find a file
2025年04月25日 21:36:10 +05:30
protocols Add support for dwl ipc patch 2023年07月21日 18:36:55 +02:00
.gitignore Add support for dwl ipc patch 2023年07月21日 18:36:55 +02:00
config.def.h increase vertical padding 2025年04月25日 21:36:10 +05:30
dwlb.1 Add man page 2023年07月23日 05:37:42 +02:00
dwlb.c add active_color_title option to set title color 2024年05月11日 23:30:37 -04:00
LICENSE add ability to specify tag names and fix LICENSE 2023年02月07日 17:44:13 -07:00
Makefile Add man page 2023年07月23日 05:37:42 +02:00
README.md support mouse wheel up and down for actions 2024年03月23日 23:53:12 +03:00
screenshot1.png update screenshot1 2023年02月25日 14:03:27 -07:00
screenshot2.png update images again 2023年02月14日 20:54:24 -07:00
utf8.h initial commit 2023年02月06日 14:46:53 -07:00

dwlb

A fast, feature-complete bar for dwl.

screenshot 1 screenshot 2

Dependencies

  • libwayland-client
  • libwayland-cursor
  • pixman
  • fcft

Installation

git clone https://github.com/kolunmi/dwlb
cd dwlb
make
make install

Usage

Pass dwlb as an argument to dwl's -s flag. This will populate each connected output with a bar. For example:

dwl -s 'dwlb -font "monospace:size=16"'

Ipc

If dwl is patched appropriately, dwlb is capable of communicating directly with dwl. When ipc is enabled with -ipc, dwlb does not read from stdin, and clicking tags functions as you would expect. Ipc can be disabled with -no-ipc.

Commands

Command options send instructions to existing instances of dwlb. All commands take at least one argument to specify a bar on which to operate. This may be zxdg_output_v1 name, "all" to affect all outputs, or "selected" for the current output.

Status Text

The -status and -title commands are used to write status text. The text may contain in-line commands in the following format: ^cmd(argument).

In-Line Command Description
^fg(HEXCOLOR) Sets foreground color to HEXCOLOR.
^bg(HEXCOLOR) Sets background color to HEXCOLOR.
^lm(SHELLCOMMAND) Begins or terminates left mouse button region with action SHELLCOMMAND.
^mm(SHELLCOMMAND) Begins or terminates middle mouse button region with action SHELLCOMMAND.
^rm(SHELLCOMMAND) Begins or terminates right mouse button region with action SHELLCOMMAND.
^us(SHELLCOMMAND) Begins or terminates mouse scroll up region with action SHELLCOMMAND.
^ds(SHELLCOMMAND) Begins or terminates mouse scroll down region with action SHELLCOMMAND.

In this example, clicking the text highlighted in red will spawn the foot terminal.

dwlb -status all 'text ^bg(ff0000)^lm(foot)text^bg()^lm() text'

A color command with no argument reverts to the default value. ^^ represents a single ^ character. Status commands can be disabled with -no-status-commands.

Scaling

If you use scaling in Wayland, you can specify buffer_scale through config file or by passing it as an option (only integer values):

dwlb -scale 2

This will render both surface and a cursor with 2x detail. If your monitor is set to 1.25 or 1.5 scaling, setting scale to 2 will also work as compositor will downscale the buffer properly.

Other Options

Run dwlb -h for a full list of options.

Someblocks

To use someblocks, or any program that outputs to stdout, with dwlb, use this one-liner:

someblocks -p | dwlb -status-stdin all

Acknowledgements