feat(pipewire): finished to remove pulseaudio

This commit is contained in:
catvayor 2024-11-08 12:59:17 +01:00
parent e4e4ae6155
commit 4bad814136
Signed by: lbailly
GPG key ID: CE3E645251AC63F3
3 changed files with 73 additions and 61 deletions

View file

@ -5,9 +5,11 @@
...
}:
{
programs.wshowkeys.enable = true;
programs.sway.enable = true;
programs.dconf.enable = true;
programs = {
wshowkeys.enable = true;
sway.enable = true;
dconf.enable = true;
};
services.dbus.packages = with pkgs; [ dconf ];
xdg.portal = {
enable = true;
@ -26,7 +28,8 @@
{
xdg.configFile."sway/config".onChange = lib.mkForce "";
home.sessionVariables = {
home = {
sessionVariables = {
MOZ_ENABLE_WAYLAND = "1";
MOZ_USE_XINPUT2 = "1";
SDL_VIDEODRIVER = "wayland";
@ -36,12 +39,13 @@
XDG_SESSION_TYPE = "wayland";
XDG_CURRENT_DESKTOP = "sway";
};
programs.waybar.enable = true;
home.file.".config/waybar" = {
file.".config/waybar" = {
source = ./waybar;
recursive = true;
};
};
programs.waybar.enable = true;
services.swayidle =
let
@ -84,7 +88,10 @@
exitMd = ''Exit Mode:| (l)Log out | (r)Reboot | (p)Poweroff'';
in
rec {
window.border = 1;
window = {
border = 1;
titlebar = false;
};
gaps.smartBorders = "on";
modifier = "Mod4";
terminal = "alacritty";
@ -92,8 +99,8 @@
startup = [
# { command = "waybar -b bar-0"; }
{ command = "${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ on"; }
{ command = "${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ on"; }
{ command = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ on"; }
{ command = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SOURCE@ on"; }
{ command = "discord"; }
{ command = "thunderbird"; }
@ -125,7 +132,6 @@
output."*".bg = "${./wall.jpg} fill";
seat."*"."hide_cursor" = "5000";
focus.wrapping = "yes";
window.titlebar = false;
colors =
let
# black = "#000000";
@ -260,10 +266,10 @@
"${modifier}+Shift+F1" = "move scratchpad";
"${modifier}+F1" = "scratchpad show";
"XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86AudioRaiseVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
"XF86AudioLowerVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
"XF86AudioMute" = "exec ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"XF86AudioMicMute" = "exec ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-";
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set +5%";
};

View file

@ -138,9 +138,7 @@
"car": "",
"default": [""]
},
"on-click": "pavucontrol",
"on-scroll-up": "pamixer -ui 2",
"on-scroll-down": "pamixer -ud 2",
"on-click": "pwvucontrol",
},
"tray": {

View file

@ -24,12 +24,14 @@
};
services.gvfs.enable = true;
programs.thunar.enable = true;
programs.thunar.plugins = with pkgs.xfce; [
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-volman
thunar-archive-plugin
thunar-media-tags-plugin
];
};
home-manager.users.catvayor = {
imports = with mods.home; [
@ -38,7 +40,16 @@
mail
];
programs.git = {
programs = {
alacritty = {
enable = true;
settings = lib.importTOML ./cat-alacritty.toml;
};
thunderbird = {
enable = true;
profiles = { };
};
git = {
enable = true;
userName = "catvayor";
userEmail = "catvayor@katvayor.net";
@ -47,11 +58,13 @@
signByDefault = true;
};
};
};
home.packages = with pkgs; [
home = {
packages = with pkgs; [
wl-clipboard
firefox
pavucontrol
pwvucontrol
libnotify
zathura
@ -60,13 +73,12 @@
mattermost-desktop
keepassxc
];
programs.alacritty = {
enable = true;
settings = lib.importTOML ./cat-alacritty.toml;
pointerCursor = {
package = pkgs.breeze-hacked-cursor-theme;
name = "Breeze_Hacked";
};
programs.thunderbird.enable = true;
programs.thunderbird.profiles = { };
};
services.mako = {
enable = true;
width = 400;
@ -105,10 +117,6 @@
name = "Breeze_Hacked";
};
};
home.pointerCursor = {
package = pkgs.breeze-hacked-cursor-theme;
name = "Breeze_Hacked";
};
xdg.enable = true;
};
}