blob: f5f8542e9f0dfc7b353df49d777686d36766ed7f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
# wmsl - Window Manager Status Line
wmsl is a simple and efficient status line program for window managers like dwm.
## Features
- Status **blocks** are updated by timer or unique signal
- Simple runtime config format (see `wmslrc`)
- Extensible source in ~350 LOC
- Signal-based block updates for instant feedback
- No dependencies except X11
## Building
```sh
make
```
For debug builds:
```sh
make DEBUG=1
```
## Installation
```sh
make install
```
By default, this installs to `/usr/local/bin`. To install elsewhere:
```sh
make PREFIX=/usr install
```
## Configuration
Create a configuration file at `~/.config/wmsl/wmslrc`:
```
delim= |
prefix=
suffix=
block=wmsl-time
block-id=1
block-sleep=1
block=wmsl-battery
block-id=2
block-sleep=10
```
See `contrib/README.md` for example monitoring scripts.
### Configuration Options
- `delim=STRING` - Delimiter between blocks (default: " | ")
- `prefix=STRING` - Prefix before all blocks (default: "")
- `suffix=STRING` - Suffix after all blocks (default: " ")
- `block=COMMAND` - Define a block with the given command
- `block-id=ID` - Set block ID for manual triggering (0 = cannot be triggered)
- `block-sleep=SECONDS` - Update interval in seconds (0 = manual only)
## Usage
Start wmsl (typically in your `.xinitrc` or window manager startup):
```sh
wmsl &
```
Use a custom config file:
```sh
wmsl -C /path/to/config &
```
Manually trigger a block update:
```sh
sigwmsl <block-id>
```
## Contrib Scripts
The `contrib/` directory contains useful monitoring scripts:
- `wmsl-battery` - Battery status and percentage
- `wmsl-cpu` - CPU usage
- `wmsl-memory` - Memory usage
- `wmsl-disk` - Disk usage
- `wmsl-time` - Date and time
- `wmsl-ip` - IP address
- `wmsl-volume` - Audio volume
- `wmsl-load` - System load
- `wmsl-temp` - CPU temperature
- `wmsl-wifi` - WiFi status
Install them to your PATH:
```sh
cp contrib/wmsl-* ~/.local/bin/
chmod +x ~/.local/bin/wmsl-*
```
## License
MIT License - See LICENSE file for details.
|