Skip to content

Commit

Permalink
just: Fix lack of permissions for configure-bluetooth-headset-profile
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftydinar committed Oct 8, 2024
1 parent f2ae29b commit 2858b76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions files/justfiles/gidro-os.just
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,16 @@ configure-bluetooth-headset-profile ACTION="prompt":
fi
if [ "${OPTION,,}" == "disable" ]; then
if ! [ -f "/etc/wireplumber/wireplumber.conf.d/51-disable-bluetooth-headphone-profile-switch.conf" ]; then
mkdir -p "/etc/wireplumber/wireplumber.conf.d/"
cp "/usr/share/bluebuild/gidro-os/51-disable-bluetooth-headphone-profile-switch.conf" "/etc/wireplumber/wireplumber.conf.d/51-disable-bluetooth-headphone-profile-switch.conf"
sudo mkdir -p "/etc/wireplumber/wireplumber.conf.d/"
sudo cp "/usr/share/bluebuild/gidro-os/51-disable-bluetooth-headphone-profile-switch.conf" "/etc/wireplumber/wireplumber.conf.d/51-disable-bluetooth-headphone-profile-switch.conf"
systemctl --user restart wireplumber
echo 'Disable Bluetooth headset profile setting applied.'
else
printf "\e[1;31mERROR: Bluetooth headset profile is already disabled, no change is made.\e[0m\n" 1>&2
fi
elif [ "$OPTION" == "Enable (Default)" ] || [ "${OPTION,,}" == "enable" ]; then
if [ -f "/etc/wireplumber/wireplumber.conf.d/51-disable-bluetooth-headphone-profile-switch.conf" ]; then
rm "/etc/wireplumber/wireplumber.conf.d/51-disable-bluetooth-headphone-profile-switch.conf"
sudo rm "/etc/wireplumber/wireplumber.conf.d/51-disable-bluetooth-headphone-profile-switch.conf"
systemctl --user restart wireplumber
echo 'Reverted setting "Bluetooth headset profile" to defaults.'
else
Expand Down

0 comments on commit 2858b76

Please sign in to comment.