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

Added default button mapping for laptop multimedia keys for volume an… #7672

Merged
merged 2 commits into from
Sep 7, 2024

Conversation

DarthChillash
Copy link
Contributor

This adds sensible defaults for multimedia keys for volume and brightness. Ideally for laptop usage.
I tested this on my Thinkpad T480 and I am using this exact keys config.

It is ready to merge, in my opinion, unless you wish to comment these first so they are disabled by default.

@Eclextic
Copy link

Eclextic commented Sep 6, 2024

wpctl? Also I personally don't know if this really is fit for the default config, because we aren't only having a default supplier (e.g. Firefox, Kitty), but also a default keybinding AND step options (here 10%)...

I'm not against it, just pointing smth out, as I don't use any of these defaults you're proposing myself (then again I'm not the maintainer, soooo)

@DarthChillash
Copy link
Contributor Author

You might be right that "not many" people will need this. More heads think clearer than one head. When I first installed Hyprland I got a bit stuck on this part. If you have a laptop then most likely you would be using volume and brightness keys, so I thought it would be nice to have this in the default config that people can just use without researching. Kind of like a jump starter for not-so-advanced users.

But if the goal of the default config is to be as minimal as possible then this change is likely not a good fit.

@romanstingler
Copy link
Contributor

romanstingler commented Sep 6, 2024

wpctl? Also I personally don't know if this really is fit for the default config, because we aren't only having a default supplier (e.g. Firefox, Kitty), but also a default keybinding AND step options (here 10%)...

I'm not against it, just pointing smth out, as I don't use any of these defaults you're proposing myself (then again I'm not the maintainer, soooo)

wpctl which is pipeWire wich is the leading replacement for pulseaudio and jack,
If you have any modern Linux you will probably have pipewire.
There is no BSD port as far as I know.

Linux Distributions with PipeWire by Default:

Fedora:
    Starting from Fedora 34, PipeWire has replaced PulseAudio and JACK as the default audio server.
Ubuntu:
    Ubuntu 22.10 and later versions have PipeWire as the default audio server for handling audio and video. However, PulseAudio is still available.
Pop!_OS:
    Pop!_OS, which is based on Ubuntu, has moved to PipeWire as the default in recent versions.
Arch Linux:
    Arch Linux users can install PipeWire manually, but many Arch-based distributions (such as EndeavourOS) ship PipeWire by default in newer installations.
Manjaro:
    Manjaro offers PipeWire as the default for audio in some desktop environments, particularly GNOME, and it's easy to switch to PipeWire in other editions.
Garuda Linux:
    A rolling-release distro based on Arch, Garuda uses PipeWire out of the box for its audio management.
KDE Neon:
    Newer versions of KDE Neon include PipeWire as part of their audio and video handling setup.

Linux Distributions with Optional PipeWire Support:

Debian:
    PipeWire is available in the Debian repositories (since Bullseye). Users can switch from PulseAudio to PipeWire manually.
openSUSE:
    PipeWire is available in both openSUSE Leap and Tumbleweed, but users need to configure it as a replacement for PulseAudio.
Gentoo:
    Gentoo users can enable PipeWire through custom builds, though it requires manual configuration.
Slackware:
    PipeWire is available in the Slackware repositories, but manual setup is required.
Linux Mint:
    Starting from Linux Mint 20.3, PipeWire is supported and can be installed and configured as an alternative to PulseAudio, although it’s not the default.
Zorin OS:
    Zorin OS supports PipeWire as an option, especially useful for those running GNOME or using video conferencing applications.

Rolling Release and Niche Distributions:

EndeavourOS:
    An Arch-based rolling-release distro that uses PipeWire by default in many of its configurations.
Clear Linux:
    Developed by Intel, Clear Linux uses PipeWire for its multimedia management, especially in GNOME setups.
NixOS:
    NixOS supports PipeWire, and users can easily configure their system to use it instead of PulseAudio.

I am not a maintainer and it is not my decision, I only add some information

@DarthChillash
Copy link
Contributor Author

Oh, I did not think that PipeWire was the questionable thing in my pull. If you are doing Wayland you are most likely doing PipeWire too.

vaxerski
vaxerski previously approved these changes Sep 7, 2024
@vaxerski
Copy link
Member

vaxerski commented Sep 7, 2024

changes ok but need to be mirrored to exampleconfig in assets

@DarthChillash
Copy link
Contributor Author

Good now, boss?

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

yea, thanks :)

@vaxerski vaxerski merged commit 5ca4823 into hyprwm:main Sep 7, 2024
10 checks passed
@RichAyotte
Copy link
Contributor

Would you accept a PR for these too?

bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous

Playerctl is a command-line utility and library for controlling media players that implement the MPRIS D-Bus Interface Specification. Compatible players include audacious, cmus, mopidy, mpd, mpv, quod libet, rhythmbox, spotify, and vlc.

@vaxerski
Copy link
Member

vaxerski commented Sep 7, 2024

👍

@JcBernack
Copy link

@RichAyotte I would recomment adding --limit 1 to the wpctl arguments when raising volume, otherwise the volume will be raised past 100%. I really don't understand why that is the default behavior of wpctl, but it is what is is.

@RichAyotte
Copy link
Contributor

@JcBernack this isn't my PR, did you mean to tag @DarthChillash?

@DarthChillash
Copy link
Contributor Author

@JcBernack it's merged already, but I actually use 100+ % on my laptop because T480 speakers are poor so 110-120 % helps a lot. If you guys think Hyprland defaults need to halt at 100% then I will make a new PR.

@JcBernack
Copy link

@DarthChillash Interesting, but doesn't that cause clipping? In any case, as this is about a default config I would prefer the behavior to be in line with what most users would expect, which I would argue is a maximum of 100% volume.
Not too important though, as it's also really easy to change if a user doesn't like the default 🤷‍♂️

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

Successfully merging this pull request may close these issues.

6 participants