wayland/helpers: add fallbacks for swayosd if service crashes (#162)
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / adjustor-build (push) Waiting to run
nix-build / clean-install-build (push) Waiting to run
nix-build / hhd-ui-build (push) Waiting to run
nix-build / rofi-bluetooth-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / pacifidlog-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-build / slateport-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run

This commit is contained in:
Aly Raffauf 2024-11-12 20:01:46 -05:00 committed by GitHub
parent 531fc3b851
commit 84c28e51d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,8 +6,8 @@
}: { }: {
brightness = rec { brightness = rec {
bin = lib.getExe' pkgs.swayosd "swayosd-client"; bin = lib.getExe' pkgs.swayosd "swayosd-client";
up = "${bin} --brightness=raise"; up = "${bin} --brightness=raise || ${lib.getExe pkgs.brightnessctl} s +10%";
down = "${bin} --brightness=lower"; down = "${bin} --brightness=lower || ${lib.getExe pkgs.brightnessctl} s 10%-";
}; };
media = rec { media = rec {
@ -43,9 +43,9 @@
volume = rec { volume = rec {
bin = lib.getExe' pkgs.swayosd "swayosd-client"; bin = lib.getExe' pkgs.swayosd "swayosd-client";
up = "${bin} --output-volume=raise"; up = "${bin} --output-volume=raise || ${lib.getExe' pkgs.wireplumber "wpctl"} set-volume @DEFAULT_AUDIO_SINK@ 5%+";
down = "${bin} --output-volume=lower"; down = "${bin} --output-volume=lower || ${lib.getExe' pkgs.wireplumber "wpctl"} set-volume @DEFAULT_AUDIO_SINK@ 5%-";
mute = "${bin} --output-volume=mute-toggle"; mute = "${bin} --output-volume=mute-toggle || ${lib.getExe' pkgs.wireplumber "wpctl"} set-mute @DEFAULT_AUDIO_SINK@ toggle";
micMute = "${bin} --input-volume=mute-toggle"; micMute = "${bin} --input-volume=mute-toggle || ${lib.getExe' pkgs.wireplumber "wpctl"} set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
}; };
} }