pipewire!

This commit is contained in:
ChaotiCryptidz 2022-02-08 19:46:57 +00:00
parent 7ca435f80b
commit d23c1c8ca8
5 changed files with 46 additions and 8 deletions

View file

@ -1,3 +1,3 @@
{ pkgs, inputs, ... }: {
home.packages = with pkgs; [ deploy-rs ];
home.packages = with pkgs; [ inputs.deploy-rs.defaultPackage.${pkgs.system} ];
}

View file

@ -37,6 +37,8 @@
terminal = "${pkgs.kitty}/bin/kitty";
menu = "${pkgs.wofi}/bin/wofi -idbt ${pkgs.kitty}/bin/kitty -p '' -W 25%";
cfg = config.wayland.windowManager.sway.config;
pactl = "${pkgs.pulseaudio}/bin/pactl";
pacmd = "${pkgs.pulseaudio}/bin/pacmd";
in {
bars = [
{
@ -115,13 +117,13 @@
"${cfg.modifier}+space" = "focus mode_toggle";
"XF86AudioRaiseVolume" =
"exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%";
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" =
"exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%";
"exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" =
"exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle";
"exec ${pactl}pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" =
"exec pactl set-source-mute $(pacmd list-sources |awk '/* index:/{print $3}') toggle";
"exec ${pactl} set-source-mute $(pacmd list-sources |awk '/* index:/{print $3}') toggle";
"XF86MonBrightnessDown" = "exec sudo xbacklight -time 1 -dec +5";
"XF86MonBrightnessUp" = "exec sudo xbacklight -time 1 -inc +5";
"Print" =

View file

@ -17,13 +17,12 @@
profiles.laptop
# Bluetooth
# profiles.connectivity.bluetooth
# profiles.sound.pulseaudio.pulse-bluetooth
profiles.connectivity.bluetooth
profiles.connectivity.network_manager
profiles.connectivity.ios
profiles.sound.pulseaudio.pulse
profiles.sound.pipewire
profiles.gui
profiles.gui.environments.sway
@ -84,6 +83,7 @@
services.fstrim.enable = true;
system.stateVersion = "21.11";
}

View file

@ -0,0 +1,33 @@
{ ... }: {
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
media-session.enable = true;
media-session.config.bluez-monitor.rules = [
{
matches = [{ "device.name" = "~bluez_card.*"; }];
actions = {
"update-props" = {
"bluez5.reconnect-profiles" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
"bluez5.sbc-xq-support" = true;
};
};
}
{
matches = [
# Matches all sources
{
"node.name" = "~bluez_input.*";
}
# Matches all outputs
{ "node.name" = "~bluez_output.*"; }
];
actions = { "node.pause-on-idle" = false; };
}
];
};
}

View file

@ -0,0 +1,3 @@
{ ... }: {
hardware.pulseaudio.daemon.config = { default-sample-rate = "48000"; };
}