Что такое Ubuntu GNOME Remix?

Для ubuntu-16.10 я сделал несколько изменений в этом ответе.

oldresult="Some Random String"

while [ 1 ]; do
        # incase of plugged out result will contain some data
        result=$(grep "EAPD 0x2: EAPD" /proc/asound/card0/codec#0)

        # checking for oldresult if not same then only go inside
        if [ "$oldresult" != "$result" ]; then
                oldresult=$result
                if [[ -z "$result" ]]; then
                        notify-send "Plugged In"
                        amixer sset Master playback 80% # Set volume to 80%
                 else
                        notify-send "Plugged Out"
                        amixer sset Master playback 0% # Set volume to 0%
                 fi
        fi
done
1
задан 25 June 2014 в 03:24

0 ответов

Другие вопросы по тегам:

Похожие вопросы: