3 more scripts; pulseaudio thing fixed?

This commit is contained in:
inigoortega 2020-01-02 18:03:14 +01:00
parent fd59418e5f
commit 8ce00f75b3
4 changed files with 25 additions and 4 deletions

View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
watch="$(cat $FAV_STREAMERS | rofi -dmenu -matching fuzzy)"
[ -n "$watch" ] && $BROWSER "https://www.twitch.tv/popout/$watch/chat?popout="

View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
streamer="$(rofi -dmenu)"
if [ -n "$streamer" ]; then
if [ "$(youtube-dl -e "https://www.twitch.tv/$streamer" 2>/dev/null)" ]; then
notify-send "$streamer found"
$BROWSER "https://www.twitch.tv/popout/$streamer/chat?popout="
else
notify-send "$streamer NOT FOUND or NOT STREAMING"
fi
fi

View File

@ -1,11 +1,12 @@
#!/usr/bin/env sh
pulseid="$(pidof pulseaudio)"
pulseid=$(pidof pulseaudio)
cpupulse="$(top -b -n 1 -p "$pulseid" | tail -n 1 | awk '{print $9}')"
cpupulse=$(top -b -n 1 -p "$pulseid" | tail -n 1 | awk '{print $9}')
stuck="$(printf "%b\n" "$cpupulse > 90" | bc -l)"
stuck=$(printf "%b\n" "$cpupulse > 90" | bc -l)
if [ "$stuck" -eq 1 ]; then
killall pulseaudio
stop_pulse=$(printf "%b\n" "Yes\nNo" | dmenu -i -p "Stop PulseAudio?")
[ "$stop_pulse" = "Yes" ] && killall pulseaudio
fi

3
scripts/stop-sent2pdf.sh Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env sh
rm "/tmp/stop-sent2pdf"