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

View file

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

View file

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