Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind a few utilities to special keys in default config #8019

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

emersion
Copy link
Member

Even if users don't want these exact tools, at least it gives examples.

Maybe we should use PipeWire instead of PulseAudio? I don't know what the equivalent commands would be thought.

@emersion
Copy link
Member Author

Hm it seems like Meson doesn't like the PulseAudio @DEFAULT_SINK@ strings, and I find no way to escape that…

@emersion
Copy link
Member Author

Seems like backslashes work!

Maybe we should use PipeWire instead of PulseAudio? I don't know what the equivalent commands would be thought.

Unfortunately pw-cli doesn't provide an easy way to achieve the same as pactl.

Comment on lines +207 to +208
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documented format for the arguments would be 5%- and +5%. 5%+ works though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I still think I prefer to use the same syntax for + and -, rather than have different variants for each.

@Kommynct
Copy link

Kommynct commented Feb 29, 2024

Maybe we should use PipeWire instead of PulseAudio? I don't know what the equivalent commands would be thought.

Unfortunately pw-cli doesn't provide an easy way to achieve the same as pactl.

wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 2.0
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 2.0
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle

are the equivalent commands for pipewire.

Also, if you're bothering to change the defaults, you should probably also set them to be variables, I have these in my config, but I understand if you're trying to stick to i3 ways:

	$volup exec wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 && wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 2.0 && pw-play --volume=0.2 /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga
	$voldown exec wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 && wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 2.0 && pw-play --volume=0.2 /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga
	$volmute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && pw-play --volume=0.2 /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga

@emersion
Copy link
Member Author

equivalent commands for pipewire

This assumes WirePlumber. I think I'd rather stick with pactl.

Also, if you're bothering to change the defaults, you should probably also set them to be variables

Defaults are not designed to be flexible. They're designed to be readable (good examples) and not overly system-specific. Users are going to copy the default config file and edit it to fit their needs anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants