README.md (3023B)
1 <div align="center"> 2 <h1>dwlb</h1> 3 4 A fast, feature-complete bar for [dwl](https://github.com/djpohly/dwl). 5 6 ![screenshot 1](/screenshot1.png "screenshot 1") 7 ![screenshot 2](/screenshot2.png "screenshot 2") 8 </div> 9 10 ## Dependencies 11 * libwayland-client 12 * libwayland-cursor 13 * pixman 14 * fcft 15 16 ## Installation 17 ```bash 18 git clone https://github.com/kolunmi/dwlb 19 cd dwlb 20 make 21 make install 22 ``` 23 24 ## Usage 25 Pass `dwlb` as an argument to dwl's `-s` flag. This will populate each connected output with a bar. For example: 26 ```bash 27 dwl -s 'dwlb -font "monospace:size=16"' 28 ``` 29 30 ## Ipc 31 If dwl is [patched](https://github.com/djpohly/dwl/wiki/ipc) 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`. 32 33 ## Commands 34 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. 35 36 ### Status Text 37 The `-status` and `-title` commands are used to write status text. The text may contain in-line commands in the following format: `^cmd(argument)`. 38 39 | In-Line Command | Description | 40 |---------------------|-----------------------------------------------------------------------------| 41 | `^fg(HEXCOLOR)` | Sets foreground color to `HEXCOLOR`. | 42 | `^bg(HEXCOLOR)` | Sets background color to `HEXCOLOR`. | 43 | `^lm(SHELLCOMMAND)` | Begins or terminates left mouse button region with action `SHELLCOMMAND`. | 44 | `^mm(SHELLCOMMAND)` | Begins or terminates middle mouse button region with action `SHELLCOMMAND`. | 45 | `^rm(SHELLCOMMAND)` | Begins or terminates right mouse button region with action `SHELLCOMMAND`. | 46 47 In this example, clicking the text highlighted in red will spawn the [foot](https://codeberg.org/dnkl/foot) terminal. 48 ```bash 49 dwlb -status all 'text ^bg(ff0000)^lm(foot)text^bg()^lm() text' 50 ``` 51 52 A color command with no argument reverts to the default value. `^^` represents a single `^` character. Status commands can be disabled with `-no-status-commands`. 53 54 ## Scaling 55 If you use scaling in Wayland, you can specify `buffer_scale` through config file or by passing it as an option (only integer values): 56 ```bash 57 dwlb -scale 2 58 ``` 59 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. 60 61 ## Other Options 62 Run `dwlb -h` for a full list of options. 63 64 ## Someblocks 65 To use someblocks, or any program that outputs to stdout, with dwlb, use this one-liner: 66 ```bash 67 someblocks -p | dwlb -status-stdin all 68 ``` 69 70 ## Acknowledgements 71 * [dtao](https://github.com/djpohly/dtao) 72 * [somebar](https://sr.ht/~raphi/somebar/)