Skip to content

Instantly share code, notes, and snippets.

@mindnuts
Created November 3, 2020 05:00
Show Gist options
  • Save mindnuts/ba60d69ceabcefbbaa1047c5302f8081 to your computer and use it in GitHub Desktop.
Save mindnuts/ba60d69ceabcefbbaa1047c5302f8081 to your computer and use it in GitHub Desktop.

Revisions

  1. mindnuts created this gist Nov 3, 2020.
    10 changes: 10 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    ### create a text file
    ```sh
    sudo touch /usr/local/bin/audio-restart
    ```
    ## make it executable
    ```sh
    sudo chmod +x /usr/local/bin/audio-restart
    ```

    ## use the content of the file below and run it
    6 changes: 6 additions & 0 deletions audio-restart
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #!/bin/bash
    pulseaudio -k && pkexec alsa force-reload
    zenity(){
    /usr/bin/zenity "$@" 2>/dev/null
    }
    zenity --info --width 300 --text "Audio device restarted. Click OK to continue."