3 more scripts; pulseaudio thing fixed?
This commit is contained in:
parent
fd59418e5f
commit
8ce00f75b3
|
@ -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="
|
|
@ -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
|
|
@ -1,11 +1,12 @@
|
||||||
#!/usr/bin/env sh
|
#!/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
|
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
|
fi
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
rm "/tmp/stop-sent2pdf"
|
Loading…
Reference in New Issue