Skip to content

Commit cbe06c2

Browse files
committed
Updated documentation regarding --device. Fixes: #166
1 parent 7afae0d commit cbe06c2

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,29 @@ Starting with Debian trixie and Ubuntu Plucky swayosd is available via apt.
5252

5353
## Usage:
5454

55-
### SwayOSD LibInput Backend
55+
### SwayOSD Frontend
56+
57+
`swayosd-server` must be running in the background.
58+
Use `swayosd-client` to send commands and display the OSD.
59+
60+
### SwayOSD LibInput Backend (Optional)
61+
62+
Used for notifying when caps-lock, scroll-lock, and num-lock is changed.
5663

5764
Using Systemd: `sudo systemctl enable --now swayosd-libinput-backend.service`
5865

5966
Other users can run: `pkexec swayosd-libinput-backend`
6067

61-
### SwayOSD Frontend
62-
63-
#### Sway examples
68+
### Sway examples
6469

65-
##### Start Server
70+
#### Start Server
6671

6772
```zsh
6873
# OSD server
6974
exec swayosd-server
7075
```
7176

72-
##### Add Client bindings
77+
#### Add Client bindings
7378

7479
```zsh
7580
# Sink volume raise optionally with --device
@@ -101,10 +106,10 @@ bindsym --release Caps_Lock exec swayosd-client --caps-lock
101106
# Capslock but specific LED name (/sys/class/leds/)
102107
bindsym --release Caps_Lock exec swayosd-client --caps-lock-led input19::capslock
103108

104-
# Brightness raise
105-
bindsym XF86MonBrightnessUp exec swayosd-client --brightness raise
106-
# Brightness lower
107-
bindsym XF86MonBrightnessDown exec swayosd-client --brightness lower
109+
# Brightness raise (optionally with --device, can be device name or wildcard)
110+
bindsym XF86MonBrightnessUp exec swayosd-client --brightness raise --device intel_backlight
111+
# Brightness lower (optionally with --device, can be device name or wildcard)
112+
bindsym XF86MonBrightnessDown exec swayosd-client --brightness lower --device intel_backlight
108113

109114
# Brightness raise with custom value('+' sign needed)
110115
bindsym XF86MonBrightnessUp exec swayosd-client --brightness +10
@@ -119,10 +124,11 @@ bindsym XF86AudioPlay exec swayosd-client --playerctl play-pause
119124

120125
### Notes on using `--device`:
121126

122-
- It is for audio devices only.
123-
- If it is omitted the default audio device is used.
124-
- It only changes the target device for the current action that changes the volume.
127+
- It is for audio and BrightnessCtl devices only.
128+
- If it is omitted, the default audio / first BrightnessCtl device is used.
129+
- It only changes the target device for the current action that changes the volume / brightness.
125130
- You can list your input audio devices using `pactl list short sources`, for outputs replace `sources` with `sinks`.
131+
- You can list your brightness devices using `brightnessctl -l`, for backlights, use `brightnessctl -l -c backlight`.
126132

127133
### Notes on using `--monitor`:
128134

src/args.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,10 @@ pub struct ArgsClient {
6969
#[arg(long, value_name = "(+)number")]
7070
pub max_volume: Option<String>,
7171

72-
/// For which device to increase/decrease audio
73-
#[arg(
74-
long,
75-
value_name = "Pulseaudio device name (pactl list short sinks|sources)"
76-
)]
72+
/// For which device to increase/decrease audio/brightness.
73+
/// Can be wildcard for brightness.
74+
/// Ex: (pactl list short sinks|sources)/(brightnessctl -l -c backlight).
75+
#[arg(long, value_name = "Pulseaudio/BrightnessCtl device name")]
7776
pub device: Option<String>,
7877

7978
/// Shows brightness osd and raises or loweres all available sources of brightness device

0 commit comments

Comments
 (0)