Partially revert a14e732
- elogind is required for pipewire-pulse :(
This commit is contained in:
parent
a14e732e40
commit
fba0142458
2 changed files with 6 additions and 15 deletions
|
@ -12,18 +12,6 @@ key_micmute() {
|
|||
esac
|
||||
}
|
||||
|
||||
key_mute() {
|
||||
state=$(pactl get-sink-mute @DEFAULT_SINK@ | awk -F': ' '{print $2}')
|
||||
case ${state} in
|
||||
yes)
|
||||
echo 0 | doas tee /sys/devices/platform/thinkpad_acpi/leds/platform::mute/brightness
|
||||
pactl set-sink-mute @DEFAULT_SINK@ 0 ;;
|
||||
no)
|
||||
echo 1 | doas tee /sys/devices/platform/thinkpad_acpi/leds/platform::mute/brightness
|
||||
pactl set-sink-mute @DEFAULT_SINK@ 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
vol_decrease() {
|
||||
pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk -F' / *' '{print $2}')
|
||||
|
@ -41,7 +29,6 @@ if [ $1 ]; then
|
|||
dec) vol_decrease ;;
|
||||
inc) vol_increase ;;
|
||||
micmute) key_micmute ;;
|
||||
mute) key_mute ;;
|
||||
esac
|
||||
else
|
||||
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F' / ' '{print $2}' | tr -d '%')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue