aboutsummaryrefslogtreecommitdiffstats
path: root/sigwmsl.1
blob: e4465da08fb848294e961585655b8fe48cc2b465 (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
.TH SIGWMSL 1 "January 2026" "wmsl" "User Commands"
.SH NAME
sigwmsl \- signal wmsl to update a specific block
.SH SYNOPSIS
.B sigwmsl
.I block-id
.SH DESCRIPTION
.B sigwmsl
sends a signal to a running
.BR wmsl (1)
instance to trigger an immediate update of a specific block.
This is useful for responding to events like volume changes, battery alerts,
or network status changes without waiting for the scheduled update interval.
.PP
The program reads the PID of the running
.B wmsl
instance from
.I /tmp/wmsl.pid
and sends a
.B SIGUSR1
signal with the specified block ID.
.SH ARGUMENTS
.TP
.I block-id
The numeric ID of the block to update, as specified in the
.B wmsl
configuration file with
.BR block-id= .
.SH EXIT STATUS
.TP
.B 0
Success
.TP
.B 1
Error (invalid block ID, wmsl not running, or PID file not found)
.SH EXAMPLES
Update the battery block (assuming block-id=2):
.PP
.nf
.RS
sigwmsl 2
.RE
.fi
.PP
This can be integrated with system events. For example, with acpid:
.PP
.nf
.RS
# /etc/acpi/events/battery
event=battery.*
action=/usr/local/bin/sigwmsl 2
.RE
.fi
.SH FILES
.TP
.I /tmp/wmsl.pid
PID file containing the process ID of the running
.B wmsl
instance.
.SH SEE ALSO
.BR wmsl (1)
.SH AUTHORS
Written for use with wmsl.