summaryrefslogtreecommitdiffstats
path: root/perl-install/harddrake
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2023-04-12 21:26:29 +0200
committerGiuseppe Ghibò <ghibo@mageia.org>2023-04-14 12:02:36 +0200
commitda02ce50d627b98c81712f84a299989cc91b2887 (patch)
treea591d06c093ca218638001ec305ace0f7c8cf814 /perl-install/harddrake
parenteca9896e5b29091bebbb6caee20f62634e974a49 (diff)
downloaddrakx-da02ce50d627b98c81712f84a299989cc91b2887.tar
drakx-da02ce50d627b98c81712f84a299989cc91b2887.tar.gz
drakx-da02ce50d627b98c81712f84a299989cc91b2887.tar.bz2
drakx-da02ce50d627b98c81712f84a299989cc91b2887.tar.xz
drakx-da02ce50d627b98c81712f84a299989cc91b2887.zip
Don't force pavucontrol in plasma-desktop enviroment
Diffstat (limited to 'perl-install/harddrake')
-rw-r--r--perl-install/harddrake/sound.pm70
1 files changed, 47 insertions, 23 deletions
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm
index b77719b58..a023afbbc 100644
--- a/perl-install/harddrake/sound.pm
+++ b/perl-install/harddrake/sound.pm
@@ -211,10 +211,23 @@ sub configure_pipewire_wireplumber {
$pipewire_wp_user = stop_pipewire_media_session();
stop_pipewire();
- my $required_installed = $in->do_pkgs->ensure_are_installed(
- ['task-pipewire',
+ my $plasma_installed = $in->do_pkgs->is_installed('plasma-desktop');
+ my @pkgs = (
+ 'task-pipewire',
'wireplumber',
- 'pavucontrol']
+ );
+ if (!$in->do_pkgs->is_installed('pavucontrol-qt')) {
+ if ($plasma_installed) {
+ push(@pkgs, 'pavucontrol-qt');
+ }
+ else {
+ push(@pkgs, 'pavucontrol');
+ }
+ }
+
+
+ my $required_installed = $in->do_pkgs->ensure_are_installed(
+ \@pkgs
);
if (!$required_installed)
@@ -266,11 +279,8 @@ sub configure_pipewire_wireplumber {
}
#Plasma tricks
- if ($in->do_pkgs->is_installed('plasma-desktop')) {
- $in->do_pkgs->ensure_are_installed(
- [ 'pavucontrol-qt',
- 'kpipewire' ]
- );
+ if ($plasma_installed) {
+ $in->do_pkgs->ensure_is_installed('kpipewire');
}
}
@@ -287,10 +297,22 @@ sub configure_pipewire_media_session {
stop_pipewire();
- my $required_installed = $in->do_pkgs->ensure_are_installed(
- ['task-pipewire',
+ my $plasma_installed = $in->do_pkgs->is_installed('plasma-desktop');
+ my @pkgs = (
+ 'task-pulseaudio',
'pipewire-media-session',
- 'pavucontrol']
+ );
+ if (!$in->do_pkgs->is_installed('pavucontrol-qt')) {
+ if ($plasma_installed) {
+ push(@pkgs, 'pavucontrol-qt');
+ }
+ else {
+ push(@pkgs, 'pavucontrol');
+ }
+ }
+
+ my $required_installed = $in->do_pkgs->ensure_are_installed(
+ \@pkgs
);
if (!$required_installed)
@@ -341,11 +363,8 @@ sub configure_pipewire_media_session {
}
#Plasma tricks
- if ($in->do_pkgs->is_installed('plasma-desktop')) {
- $in->do_pkgs->ensure_are_installed(
- [ 'pavucontrol-qt',
- 'kpipewire' ]
- );
+ if ($plasma_installed) {
+ $in->do_pkgs->ensure_is_installed('kpipewire');
}
}
@@ -387,9 +406,19 @@ sub configure_pulseaudio {
# now packages
$in->do_pkgs->remove('pipewire-alsa');
+ my $plasma_installed = $in->do_pkgs->is_installed('plasma-desktop');
+ my @pkgs = 'task-pulseaudio';
+ if (!$in->do_pkgs->is_installed('pavucontrol-qt')) {
+ if ($plasma_installed) {
+ push(@pkgs, 'pavucontrol-qt');
+ }
+ else {
+ push(@pkgs, 'pavucontrol');
+ }
+ }
+
my $required_installed = $in->do_pkgs->ensure_are_installed(
- ['task-pulseaudio',
- 'pavucontrol']
+ \@pkgs
);
if (!$required_installed)
@@ -418,11 +447,6 @@ sub configure_pulseaudio {
# disable all the pipewire stuff before managing packages
disable_all_pipewire($in);
- #Plasma tricks
- if ($in->do_pkgs->is_installed('plasma-desktop')) {
- $in->do_pkgs->ensure_is_installed('pavucontrol-qt');
- }
-
# start pulseaudio with same pipewire preserved user
if ($pipewire_user) {
start_pulseaudio($pipewire_user);